From f00ecee1067ca07fc7a4f025e4bdfb67787a8f3e Mon Sep 17 00:00:00 2001 From: zsmj Date: Tue, 17 May 2022 18:51:25 +0800 Subject: [PATCH] =?UTF-8?q?JSY-17840=20fix:=20clearButton=20=E5=8D=A0?= =?UTF-8?q?=E6=BB=A1=E9=AB=98=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../combo.searchtextvalue.js | 2 +- .../trigger.searchtextvalue.js | 1 + .../combo/textvaluecombo/combo.textvalue.js | 2 +- src/case/trigger/trigger.text.js | 1 + .../base/combo/combo.searchtextvalue.less | 28 +++++-------------- 5 files changed, 11 insertions(+), 23 deletions(-) diff --git a/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js b/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js index 8eec27e80..331661afa 100644 --- a/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js +++ b/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js @@ -28,7 +28,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, { return { type: "bi.combo", - cls: (o.simple ? "bi-border-bottom" : "bi-border") + " bi-focus-shadow", + cls: (o.simple ? "bi-border-bottom" : "bi-border") + " bi-border-radius bi-focus-shadow", container: o.container, adjustLength: 2, height: height, diff --git a/src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js b/src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js index 2dd67933a..820c44213 100644 --- a/src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js +++ b/src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js @@ -86,6 +86,7 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { stopPropagation: true, invisible: !BI.isNotEmptyString(stateText), width: o.height, + height: o.height, handler: function () { self.fireEvent(BI.SearchTextValueTrigger.EVENT_CLEAR); }, diff --git a/src/case/combo/textvaluecombo/combo.textvalue.js b/src/case/combo/textvaluecombo/combo.textvalue.js index c49785126..7c8d90f62 100644 --- a/src/case/combo/textvaluecombo/combo.textvalue.js +++ b/src/case/combo/textvaluecombo/combo.textvalue.js @@ -7,7 +7,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, { _defaultConfig: function (config) { return BI.extend(BI.TextValueCombo.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-text-value-combo " + (config.simple ? "bi-border-bottom" : "bi-border"), + baseCls: "bi-text-value-combo bi-border-radius " + (config.simple ? "bi-border-bottom" : "bi-border"), height: 24, chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, text: "", diff --git a/src/case/trigger/trigger.text.js b/src/case/trigger/trigger.text.js index 52da67200..8acee1c78 100644 --- a/src/case/trigger/trigger.text.js +++ b/src/case/trigger/trigger.text.js @@ -73,6 +73,7 @@ BI.TextTrigger = BI.inherit(BI.Trigger, { cls: "close-h-font " + (o.allowClear ? "clear-button" : ""), stopPropagation: true, width: o.triggerWidth || o.height, + height: o.height, invisible: !BI.isNotEmptyString(o.text), handler: function () { self.fireEvent(BI.TextTrigger.EVENT_CLEAR); diff --git a/src/less/base/combo/combo.searchtextvalue.less b/src/less/base/combo/combo.searchtextvalue.less index 5d5a5524c..6ae0eca15 100644 --- a/src/less/base/combo/combo.searchtextvalue.less +++ b/src/less/base/combo/combo.searchtextvalue.less @@ -1,33 +1,19 @@ @import "../../index.less"; -@val: transform .3s ease; -.bi-search-text-value-combo{ - & .trigger-icon-button{ + +.bi-search-text-value-combo { + & .trigger-icon-button { font-size: 16px; } - & .search-text-value-trigger{ - .border-radius(2px); - } + &.combo-error { - & .bi-search-text-value-trigger{ + & .bi-search-text-value-trigger { & .bi-text-button { color: @color-bi-text-error-hover-search-text-value-combo; } } - &>.bi-border, &>.bi-border-bottom { + + &.bi-border, &.bi-border-bottom { border-color: @border-color-negative; } } - // 此combo的trigger_button是absolute上去的,与bi-combo在同一层级,独立写一下 - & .bi-combo.bi-combo-popup + .bi-trigger-icon-button { - & .x-icon { - .rotate(180deg); - .transition(@val); - } - } - & .bi-combo + .bi-trigger-icon-button { - & .x-icon { - .rotate(0deg); - .transition(@val); - } - } }