diff --git a/package.json b/package.json index 1de46a9eb..536df17d4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20220610140544", + "version": "2.0.20220614151423", "description": "fineui", "main": "dist/fineui.min.js", "types": "dist/lib/index.d.ts", diff --git a/src/base/combination/searcher.js b/src/base/combination/searcher.js index c4fd29025..0989b4c8a 100644 --- a/src/base/combination/searcher.js +++ b/src/base/combination/searcher.js @@ -183,7 +183,7 @@ BI.Searcher = BI.inherit(BI.Widget, { keyword: keyword, selectedValues: o.adapter && o.adapter.getValue() }, function (searchResult, matchResult) { - if (!self._stop) { + if (!self._stop && keyword === self.editor.getValue()) { var args = [].slice.call(arguments); if (args.length > 0) { args.push(keyword); diff --git a/src/base/single/tip/tip.toast.js b/src/base/single/tip/tip.toast.js index 3d26f6bc0..a9a7aeb7e 100644 --- a/src/base/single/tip/tip.toast.js +++ b/src/base/single/tip/tip.toast.js @@ -8,7 +8,7 @@ BI.Toast = BI.inherit(BI.Tip, { _const: { closableMinWidth: 146, - minWidth: 124, + minWidth: 100, closableMaxWidth: 410, maxWidth: 400, hgap: 8 diff --git a/src/case/colorchooser/colorchooser.js b/src/case/colorchooser/colorchooser.js index d6a6e7481..991be4a77 100644 --- a/src/case/colorchooser/colorchooser.js +++ b/src/case/colorchooser/colorchooser.js @@ -13,6 +13,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, { value: "", height: 24, el: {}, + simple: false }); }, diff --git a/src/case/colorchooser/colorchooser.simple.js b/src/case/colorchooser/colorchooser.simple.js index 0b3f7bea3..28517ea6d 100644 --- a/src/case/colorchooser/colorchooser.simple.js +++ b/src/case/colorchooser/colorchooser.simple.js @@ -62,4 +62,4 @@ BI.SimpleColorChooser = BI.inherit(BI.Widget, { }); BI.SimpleColorChooser.EVENT_CHANGE = "EVENT_CHANGE"; BI.SimpleColorChooser.EVENT_AFTER_POPUPVIEW = "EVENT_AFTER_POPUPVIEW"; -BI.shortcut("bi.simple_color_chooser", BI.SimpleColorChooser); \ No newline at end of file +BI.shortcut("bi.simple_color_chooser", BI.SimpleColorChooser); diff --git a/src/core/platform/web/config.js b/src/core/platform/web/config.js index 3bd279aab..eeda344b0 100644 --- a/src/core/platform/web/config.js +++ b/src/core/platform/web/config.js @@ -45,6 +45,25 @@ BI.prepares.push(function () { scrollx: true }, ob, {type: "bi.inline"}); }); + BI.Plugin.configWidget("bi.vertical", function (ob) { + if (ob.horizontalAlign === BI.HorizontalAlign.Left || ob.horizontalAlign === BI.HorizontalAlign.Right) { + if (isSupportFlex()) { + return BI.extend({}, ob, {type: "bi.flex_vertical"}); + } + return BI.extend({}, ob, { + horizontalAlign: BI.HorizontalAlign.Stretch, + type: "bi.vertical", + items: BI.map(ob.items, function (i, item) { + return { + type: "bi.inline", + horizontalAlign: ob.horizontalAlign, + items: [item] + }; + }) + }); + } + return ob; + }); BI.Plugin.configWidget("bi.inline", function (ob) { // 当列宽既需要自动列宽又需要自适应列宽时,inline布局也处理不了了,降级table处理吧 var hasAutoAndFillColumnSize = false; diff --git a/src/less/core/utils/common.less b/src/less/core/utils/common.less index e0396d286..036778c59 100644 --- a/src/less/core/utils/common.less +++ b/src/less/core/utils/common.less @@ -175,6 +175,18 @@ } } +.bi-theme-dark { + .bi-tips { + color: @color-bi-text-tips-theme-dark; + & .bi-input { + color: @color-bi-text-tips-theme-dark;; + } + & .bi-textarea { + color: @color-bi-text-tips-theme-dark; + } + } +} + // 边框 .bi-border { border: 1px solid @color-bi-border-line; diff --git a/src/widget/multiselect/trigger/button.checkselected.js b/src/widget/multiselect/trigger/button.checkselected.js index 47a5ca995..17468061f 100644 --- a/src/widget/multiselect/trigger/button.checkselected.js +++ b/src/widget/multiselect/trigger/button.checkselected.js @@ -40,7 +40,7 @@ BI.MultiSelectCheckSelectedButton = BI.inherit(BI.Single, { self.numberCounter.setText(self.numberCounter.getTag()); }); this.setVisible(false); - if(BI.isNotNull(o.value)){ + if (BI.isNotNull(o.value)) { this.setValue(o.value); } }, @@ -51,6 +51,9 @@ BI.MultiSelectCheckSelectedButton = BI.inherit(BI.Single, { o.itemsCreator({ type: BI.MultiSelectCombo.REQ_GET_DATA_LENGTH }, function (res) { + if (self.options.value.type !== BI.Selection.All) { + return; + } if (BI.isNotEmptyString(res.count)) { BI.nextTick(function () { self.numberCounter.setText(res.count); diff --git a/src/widget/multiselect/trigger/searcher.multiselect.insert.js b/src/widget/multiselect/trigger/searcher.multiselect.insert.js index 404a0e4e8..36b3a115f 100644 --- a/src/widget/multiselect/trigger/searcher.multiselect.insert.js +++ b/src/widget/multiselect/trigger/searcher.multiselect.insert.js @@ -63,7 +63,11 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, { var keyword = self.editor.getKeyword(); op.keywords = [keyword]; this.setKeyword(keyword); - o.itemsCreator(op, callback); + o.itemsCreator(op, function () { + if (keyword === self.editor.getValue()) { + callback.apply(null, arguments); + } + }); }, itemHeight: o.itemHeight, value: o.value, @@ -174,7 +178,7 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, { } }, - getState: function() { + getState: function () { return this.editor.getState(); }, diff --git a/src/widget/multiselect/trigger/searcher.multiselect.js b/src/widget/multiselect/trigger/searcher.multiselect.js index ab2688eb4..4dbfbead7 100644 --- a/src/widget/multiselect/trigger/searcher.multiselect.js +++ b/src/widget/multiselect/trigger/searcher.multiselect.js @@ -51,7 +51,6 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, { callback(); }, el: this.editor, - popup: BI.extend({ type: "bi.multi_select_search_pane", valueFormatter: o.valueFormatter, @@ -61,7 +60,15 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, { itemsCreator: function (op, callback) { var keyword = self.editor.getValue(); op.keywords = [keyword]; - o.itemsCreator(op, callback); + o.itemsCreator(op, function () { + var keyword = self.editor.getValue(); + op.keywords = [keyword]; + o.itemsCreator(op, function () { + if (keyword === self.editor.getValue()) { + callback.apply(null, arguments); + } + }); + }); }, itemHeight: o.itemHeight, value: o.value