Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/amis-ui/scss/components/_wizard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@
}
}

.#{$ns}Badge-Button {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

看看能否统一处理一下,现在能添加Badge的组件都会受到影响

width: auto;
height: auto;
border: none;
}

ul li.active {
color: var(--info);
}
Expand Down
12 changes: 11 additions & 1 deletion packages/amis-ui/src/components/Badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,18 @@ export class Badge extends React.Component<BadgeProps, object> {
></div>
) : null;

const {children: badgeChildren} = this.props as any;
const isChildrenTypeButton: boolean =
badgeChildren?.props?.type === 'button';

return (
<div className={cx('Badge', className)}>
<div
className={cx(
!isChildrenTypeButton || 'Badge-Button',
'Badge',
className
)}
>
{children}
{isDisplay
? this.renderBadge(
Expand Down