Skip to content

Commit

Permalink
Merge pull request baidu#9380 from Dora-boots/feat-button-group
Browse files Browse the repository at this point in the history
fix: 取消buttongroupselect默认值展示条件限制 & 配置badge情况下按钮平铺无法自适应
  • Loading branch information
hsm-lv committed Jan 17, 2024
2 parents 006413c + 5d57682 commit a6256b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions packages/amis-editor/src/plugin/Form/ButtonGroupSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ export class ButtonGroupControlPlugin extends BasePlugin {
getSchemaTpl('multiple'),
getSchemaTpl('valueFormula', {
rendererSchema: (schema: Schema) => schema,
useSelectMode: true, // 改用 Select 设置模式
visibleOn: 'this.options && this.options.length > 0'
useSelectMode: true
}),
getSchemaTpl('description')
]
Expand Down
6 changes: 5 additions & 1 deletion packages/amis-ui/scss/components/_button-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,12 @@
display: flex;

.#{$ns}Button,
.#{$ns}ButtonGroup {
.#{$ns}ButtonGroup,
.#{$ns}Badge {
flex-grow: 1;
text-align: center;
.#{$ns}Button {
width: 100%;
}
}
}

0 comments on commit a6256b4

Please sign in to comment.