-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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: Button-group-select支持统一配置所有选项角标 #6506
Conversation
👍 Thanks for this! Please review the labels and make any necessary changes. |
f5038c3
to
4eee230
Compare
vite.config.ts
Outdated
@@ -1,4 +1,4 @@ | |||
import {defineConfig} from 'vite'; | |||
import { defineConfig } from 'vite'; |
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.
done
const optionBadge = badge | ||
? option?.badge && typeof option?.badge === 'string' | ||
? {...badge, text: option.badge} | ||
: option?.badge |
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.
这里应该判断是否为对象,因为badge可能为数字
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.
目前的设计,外层设置badge后,option内输入badge只会是string类型
: button?.badge | ||
? {...badge, ...button.badge} | ||
: null | ||
: button.badge; |
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.
这个和上面的方法是一样的吧,可以统一一个方法
3cb1e65
to
b85dd64
Compare
1、支持button-group-select统一配置角标
2、支持option中配置角标,可覆盖统一配置
3、支持外层配置角标后,option中仅配置角标文案