From 1db1a8cfcdbcdadf236d6563b6fb26b411bb3ca2 Mon Sep 17 00:00:00 2001 From: rayhomie <1572801584@qq.com> Date: Fri, 10 Jan 2025 13:55:45 +0800 Subject: [PATCH 1/3] fix: card divider --- src/Card/index.axml | 2 +- src/Card/index.less | 4 +++- src/Card/variable.less | 7 +++++-- src/style/themes/theme-black.less | 1 + src/style/variables.less | 1 + 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/Card/index.axml b/src/Card/index.axml index 1e1d2e9d6..01c23033b 100644 --- a/src/Card/index.axml +++ b/src/Card/index.axml @@ -47,7 +47,7 @@ - + diff --git a/src/Card/index.less b/src/Card/index.less index da989bebd..065e8e19b 100644 --- a/src/Card/index.less +++ b/src/Card/index.less @@ -1,4 +1,5 @@ @import (reference) './variable.less'; +@import '../style/mixins/hairline.less'; @cardPrefix: ant-card; @@ -43,8 +44,9 @@ .ant-card-divider { margin: 0 24 * @rpx; - height: 1px; &-with-line { + position: relative; + .hairline('top',@ant-card-divider-color); } } diff --git a/src/Card/variable.less b/src/Card/variable.less index 5c4a45c68..a195902f3 100644 --- a/src/Card/variable.less +++ b/src/Card/variable.less @@ -3,10 +3,13 @@ @ant-card-bg: var(--ant-card-bg, @COLOR_WHITE); -@ant-card-header-title-color: var(--ant-card-header-title-color, @COLOR_TEXT_PRIMARY); +@ant-card-header-title-color: var( + --ant-card-header-title-color, + @COLOR_TEXT_PRIMARY +); @ant-card-link-color: var(--ant-card-header-title-color, @COLOR_TEXT_ASSIST); @ant-card-fold-btn-color: var(--ant-card-fold-btn-color, @COLOR_BRAND1); - +@ant-card-divider-color: var(--ant-card-divider-color, #eeeeee); diff --git a/src/style/themes/theme-black.less b/src/style/themes/theme-black.less index 648c89d02..4c29ab8b9 100644 --- a/src/style/themes/theme-black.less +++ b/src/style/themes/theme-black.less @@ -455,6 +455,7 @@ page { --ant-card-header-title-color: #c5cad1; --ant-card-header-link-color: #616161; --ant-card-fold-btn-color: #3086ff; + --ant-card-divider-color: #2b2b2b; // countdown --ant-countdown-color: #808080; --ant-countdown-number-color: #000000; diff --git a/src/style/variables.less b/src/style/variables.less index cac8070c0..f39334b8e 100644 --- a/src/style/variables.less +++ b/src/style/variables.less @@ -484,6 +484,7 @@ page { --ant-card-header-title-color: #333333; --ant-card-header-link-color: #999999; --ant-card-fold-btn-color: #1677ff; + --ant-card-divider-color: #eeeeee; // countDown --ant-countdown-color: #666; From 1f136f625b6ac6a2c986fe5fe6501426b53bf05b Mon Sep 17 00:00:00 2001 From: rayhomie <1572801584@qq.com> Date: Fri, 10 Jan 2025 15:07:32 +0800 Subject: [PATCH 2/3] fix: button add loading --- src/Button/index.axml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Button/index.axml b/src/Button/index.axml index f3735aea7..be2b007bd 100644 --- a/src/Button/index.axml +++ b/src/Button/index.axml @@ -46,5 +46,15 @@ {{ subText }} + + + From 3ea0cda2ce8987a1ae14d18450828bd30978be36 Mon Sep 17 00:00:00 2001 From: rayhomie <1572801584@qq.com> Date: Fri, 10 Jan 2025 15:26:29 +0800 Subject: [PATCH 3/3] fix: aide button in wechat platform --- src/Button/index.axml | 4 ++-- src/Button/index.sjs.ts | 7 +++++-- src/Button/index.ts | 4 ++++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/Button/index.axml b/src/Button/index.axml index be2b007bd..2da607daa 100644 --- a/src/Button/index.axml +++ b/src/Button/index.axml @@ -14,7 +14,7 @@ catchTap="{{ catchTap ? 'catchTap' : '' }}" public-id="{{ publicId }}" open-type="{{ openType }}" - class="ant-button {{ inline ? 'ant-button-inline ' + utils.getClass(size) : '' }} {{ 'ant-button-' + type + (danger ? '-danger' : ( aide && ['default', 'primary'].indexOf(type) > -1 ? '-aide' : '' )) }} {{ disabled || loading ? 'ant-button-disabled' : '' }} {{ className ? className : '' }}" + class="ant-button {{ inline ? 'ant-button-inline ' + utils.getClass(size) : '' }} {{ 'ant-button-' + type + (danger ? '-danger' : (utils.isAide(aide, type) ? '-aide' : '' )) }} {{ disabled || loading ? 'ant-button-disabled' : '' }} {{ className ? className : '' }}" style="{{ style }}" > @@ -34,7 +34,7 @@ bindchooseavatar="onChooseAvatar" public-id="{{ publicId }}" open-type="{{ openType }}" - class="ant-button {{ inline ? 'ant-button-inline ' + utils.getClass(size) : '' }} {{ 'ant-button-' + type + (danger ? '-danger' : '') }} {{ disabled || loading ? 'ant-button-disabled' : '' }} {{ className ? className : '' }}" + class="ant-button {{ inline ? 'ant-button-inline ' + utils.getClass(size) : '' }} {{ 'ant-button-' + type + (danger ? '-danger' : (utils.isAide(aide, type) ? '-aide' : '' )) }} {{ disabled || loading ? 'ant-button-disabled' : '' }} {{ className ? className : '' }}" style="{{ style }}" > diff --git a/src/Button/index.sjs.ts b/src/Button/index.sjs.ts index 6b1104ed6..c99fd11f3 100644 --- a/src/Button/index.sjs.ts +++ b/src/Button/index.sjs.ts @@ -1,6 +1,6 @@ function getClass(size) { const list = ['small', 'medium', 'large']; - if (list.indexOf(size) >=0) { + if (list.indexOf(size) >= 0) { return `ant-button-${size}`; } return 'ant-button-medium'; @@ -20,5 +20,8 @@ function getHoverClass(loading, type, activeClassName) { return className; } +function isAide(aide, type) { + return aide && ['default', 'primary'].indexOf(type) > -1; +} -export default { getClass, getHoverClass }; +export default { getClass, getHoverClass, isAide }; diff --git a/src/Button/index.ts b/src/Button/index.ts index daeca5ef1..73b2e23e1 100644 --- a/src/Button/index.ts +++ b/src/Button/index.ts @@ -29,6 +29,10 @@ Component({ type: String, value: 'default', }, + aide: { + type: Boolean, + value: false, + }, }, options: { styleIsolation: 'shared',