From 8fc91a2675d5e06210f4ba03569b9abd465a0da9 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Wed, 19 Jan 2022 14:44:44 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BE=B9=E6=A1=86=E6=A0=87=E7=BA=A2=E8=A1=A5?= =?UTF-8?q?=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/less/base/combo/combo.textvalue.icon.less | 2 +- src/less/base/combo/combo.textvalue.less | 2 +- src/widget/editor/editor.text.js | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/less/base/combo/combo.textvalue.icon.less b/src/less/base/combo/combo.textvalue.icon.less index 6951dcebb..79fef76ed 100644 --- a/src/less/base/combo/combo.textvalue.icon.less +++ b/src/less/base/combo/combo.textvalue.icon.less @@ -7,7 +7,7 @@ color: @color-bi-text-error-hover-text-value-icon-combo; } } - &>.bi-border, &>.bi-border-bottom { + &.bi-border, &.bi-border-bottom { border-color: @border-color-negative; } } diff --git a/src/less/base/combo/combo.textvalue.less b/src/less/base/combo/combo.textvalue.less index f1e703030..dbf76aaa0 100644 --- a/src/less/base/combo/combo.textvalue.less +++ b/src/less/base/combo/combo.textvalue.less @@ -7,7 +7,7 @@ color: @color-bi-text-error-hover-text-value-combo; } } - &>.bi-border, &>.bi-border-bottom { + &.bi-border, &.bi-border-bottom { border-color: @border-color-negative; } } diff --git a/src/widget/editor/editor.text.js b/src/widget/editor/editor.text.js index aa68dcd10..e74c16edf 100644 --- a/src/widget/editor/editor.text.js +++ b/src/widget/editor/editor.text.js @@ -80,6 +80,7 @@ BI.TextEditor = BI.inherit(BI.Widget, { this.editor.on(BI.Editor.EVENT_VALID, function () { + self.element.removeClass("error"); self.fireEvent(BI.TextEditor.EVENT_VALID); }); this.editor.on(BI.Editor.EVENT_CONFIRM, function () { @@ -101,6 +102,7 @@ BI.TextEditor = BI.inherit(BI.Widget, { self.fireEvent(BI.TextEditor.EVENT_STOP); }); this.editor.on(BI.Editor.EVENT_ERROR, function () { + self.element.addClass("error"); self.fireEvent(BI.TextEditor.EVENT_ERROR, arguments); }); this.editor.on(BI.Editor.EVENT_ENTER, function () {