From 2bc5060dd9ffd9b9388083d19a682a2ccf32eae9 Mon Sep 17 00:00:00 2001 From: yujinghan <1341009787@qq.com> Date: Tue, 2 Jan 2024 17:34:13 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix:Wizard=E7=BB=84=E4=BB=B6=E4=B8=AD?= =?UTF-8?q?=E8=A7=92=E6=A0=87=E6=98=BE=E7=A4=BA=E5=BC=82=E5=B8=B8=20#5019?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/amis-ui/scss/components/_wizard.scss | 6 ++++++ packages/amis-ui/src/components/Badge.tsx | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/packages/amis-ui/scss/components/_wizard.scss b/packages/amis-ui/scss/components/_wizard.scss index 2891e73a9cf..f4e19452b10 100644 --- a/packages/amis-ui/scss/components/_wizard.scss +++ b/packages/amis-ui/scss/components/_wizard.scss @@ -65,6 +65,12 @@ } } + .#{$ns}Badge-Button { + width: auto; + height: auto; + border: none; + } + ul li.active { color: var(--info); } diff --git a/packages/amis-ui/src/components/Badge.tsx b/packages/amis-ui/src/components/Badge.tsx index 56244b8d058..7404577e8ce 100644 --- a/packages/amis-ui/src/components/Badge.tsx +++ b/packages/amis-ui/src/components/Badge.tsx @@ -261,8 +261,16 @@ export class Badge extends React.Component { > ) : null; + const isChildrenTypeButton: boolean = children?.props.type === 'button'; + return ( -
+
{children} {isDisplay ? this.renderBadge( From 9a870baf55cb9e5682c15345972e4d954c7ee0ce Mon Sep 17 00:00:00 2001 From: yujinghan <1341009787@qq.com> Date: Wed, 3 Jan 2024 11:13:39 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:Wizard=E7=BB=84=E4=BB=B6=E4=B8=AD?= =?UTF-8?q?=E8=A7=92=E6=A0=87=E6=98=BE=E7=A4=BA=E5=BC=82=E5=B8=B8=20#5019?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/amis-ui/src/components/Badge.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/amis-ui/src/components/Badge.tsx b/packages/amis-ui/src/components/Badge.tsx index 7404577e8ce..31f96993c42 100644 --- a/packages/amis-ui/src/components/Badge.tsx +++ b/packages/amis-ui/src/components/Badge.tsx @@ -261,7 +261,9 @@ export class Badge extends React.Component { >
) : null; - const isChildrenTypeButton: boolean = children?.props.type === 'button'; + const {children: badgeChildren} = this.props as any; + const isChildrenTypeButton: boolean = + badgeChildren?.props?.type === 'button'; return (
Date: Mon, 8 Jan 2024 14:18:30 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix:Wizard=E7=BB=84=E4=BB=B6=E4=B8=AD?= =?UTF-8?q?=E8=A7=92=E6=A0=87=E6=98=BE=E7=A4=BA=E5=BC=82=E5=B8=B8=20#5019?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/amis-ui/scss/components/_wizard.scss | 34 ++++++++----------- packages/amis-ui/src/components/Badge.tsx | 12 +------ 2 files changed, 15 insertions(+), 31 deletions(-) diff --git a/packages/amis-ui/scss/components/_wizard.scss b/packages/amis-ui/scss/components/_wizard.scss index f4e19452b10..b29b829c565 100644 --- a/packages/amis-ui/scss/components/_wizard.scss +++ b/packages/amis-ui/scss/components/_wizard.scss @@ -8,21 +8,21 @@ padding: 0; .#{$ns}Badge { - display: inline-block; - width: var(--Wizard-badge-size); - height: var(--Wizard-badge-size); - font-size: var(--Wizard-badge-fontSize); - line-height: var(--Wizard-badge-size); - color: var(--Wizard-badge-color); - text-align: center; - white-space: nowrap; - vertical-align: middle; - background: var(--Wizard-badge-bg); - border-radius: var(--Wizard-badge-borderRadius); // font-weight: 700; - text-shadow: 0 px2rem(1px) 0 rgba(0, 0, 0, 0.2); + // display: inline-block; + // width: var(--Wizard-badge-size); + // height: var(--Wizard-badge-size); + // font-size: var(--Wizard-badge-fontSize); + // line-height: var(--Wizard-badge-size); + // color: var(--Wizard-badge-color); + // text-align: center; + // white-space: nowrap; + // vertical-align: middle; + // background: var(--Wizard-badge-bg); + // border-radius: var(--Wizard-badge-borderRadius); // font-weight: 700; + // text-shadow: 0 px2rem(1px) 0 rgba(0, 0, 0, 0.2); margin-right: var(--Wizard-badge-marginRight); - border: var(--Wizard-badge-border); - box-sizing: content-box; + // border: var(--Wizard-badge-border); + // box-sizing: content-box; // &--primary { // background: var(--primary); @@ -65,12 +65,6 @@ } } - .#{$ns}Badge-Button { - width: auto; - height: auto; - border: none; - } - ul li.active { color: var(--info); } diff --git a/packages/amis-ui/src/components/Badge.tsx b/packages/amis-ui/src/components/Badge.tsx index 31f96993c42..56244b8d058 100644 --- a/packages/amis-ui/src/components/Badge.tsx +++ b/packages/amis-ui/src/components/Badge.tsx @@ -261,18 +261,8 @@ export class Badge extends React.Component { >
) : null; - const {children: badgeChildren} = this.props as any; - const isChildrenTypeButton: boolean = - badgeChildren?.props?.type === 'button'; - return ( -
+
{children} {isDisplay ? this.renderBadge(