Skip to content

Commit

Permalink
fix: 取消buttongroupselect默认值展示条件限制 & 配置badge情况下按钮平铺无法自适应
Browse files Browse the repository at this point in the history
  • Loading branch information
yanglu19 committed Jan 9, 2024
1 parent 5fd26a8 commit 5d57682
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 5d57682

Please sign in to comment.