-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(comp: button): add xs and lg sizes #780
Conversation
This preview will be available after the AzureCI is passed. |
Codecov Report
@@ Coverage Diff @@
## main #780 +/- ##
==========================================
- Coverage 83.99% 83.96% -0.04%
==========================================
Files 466 465 -1
Lines 12026 12034 +8
Branches 2890 2891 +1
==========================================
+ Hits 10101 10104 +3
- Misses 1925 1930 +5
Continue to review full report at Codecov.
|
@@ -0,0 +1,5 @@ | |||
@width-xs: 56px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
除了 button 应该没有哪个组件会在使用这组变量了吧。
应该不需要定义这个,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checkbox 和 radio的button状态都需要有最小宽度
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checkbok 和 radio 的变量继承一下 button 的就好了。
@@ -27,7 +27,7 @@ export default defineComponent({ | |||
const formContext = inject(FORM_TOKEN, null) | |||
|
|||
const mode = computed(() => props.mode ?? groupProps.mode ?? 'default') | |||
const size = computed(() => props.size ?? groupProps.size ?? formContext?.size.value ?? 'md') | |||
const size = computed(() => props.size ?? groupProps.size ?? formContext?.size.value ?? 'sm') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个会影响到所以使用 button 组件的其他组件,不能这么干吧。。。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
那就需要改为全局配置
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
行吧,改成全局配置吧。
@@ -27,7 +27,7 @@ export default defineComponent({ | |||
const formContext = inject(FORM_TOKEN, null) | |||
|
|||
const mode = computed(() => props.mode ?? groupProps.mode ?? 'default') | |||
const size = computed(() => props.size ?? groupProps.size ?? formContext?.size.value ?? 'md') | |||
const size = computed(() => props.size ?? groupProps.size ?? formContext?.size.value ?? 'sm') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
行吧,改成全局配置吧。
@@ -0,0 +1,5 @@ | |||
@width-xs: 56px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checkbok 和 radio 的变量继承一下 button 的就好了。
b8053c8
to
763b086
Compare
763b086
to
6e51fbd
Compare
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
What is the new behavior?
Other information
The default size is changed to 'sm'