From 673ad5168617d7f16bd58de6ce136dca1550a588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=B3=E4=B9=99=E5=B1=B1?= Date: Wed, 30 Mar 2022 12:16:32 +0800 Subject: [PATCH] fix: should not asideControlClickableOnDisabled if not disabled --- packages/core/src/mixins/rowComp.js | 5 +++-- packages/core/src/styles/RowComp.scss | 30 +++++++++++++-------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/packages/core/src/mixins/rowComp.js b/packages/core/src/mixins/rowComp.js index 5689a30c..4162bb80 100644 --- a/packages/core/src/mixins/rowComp.js +++ b/packages/core/src/mixins/rowComp.js @@ -205,13 +205,14 @@ const rowComp = ({ tag, bold, asideControlClickableOnDisabled, + disabled, } = this.props; const textLayoutProps = getTextLayoutProps(align, !!icon); const asideControlClickableProps = ( - asideControlClickableOnDisabled + (asideControlClickableOnDisabled && disabled) ? { - onClick: (event) => { event.stopPropagation(); } + onClick: (event) => { event.stopPropagation(); }, } : undefined ); diff --git a/packages/core/src/styles/RowComp.scss b/packages/core/src/styles/RowComp.scss index 812b7fb1..93882472 100644 --- a/packages/core/src/styles/RowComp.scss +++ b/packages/core/src/styles/RowComp.scss @@ -43,22 +43,22 @@ &--aside-control-clickable { &.#{$prefix-state}-disabled { opacity: 1 !important; - } - - .#{$prefix}-text__basic { - opacity: .3 !important; - } - - .#{$prefix}-icon { - opacity: .3 !important; - } - - .#{$prefix}-text__aside { - display: block; - a, button { - opacity: 1; - pointer-events: auto; + .#{$prefix}-text__basic { + opacity: .3 !important; + } + + .#{$prefix}-icon { + opacity: .3 !important; + } + + .#{$prefix}-text__aside { + display: block; + + a, button { + opacity: 1; + pointer-events: auto; + } } } }