Skip to content
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

Merged
merged 1 commit into from
Apr 23, 2023

Conversation

Dora-boots
Copy link
Collaborator

1、支持button-group-select统一配置角标
2、支持option中配置角标,可覆盖统一配置
3、支持外层配置角标后,option中仅配置角标文案

@github-actions github-actions bot added the feat label Mar 31, 2023
@github-actions
Copy link

👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

@Dora-boots Dora-boots changed the title feat: BCE-FE-1687 [Feature] 【AMIS】Button-group-select支持统一配置所有选项角标 feat: Button-group-select支持统一配置所有选项角标 Mar 31, 2023
@Dora-boots Dora-boots force-pushed the master branch 3 times, most recently from f5038c3 to 4eee230 Compare April 13, 2023 08:57
vite.config.ts Outdated
@@ -1,4 +1,4 @@
import {defineConfig} from 'vite';
import { defineConfig } from 'vite';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

格式化处理一下

Copy link
Collaborator Author

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里应该判断是否为对象,因为badge可能为数字

Copy link
Collaborator Author

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;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个和上面的方法是一样的吧,可以统一一个方法

@Dora-boots Dora-boots force-pushed the master branch 6 times, most recently from 3cb1e65 to b85dd64 Compare April 18, 2023 03:40
@igrowp igrowp merged commit 5086b73 into baidu:master Apr 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants