From 868c0d1a4087bc3dd675e1d490324b2175964264 Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 28 Oct 2022 18:38:53 +0800 Subject: [PATCH 1/6] =?UTF-8?q?feature:=20=E5=A2=9E=E5=8A=A0instruction?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/instruction/instruction.js | 75 ++++++++++++++++++++++ src/less/base/single/instruction.less | 31 +++++++++ src/less/base/single/tip/tip.bubble.less | 10 +-- 3 files changed, 112 insertions(+), 4 deletions(-) create mode 100644 src/base/single/instruction/instruction.js create mode 100644 src/less/base/single/instruction.less diff --git a/src/base/single/instruction/instruction.js b/src/base/single/instruction/instruction.js new file mode 100644 index 000000000..f5db6bb09 --- /dev/null +++ b/src/base/single/instruction/instruction.js @@ -0,0 +1,75 @@ +BI.Instruction = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.Link.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-instruction", + height: 20, + level: "error", + textAlign: "left", + whiteSpace: "nowrap" + }); + }, + + render: function () { + var self = this, o = this.options; + + return { + type: "bi.label", + ref: function (_ref) { + self.text = _ref; + }, + cls: "instruction-" + o.level, + textAlign: o.textAlign, + whiteSpace: o.whiteSpace, + textHeight: o.height, + height: o.height, + hgap: o.hgap, + rgap: o.rgap, + lgap: o.lgap, + vgap: o.vgap, + text: o.text, + keyword: o.keyword, + value: o.value, + py: o.py + }; + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + setText: function (v) { + this.options.text = v; + this.text.setText(v); + }, + + getText: function () { + return this.options.text; + }, + + setStyle: function (css) { + this.text.setStyle(css); + }, + + setValue: function (v) { + this.text.setValue(v); + }, + + getValue: function () { + this.text.getValue(); + } +}); + +BI.shortcut("bi.instruction", BI.Instruction); diff --git a/src/less/base/single/instruction.less b/src/less/base/single/instruction.less new file mode 100644 index 000000000..51b9b0af4 --- /dev/null +++ b/src/less/base/single/instruction.less @@ -0,0 +1,31 @@ +@import "../../index.less"; + +.bi-instruction { + .border-radius(2px); + + &.instruction-error{ + background: @color-bi-background-bubble-error; + color: @color-bi-text-failure; + } + + &.instruction-common{ + background: @color-bi-background-bubble-normal; + color: @color-bi-text-highlight; + } + + &.instruction-success{ + background: @color-bi-background-bubble-success; + color: @color-bi-text-success; + } + + &.instruction-warning{ + background: @color-bi-background-bubble-warning; + color: @color-bi-text-redmark; + } +} + +.bi-theme-dark { + .bi-instruction.instruction-error { + background: @color-bi-background-bubble-error-theme-dark; + } +} diff --git a/src/less/base/single/tip/tip.bubble.less b/src/less/base/single/tip/tip.bubble.less index e18e3ffc9..eb151aec4 100644 --- a/src/less/base/single/tip/tip.bubble.less +++ b/src/less/base/single/tip/tip.bubble.less @@ -9,10 +9,6 @@ color: @color-bi-text-failure; } - .bi-theme-dark &.bubble-error { - background: @color-bi-background-bubble-error-theme-dark; - } - &.bubble-common{ background: @color-bi-background-bubble-normal; color: @color-bi-text-highlight; @@ -28,3 +24,9 @@ color: @color-bi-text-redmark; } } + +.bi-theme-dark { + .bi-bubble.bubble-error { + background: @color-bi-background-bubble-error-theme-dark; + } +} From bf472bb8cb6fec3470ad3228c89fbad3b3bfea9a Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 28 Oct 2022 18:48:47 +0800 Subject: [PATCH 2/6] =?UTF-8?q?feature:=20=E5=A2=9E=E5=8A=A0instruction?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/instruction/instruction.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/base/single/instruction/instruction.js b/src/base/single/instruction/instruction.js index f5db6bb09..71a61a6f3 100644 --- a/src/base/single/instruction/instruction.js +++ b/src/base/single/instruction/instruction.js @@ -6,7 +6,8 @@ BI.Instruction = BI.inherit(BI.Widget, { height: 20, level: "error", textAlign: "left", - whiteSpace: "nowrap" + whiteSpace: "nowrap", + hgap: 5 }); }, From 79a96d9f65e05d8269540ea2145a5124b1b8787d Mon Sep 17 00:00:00 2001 From: data Date: Fri, 28 Oct 2022 19:16:22 +0800 Subject: [PATCH 3/6] auto upgrade version to 2.0.20221028191610 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4ba289f11..b8425b4ab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221028145548", + "version": "2.0.20221028191610", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 293561fa871ec23c2746152ce803289667760eee Mon Sep 17 00:00:00 2001 From: guy Date: Sun, 30 Oct 2022 22:24:08 +0800 Subject: [PATCH 4/6] bugfix --- src/case/layer/panel.js | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/src/case/layer/panel.js b/src/case/layer/panel.js index 5c41e35d9..f73423789 100644 --- a/src/case/layer/panel.js +++ b/src/case/layer/panel.js @@ -11,22 +11,21 @@ BI.Panel = BI.inherit(BI.Widget, { titleHeight: 30, titleButtons: [], el: {}, - logic: { - dynamic: false - } + // logic: { + // dynamic: false + // } }); }, - _init: function () { + render: function () { BI.Panel.superclass._init.apply(this, arguments); var o = this.options; - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic("vertical", BI.extend(o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection("top", this._createTitle() - , this.options.el) - })))); + return { + type: "bi.vertical_fill", + rowSize: ["", "fill"], + items: [this._createTitle(), this.options.el] + }; }, _createTitle: function () { @@ -56,18 +55,18 @@ BI.Panel = BI.inherit(BI.Widget, { }); return { - el: { - type: "bi.left_right_vertical_adapt", - cls: "panel-title bi-header-background bi-border-bottom", - height: BI.toPix(o.titleHeight, 1), - items: { - left: [this.text], - right: [this.button_group] - }, - lhgap: 10, - rhgap: 10 + // el: { + type: "bi.left_right_vertical_adapt", + cls: "panel-title bi-header-background bi-border-bottom", + height: BI.toPix(o.titleHeight, 1), + items: { + left: [this.text], + right: [this.button_group] }, - height: BI.toPix(o.titleHeight, 1) + lhgap: 10, + rhgap: 10 + // }, + // height: BI.toPix(o.titleHeight, 1) }; }, From bcf8a95f26e7184224da2b187fe5664b752fea63 Mon Sep 17 00:00:00 2001 From: data Date: Mon, 31 Oct 2022 09:54:53 +0800 Subject: [PATCH 5/6] auto upgrade version to 2.0.20221031095439 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b8425b4ab..2b0304fa8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221028191610", + "version": "2.0.20221031095439", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 6a381643df8d084fe285957678be75b7ba9414c0 Mon Sep 17 00:00:00 2001 From: data Date: Mon, 31 Oct 2022 10:14:54 +0800 Subject: [PATCH 6/6] auto upgrade version to 2.0.20221031101438 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2b0304fa8..614ce7c63 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221031095439", + "version": "2.0.20221031101438", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts",