diff --git a/bi.lessconfig.json b/bi.lessconfig.json index aa64c08d9..563eaed07 100644 --- a/bi.lessconfig.json +++ b/bi.lessconfig.json @@ -12,11 +12,12 @@ "@border-color-dark-line": "#2E3A4D", "@color-sliver-theme-dark": "#363E55", "@border-color-disabled": "rgba(9, 30, 64, 0.07)", + "@font-color-normal": "#091E40", "@font-color-gray": "rgba(9, 30, 64, 0.9)", "@font-color-light-gray": "rgba(9, 30, 64, 0.66)", "@font-color-tips": "rgba(9, 30, 64, 0.47)", "@font-color-disabled": "rgba(9, 30, 64, 0.25)", - + "@background-color-normal": "#F8F9FC", "@color-bi-background-active-radio": "transparent", "@color-bi-border-radio": "rgba(9, 30, 64, 0.37)", "@color-bi-border-disabled-radio": "rgba(9, 30, 64, 0.19)", @@ -25,7 +26,6 @@ "@color-bi-background-disabled-active-radio-content-theme-dark": "#606479", "@color-bi-background-disabled-active-checkbox-content": "#FFFFFF", "@color-bi-background-disabled-active-checkbox-content-theme-dark": "#606479", - "@color-bi-text-header-background": "#647185", "@color-bi-background-tooltip-success": "#2E3A4D", "@color-bi-border-tooltip-success": "#2E3A4D", "@color-bi-background-toast-success": "#FFFFFF", @@ -36,5 +36,7 @@ "@color-bi-color-toast-warning": "#FAAA39", "@color-bi-color-toast-error": "#E65251", "@color-bi-color-toast-normal": "#2C60DB", - "@color-bi-color-toast-text": "#000A19" -} + "@color-bi-color-toast-text": "#000A19", + "@color-bi-text-header-background": "rgba(9, 30, 64, 0.9)", + "@color-bi-text-header-background-theme-dark": "rgba(255, 255, 255, 0.9)" +} \ No newline at end of file diff --git a/dist/font/iconfont.eot b/dist/font/iconfont.eot index 0ec02a8f4..6cd1f1cf2 100644 Binary files a/dist/font/iconfont.eot and b/dist/font/iconfont.eot differ diff --git a/dist/font/iconfont.svg b/dist/font/iconfont.svg index 04d4186a9..c70fa76fe 100644 --- a/dist/font/iconfont.svg +++ b/dist/font/iconfont.svg @@ -14,6 +14,36 @@ /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -24,9 +54,9 @@ - + - + @@ -38,7 +68,7 @@ - + @@ -48,7 +78,7 @@ - + @@ -198,7 +228,7 @@ - + @@ -252,12 +282,6 @@ - - - - - - @@ -286,9 +310,9 @@ - + - + @@ -302,29 +326,11 @@ - - - - - - - - - - - - - - - - - - - + @@ -532,7 +538,7 @@ - + @@ -594,7 +600,7 @@ - + @@ -606,7 +612,7 @@ - + @@ -618,7 +624,7 @@ - + @@ -626,7 +632,7 @@ - + @@ -636,19 +642,19 @@ - + - + - + @@ -660,7 +666,7 @@ - + @@ -678,7 +684,7 @@ - + @@ -690,7 +696,7 @@ - + @@ -780,7 +786,7 @@ - + @@ -804,23 +810,23 @@ - + - + - + - + @@ -864,13 +870,13 @@ - + - + @@ -892,13 +898,13 @@ - + - + @@ -916,7 +922,7 @@ - + @@ -992,7 +998,7 @@ - + @@ -1016,7 +1022,7 @@ - + @@ -1056,7 +1062,7 @@ - + @@ -1128,13 +1134,13 @@ - + - + - + @@ -1148,7 +1154,7 @@ - + @@ -1208,7 +1214,7 @@ - + @@ -1294,7 +1300,7 @@ - + @@ -1374,7 +1380,7 @@ - + @@ -1404,13 +1410,13 @@ - + - + @@ -1464,19 +1470,19 @@ - + - + - + @@ -1490,7 +1496,7 @@ - + @@ -1514,7 +1520,7 @@ - + @@ -1544,7 +1550,7 @@ - + @@ -1552,11 +1558,11 @@ - + - + @@ -1580,19 +1586,19 @@ - + - + - + - + @@ -1604,15 +1610,15 @@ - + - + - + - + @@ -1634,19 +1640,19 @@ - + - + - + - + @@ -1694,7 +1700,7 @@ - + @@ -1710,15 +1716,15 @@ - + - + - + @@ -1742,7 +1748,7 @@ - + @@ -1762,7 +1768,7 @@ - + @@ -1782,15 +1788,15 @@ - + - + - + @@ -1798,11 +1804,11 @@ - + - + diff --git a/dist/font/iconfont.ttf b/dist/font/iconfont.ttf index 1ae8e4a9d..76debf9d2 100644 Binary files a/dist/font/iconfont.ttf and b/dist/font/iconfont.ttf differ diff --git a/dist/font/iconfont.woff b/dist/font/iconfont.woff index 2e41e5dc5..ea016fed7 100644 Binary files a/dist/font/iconfont.woff and b/dist/font/iconfont.woff differ diff --git a/dist/font/iconfont.woff2 b/dist/font/iconfont.woff2 index 2fbd0e5b9..1d6e0c461 100644 Binary files a/dist/font/iconfont.woff2 and b/dist/font/iconfont.woff2 differ diff --git a/package.json b/package.json index 8c9cdf53d..0a9f52fc5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20220613220728", + "version": "2.0.20220620162306", "description": "fineui", "main": "dist/fineui.min.js", "types": "dist/lib/index.d.ts", diff --git a/src/base/combination/bubble.js b/src/base/combination/bubble.js index 11af9cb7a..f698b4a1a 100644 --- a/src/base/combination/bubble.js +++ b/src/base/combination/bubble.js @@ -44,7 +44,9 @@ var self = this, o = this.options; this._initCombo(); // 延迟绑定事件,这样可以将自己绑定的事情优先执行 - BI.nextTick(this._initPullDownAction.bind(this)); + BI.nextTick(() => { + !this.isDestroyed() && this._initPullDownAction(); + }); this.combo.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { if (self.isEnabled() && self.isValid()) { if (type === BI.Events.EXPAND) { @@ -82,7 +84,7 @@ element: this }, BI.LogicFactory.createLogic("vertical", BI.extend(o.logic, { items: [ - {el: this.combo} + { el: this.combo } ] })))); o.isDefaultInit && (this._assertPopupView()); @@ -113,7 +115,7 @@ var enterPopup = false; - function hide (e) { + function hide(e) { if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) { self._hideView(e); self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo); @@ -255,7 +257,7 @@ scrolly: false, element: this.options.container || this, items: [ - {el: this.popupView} + { el: this.popupView } ] }); this._rendered = true; diff --git a/src/base/combination/combo.js b/src/base/combination/combo.js index ddf020a62..604e2cac9 100644 --- a/src/base/combination/combo.js +++ b/src/base/combination/combo.js @@ -50,7 +50,9 @@ var self = this, o = this.options; this._initCombo(); // 延迟绑定事件,这样可以将自己绑定的事情优先执行 - BI.nextTick(this._initPullDownAction.bind(this)); + BI.nextTick(() => { + !this.isDestroyed() && this._initPullDownAction(); + }); this.combo.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { if (self.isEnabled() && self.isValid()) { if (type === BI.Events.EXPAND) { @@ -88,7 +90,7 @@ element: this }, BI.LogicFactory.createLogic("vertical", BI.extend(o.logic, { items: [ - {el: this.combo} + { el: this.combo } ] })))); o.isDefaultInit && (this._assertPopupView()); @@ -153,7 +155,7 @@ this._assertPopupViewRender(); this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW); // popupVisible是为了获取其宽高, 放到可视范围之外以防止在IE下闪一下 - this.popupView.css({left: -999999999, top: -99999999}); + this.popupView.css({ left: -999999999, top: -99999999 }); this.popupView.visible(); BI.each(needHideWhenAnotherComboOpen, function (i, combo) { if (i !== self.getName()) { diff --git a/src/base/combination/expander.js b/src/base/combination/expander.js index 83b99566a..407413c40 100644 --- a/src/base/combination/expander.js +++ b/src/base/combination/expander.js @@ -26,7 +26,9 @@ BI.Expander = BI.inherit(BI.Widget, { this._expanded = !!o.el.open; this._initExpander(); // 延迟绑定事件,这样可以将自己绑定的事情优先执行 - BI.nextTick(this._initPullDownAction.bind(this)); + BI.nextTick(() => { + !this.isDestroyed() && this._initPullDownAction(); + }); this.expander.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { if (self.isEnabled() && self.isValid()) { if (type === BI.Events.EXPAND) { @@ -63,7 +65,7 @@ BI.Expander = BI.inherit(BI.Widget, { scrolly: false, element: this, items: [ - {el: this.expander} + { el: this.expander } ] }); o.isDefaultInit && this._assertPopupView(); @@ -167,7 +169,7 @@ BI.Expander = BI.inherit(BI.Widget, { scrolly: false, element: this, items: [ - {el: this.popupView} + { el: this.popupView } ] }); this._rendered = true; 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/combination/switcher.js b/src/base/combination/switcher.js index b464af3d9..1a929f704 100644 --- a/src/base/combination/switcher.js +++ b/src/base/combination/switcher.js @@ -26,7 +26,9 @@ BI.Switcher = BI.inherit(BI.Widget, { var self = this, o = this.options; this._initSwitcher(); // 延迟绑定事件,这样可以将自己绑定的事情优先执行 - BI.nextTick(this._initPullDownAction.bind(this)); + BI.nextTick(() => { + !this.isDestroyed() && this._initPullDownAction(); + }); this.switcher.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { if (self.isEnabled() && self.isValid()) { if (type === BI.Events.EXPAND) { @@ -63,7 +65,7 @@ BI.Switcher = BI.inherit(BI.Widget, { scrolly: false, element: this, items: [ - {el: this.switcher} + { el: this.switcher } ] }); o.isDefaultInit && (this._assertPopupView()); @@ -136,7 +138,7 @@ BI.Switcher = BI.inherit(BI.Widget, { if (!this._created) { this.popupView = BI.createWidget(o.popup, { type: "bi.button_group", - element: o.adapter && BI.Maskers.create(this.getName(), o.adapter, BI.extend({container: this}, o.masker)), + element: o.adapter && BI.Maskers.create(this.getName(), o.adapter, BI.extend({ container: this }, o.masker)), cls: "switcher-popup", layouts: [{ type: "bi.vertical", @@ -157,7 +159,7 @@ BI.Switcher = BI.inherit(BI.Widget, { scrolly: false, element: this, items: [ - {el: this.popupView} + { el: this.popupView } ] }); } diff --git a/src/base/single/button/button.basic.js b/src/base/single/button/button.basic.js index aab172495..da7791890 100644 --- a/src/base/single/button/button.basic.js +++ b/src/base/single/button/button.basic.js @@ -49,7 +49,9 @@ BI.BasicButton = BI.inherit(BI.Single, { this.setSelected(true); } // 延迟绑定事件,这样可以将自己绑定的事情优先执行 - BI.nextTick(this.bindEvent.bind(this)); + BI.nextTick(() => { + !this.isDestroyed() && this.bindEvent(); + }); BI.BasicButton.superclass._initRef.apply(this, arguments); }, @@ -211,7 +213,7 @@ BI.BasicButton = BI.inherit(BI.Single, { // enter键等同于点击 o.attributes && o.attributes.zIndex >= 0 && hand.keyup(function (e) { if (e.keyCode === BI.KeyCode.ENTER) { - clk(e); + clk(e); } }); break; @@ -224,7 +226,7 @@ BI.BasicButton = BI.inherit(BI.Single, { "trailing": false }); - function ev (e) { + function ev(e) { if (o.stopEvent) { e.stopEvent(); } @@ -233,7 +235,7 @@ BI.BasicButton = BI.inherit(BI.Single, { } } - function clk (e) { + function clk(e) { ev(e); if (!self.isEnabled() || (self.isOnce() && self.isSelected())) { return; @@ -297,7 +299,7 @@ BI.BasicButton = BI.inherit(BI.Single, { onClick.apply(self, arguments); } - function getBubble () { + function getBubble() { var bubble = self.options.bubble; if (BI.isFunction(bubble)) { return bubble(); diff --git a/src/base/single/editor/editor.js b/src/base/single/editor/editor.js index 364044c1b..5322124d9 100644 --- a/src/base/single/editor/editor.js +++ b/src/base/single/editor/editor.js @@ -240,9 +240,6 @@ BI.Editor = BI.inherit(BI.Single, { }, setWaterMark: function (v) { - if (!BI.isKey(v)) { - return; - } this.options.watermark = v; diff --git a/src/case/combo/textvaluecombo/combo.textvalue.js b/src/case/combo/textvaluecombo/combo.textvalue.js index 19b9425e3..633656464 100644 --- a/src/case/combo/textvaluecombo/combo.textvalue.js +++ b/src/case/combo/textvaluecombo/combo.textvalue.js @@ -18,8 +18,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, { _init: function () { var self = this, o = this.options; - BI.isNumeric(o.width) && (o.width -= 2); - BI.isNumeric(o.height) && (o.height -= 2); + BI.isNumeric(o.width) && (o.width -= (o.simple ? 0 : 2)); + BI.isNumeric(o.height) && (o.height -= (o.simple ? 1 : 2)); o.value = BI.isFunction(o.value) ? this.__watch(o.value, function (context, newValue) { self.setValue(newValue); }) : o.value; diff --git a/src/case/editor/editor.clear.js b/src/case/editor/editor.clear.js index 253d32431..6fd199a43 100644 --- a/src/case/editor/editor.clear.js +++ b/src/case/editor/editor.clear.js @@ -17,8 +17,11 @@ BI.ClearEditor = BI.inherit(BI.Widget, { }); }, _init: function () { - BI.ClearEditor.superclass._init.apply(this, arguments); var self = this, o = this.options; + o.value = BI.isFunction(o.value) ? this.__watch(o.value, function (context, newValue) { + self.setValue(newValue); + }) : o.value; + BI.ClearEditor.superclass._init.apply(this, arguments); this.editor = BI.createWidget({ type: "bi.editor", simple: o.simple, diff --git a/src/case/editor/editor.shelter.js b/src/case/editor/editor.shelter.js index dec410d87..39def9d77 100644 --- a/src/case/editor/editor.shelter.js +++ b/src/case/editor/editor.shelter.js @@ -26,8 +26,11 @@ BI.ShelterEditor = BI.inherit(BI.Widget, { }, _init: function () { - BI.ShelterEditor.superclass._init.apply(this, arguments); var self = this, o = this.options; + o.value = BI.isFunction(o.value) ? this.__watch(o.value, function (context, newValue) { + self.setValue(newValue); + }) : o.value; + BI.ShelterEditor.superclass._init.apply(this, arguments); this.editor = BI.createWidget({ type: "bi.editor", simple: o.simple, diff --git a/src/case/editor/editor.sign.js b/src/case/editor/editor.sign.js index 28f1ab1cf..330c31dfe 100644 --- a/src/case/editor/editor.sign.js +++ b/src/case/editor/editor.sign.js @@ -26,8 +26,11 @@ BI.SignEditor = BI.inherit(BI.Widget, { }, _init: function () { - BI.SignEditor.superclass._init.apply(this, arguments); var self = this, o = this.options; + o.value = BI.isFunction(o.value) ? this.__watch(o.value, function (context, newValue) { + self.setValue(newValue); + }) : o.value; + BI.SignEditor.superclass._init.apply(this, arguments); this.editor = BI.createWidget({ type: "bi.editor", simple: o.simple, @@ -279,4 +282,4 @@ BI.SignEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; BI.SignEditor.EVENT_SPACE = "EVENT_SPACE"; BI.SignEditor.EVENT_EMPTY = "EVENT_EMPTY"; -BI.shortcut("bi.sign_editor", BI.SignEditor); \ No newline at end of file +BI.shortcut("bi.sign_editor", BI.SignEditor); diff --git a/src/case/trigger/trigger.editor.js b/src/case/trigger/trigger.editor.js index 7243d528f..55ff83884 100644 --- a/src/case/trigger/trigger.editor.js +++ b/src/case/trigger/trigger.editor.js @@ -6,10 +6,10 @@ * @extends BI.Trigger */ BI.EditorTrigger = BI.inherit(BI.Trigger, { - _defaultConfig: function () { + _defaultConfig: function (config) { var conf = BI.EditorTrigger.superclass._defaultConfig.apply(this, arguments); return BI.extend(conf, { - baseCls: (conf.baseCls || "") + " bi-editor-trigger bi-border bi-border-radius", + baseCls: (conf.baseCls || "") + " bi-editor-trigger bi-border-radius " + (config.simple ? "bi-border-bottom" : "bi-border"), height: 24, validationChecker: BI.emptyFn, quitChecker: BI.emptyFn, diff --git a/src/core/4.widget.js b/src/core/4.widget.js index 861fce38f..61b09a07b 100644 --- a/src/core/4.widget.js +++ b/src/core/4.widget.js @@ -17,7 +17,7 @@ var requestAnimationFrame = _global.requestAnimationFrame || _global.webkitRequestAnimationFrame || _global.mozRequestAnimationFrame || _global.oRequestAnimationFrame || _global.msRequestAnimationFrame || _global.setTimeout; - function callLifeHook (self, life) { + function callLifeHook(self, life) { var hooks = [], hook; hook = self[life]; if (hook) { @@ -124,7 +124,7 @@ var initCallbackCalled = false; var renderCallbackCalled = false; - function init () { + function init() { // 加个保险 if (initCallbackCalled === true) { _global.console && console.error("组件: 请检查beforeInit内部的写法,callback只能执行一次"); @@ -132,7 +132,7 @@ } initCallbackCalled = true; - function render () { + function render() { // 加个保险 if (renderCallbackCalled === true) { _global.console && console.error("组件: 请检查beforeRender内部的写法,callback只能执行一次"); @@ -246,8 +246,8 @@ return getter.call(self, self); }, (handler && function (v) { handler.call(self, self, v); - }) || BI.emptyFn, BI.extend({deep: true}, options)); - this._watchers.push(function unwatchFn () { + }) || BI.emptyFn, BI.extend({ deep: true }, options)); + this._watchers.push(function unwatchFn() { watcher.teardown(); }); return watcher.value; @@ -346,6 +346,7 @@ _initState: function () { this._isMounted = false; + this._isDestroyed = false; }, __initWatch: function () { @@ -449,6 +450,10 @@ return this._isMounted; }, + isDestroyed: function () { + return this._isDestroyed; + }, + setWidth: function (w) { this.options.width = w; this._initElementWidth(); @@ -681,11 +686,11 @@ }, isEnabled: function () { - return this.options.disabled === true ? false: !this.options._disabled; + return this.options.disabled === true ? false : !this.options._disabled; }, isValid: function () { - return this.options.invalid === true ? false: !this.options._invalid; + return this.options.invalid === true ? false : !this.options._invalid; }, isVisible: function () { @@ -732,6 +737,7 @@ this._isMounted = false; callLifeHook(this, "destroyed"); this.destroyed = null; + this._isDestroyed = true; }, _unMount: function () { @@ -825,12 +831,12 @@ BI.Widget.context = context = contextStack.pop(); }; - function pushTarget (_current) { + function pushTarget(_current) { if (current) currentStack.push(current); BI.Widget.current = current = _current; } - function popTarget () { + function popTarget() { BI.Widget.current = current = currentStack.pop(); } diff --git a/src/core/wrapper/layout/flex/flex.horizontal.js b/src/core/wrapper/layout/flex/flex.horizontal.js index 7d53dfe0e..75326335b 100644 --- a/src/core/wrapper/layout/flex/flex.horizontal.js +++ b/src/core/wrapper/layout/flex/flex.horizontal.js @@ -82,6 +82,9 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, { if (columnSize === "fill") { w.element.addClass("f-f"); } + if (columnSize === "" || columnSize === "auto") { + w.element.addClass("f-auto"); + } w.element.addClass("c-e"); if (i === 0) { w.element.addClass("f-c"); diff --git a/src/core/wrapper/layout/flex/flex.leftrightvertical.center.js b/src/core/wrapper/layout/flex/flex.leftrightvertical.center.js index 01a462707..b52b1e456 100644 --- a/src/core/wrapper/layout/flex/flex.leftrightvertical.center.js +++ b/src/core/wrapper/layout/flex/flex.leftrightvertical.center.js @@ -2,6 +2,7 @@ BI.FlexLeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, { props: function () { return BI.extend(BI.FlexLeftRightVerticalAdaptLayout.superclass.props.apply(this, arguments), { baseCls: "bi-f-lr-v-c", + columnSize: [], items: {}, llgap: 0, lrgap: 0, @@ -20,17 +21,19 @@ BI.FlexLeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, { render: function () { var o = this.options, self = this; BI.FlexLeftRightVerticalAdaptLayout.superclass.render.apply(this, arguments); + var items = this._formatItems(o.items); return { type: "bi.flex_vertical_adapt", ref: function (_ref) { self.layout = _ref; }, - items: this._formatItems(o.items), + columnSize: o.columnSize.slice(0, (o.items.left || []).length).concat((o.items.right || []).length > 0 ? [""] : []), + items: items, scrollx: o.scrollx, scrolly: o.scrolly, scrollable: o.scrollable, innerHgap: o.innerHgap, - innerVgap: o.innerVgap, + innerVgap: o.innerVgap }; }, @@ -70,6 +73,7 @@ BI.FlexLeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, { return leftItems.concat({ el: { type: "bi.flex_vertical_adapt", + columnSize: o.columnSize.slice(leftItems.length), css: { "margin-left": "auto" }, diff --git a/src/core/wrapper/layout/flex/flex.vertical.js b/src/core/wrapper/layout/flex/flex.vertical.js index 46b175e9b..1c56586cc 100644 --- a/src/core/wrapper/layout/flex/flex.vertical.js +++ b/src/core/wrapper/layout/flex/flex.vertical.js @@ -81,6 +81,9 @@ BI.FlexVerticalLayout = BI.inherit(BI.Layout, { if (rowSize === "fill") { w.element.addClass("f-f"); } + if (rowSize === "" || rowSize === "auto") { + w.element.addClass("f-auto"); + } w.element.addClass("c-e"); if (i === 0) { w.element.addClass("f-c"); diff --git a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js index 8c803abaa..fa90b0543 100644 --- a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js +++ b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js @@ -79,6 +79,10 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, { w.element.addClass("f-f"); this.element.addClass("f-f"); } + if (columnSize === "" || columnSize === "auto") { + w.element.addClass("f-auto"); + this.element.addClass("f-auto"); + } w.element.addClass("c-e"); if (i === 0) { w.element.addClass("f-c"); diff --git a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js index 33609e717..76beeb601 100644 --- a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js +++ b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js @@ -79,6 +79,10 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, { w.element.addClass("f-f"); this.element.addClass("f-f"); } + if (rowSize === "" || rowSize === "auto") { + w.element.addClass("f-auto"); + this.element.addClass("f-auto"); + } w.element.addClass("c-e"); if (i === 0) { w.element.addClass("f-c"); diff --git a/src/less/base/single/tip/tip.toast.less b/src/less/base/single/tip/tip.toast.less index 4e33930ac..6f792ac49 100644 --- a/src/less/base/single/tip/tip.toast.less +++ b/src/less/base/single/tip/tip.toast.less @@ -4,6 +4,7 @@ color: @color-bi-color-toast-text; line-height: @font-size-16; .border-radius(2px); + .box-shadow(@box-shadow-toast) ; &.toast-success { background: @color-bi-background-toast-success; diff --git a/src/less/base/tree/tree.expander.less b/src/less/base/tree/tree.expander.less index b0e6ce76a..e176eecb4 100644 --- a/src/less/base/tree/tree.expander.less +++ b/src/less/base/tree/tree.expander.less @@ -3,40 +3,34 @@ .bi-tree-expander-popup.line { - &:before { + &:after { border-left: 1px dashed @border-color-dark-gray-line; position: absolute; content: ""; height: 100%; left: -1px; + top: 0; } - &.solid:before { + &.solid:after { border-left: 1px solid @border-color-dark-gray-line; - position: absolute; - content: ""; - height: 100%; - left: -1px; } } .bi-theme-dark { .bi-tree-expander-popup.line { - &:before { + &:after { border-left: 1px dashed @border-color-dark-gray-line-theme-dark; position: absolute; content: ""; height: 100%; left: -1px; + top: 0; } - &.solid:before { + &.solid:after { border-left: 1px solid @border-color-dark-gray-line-theme-dark; - position: absolute; - content: ""; - height: 100%; - left: -1px; } } } diff --git a/src/less/core/wrapper/flex.horizontal.less b/src/less/core/wrapper/flex.horizontal.less index 606e929d5..1ae9458c5 100644 --- a/src/less/core/wrapper/flex.horizontal.less +++ b/src/less/core/wrapper/flex.horizontal.less @@ -183,4 +183,10 @@ -ms-flex-shrink: 1; flex-shrink: 1; } + + > .f-auto { + &:not(.f-s-n) { + min-width: 1px; + } + } } diff --git a/src/less/core/wrapper/flex.vertical.less b/src/less/core/wrapper/flex.vertical.less index 8124422b3..3d1b23d50 100644 --- a/src/less/core/wrapper/flex.vertical.less +++ b/src/less/core/wrapper/flex.vertical.less @@ -182,4 +182,10 @@ -ms-flex-shrink: 1; flex-shrink: 1; } + + > .f-auto { + &:not(.f-s-n) { + min-width: 1px; + } + } } diff --git a/src/less/core/wrapper/flex.wrapper.horizontal.less b/src/less/core/wrapper/flex.wrapper.horizontal.less index 70ae040d7..fedf8e853 100644 --- a/src/less/core/wrapper/flex.wrapper.horizontal.less +++ b/src/less/core/wrapper/flex.wrapper.horizontal.less @@ -279,5 +279,11 @@ -ms-flex-shrink: 1; flex-shrink: 1; } + + > .f-auto { + &:not(.f-s-n) { + min-width: 1px; + } + } } } diff --git a/src/less/core/wrapper/flex.wrapper.vertical.less b/src/less/core/wrapper/flex.wrapper.vertical.less index 755289825..32200f498 100644 --- a/src/less/core/wrapper/flex.wrapper.vertical.less +++ b/src/less/core/wrapper/flex.wrapper.vertical.less @@ -273,5 +273,11 @@ -ms-flex-shrink: 1; flex-shrink: 1; } + + > .f-auto { + &:not(.f-s-n) { + min-width: 1px; + } + } } } diff --git a/src/less/lib/constant.less b/src/less/lib/constant.less index 5236ce2cb..b3a514511 100644 --- a/src/less/lib/constant.less +++ b/src/less/lib/constant.less @@ -244,3 +244,6 @@ @scroll-color-theme-dark: @color-white; @scroll-thumb-color: @color-black; @scroll-thumb-color-theme-dark: @color-black; + +//box-shadow效果 +@box-shadow-toast: 0 2px 6px 0 rgba(0, 0, 0, 0.2); diff --git a/src/less/theme/dark.less b/src/less/theme/dark.less index a0149a1f9..1ba39a88e 100644 --- a/src/less/theme/dark.less +++ b/src/less/theme/dark.less @@ -2,7 +2,14 @@ .bi-theme-dark { color: @color-bi-text-theme-dark; + & .bi-input { color: @color-bi-text; } -} \ No newline at end of file + + & .bi-textarea { + color: @color-bi-text; + } + + +} diff --git a/src/less/visual.less b/src/less/visual.less index fca93b43c..8e227fb8f 100644 --- a/src/less/visual.less +++ b/src/less/visual.less @@ -16,6 +16,12 @@ box-shadow: none; } +.box-shadow(@shadow) { + -webkit-box-shadow: @shadow; + -moz-box-shadow: @shadow; + box-shadow: @shadow; +} + .box-shadow(@style, @c) when (iscolor(@c)) { -webkit-box-shadow: @style @c; -moz-box-shadow: @style @c; @@ -219,7 +225,7 @@ margin-top: 5px; content: ""; transform: rotate(-135deg); - .box-shadow(3px 3px 10px 0, rgba(0, 0, 0, 0.06)); + .box-shadow(3px 3px 10px 0, rgba(0, 0, 0, 0.06)); } } @@ -238,7 +244,7 @@ margin-top: -5px; content: ""; transform: rotate(45deg); - .box-shadow(3px 3px 10px 0, rgba(0, 0, 0, 0.07)); + .box-shadow(3px 3px 10px 0, rgba(0, 0, 0, 0.07)); } } @@ -258,7 +264,7 @@ margin-top: 4px; content: ""; transform: rotate(135deg); - .box-shadow(3px 3px 10px 0, rgba(0, 0, 0, 0.06)); + .box-shadow(3px 3px 10px 0, rgba(0, 0, 0, 0.06)); } } @@ -277,26 +283,26 @@ margin-top: 4px; content: ""; transform: rotate(-45deg); - .box-shadow(3px 3px 10px 0, rgba(0, 0, 0, 0.07)); + .box-shadow(3px 3px 10px 0, rgba(0, 0, 0, 0.07)); } } // css3 animation .keyframes(@name, @frames) { @-webkit-keyframes @name { - @frames(); + @frames(); } @-moz-keyframes @name { - @frames(); + @frames(); } @-ms-keyframes @name { - @frames(); + @frames(); } @-o-keyframes @name { - @frames(); + @frames(); } @keyframes @name { - @frames(); + @frames(); } } @@ -326,10 +332,10 @@ .transform-origin (@x:center, @y:center) { -webkit-transform-origin: @x @y; - -moz-transform-origin: @x @y; - -ms-transform-origin: @x @y; - -o-transform-origin: @x @y; - transform-origin: @x @y; + -moz-transform-origin: @x @y; + -ms-transform-origin: @x @y; + -o-transform-origin: @x @y; + transform-origin: @x @y; } .hover-visible(@cls) { diff --git a/src/widget/datetime/datetime.combo.js b/src/widget/datetime/datetime.combo.js index d436da1a8..28037bb69 100644 --- a/src/widget/datetime/datetime.combo.js +++ b/src/widget/datetime/datetime.combo.js @@ -9,9 +9,9 @@ BI.DateTimeCombo = BI.inherit(BI.Single, { border: 1, iconWidth: 24 }, - _defaultConfig: function () { + _defaultConfig: function (conf) { return BI.extend(BI.DateTimeCombo.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-date-time-combo bi-border bi-border-radius", + baseCls: "bi-date-time-combo bi-focus-shadow " + (conf.simple ? "bi-border-bottom" : "bi-border bi-border-radius"), width: 200, height: 24, minDate: "1900-01-01", diff --git a/src/widget/downlist/popup.downlist.js b/src/widget/downlist/popup.downlist.js index 35d395334..0e802a695 100644 --- a/src/widget/downlist/popup.downlist.js +++ b/src/widget/downlist/popup.downlist.js @@ -153,8 +153,7 @@ BI.DownListPopup = BI.inherit(BI.Pane, { }], cls: "bi-down-list-spliter-container cursor-pointer", vgap: 5, - lgap: 10, - rgap: 0 + hgap: 12 }); result.push(spliter_container); } diff --git a/src/widget/dynamicdatetime/dynamicdatetime.combo.js b/src/widget/dynamicdatetime/dynamicdatetime.combo.js index 41df2ac41..176eff1ae 100644 --- a/src/widget/dynamicdatetime/dynamicdatetime.combo.js +++ b/src/widget/dynamicdatetime/dynamicdatetime.combo.js @@ -125,6 +125,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, { }, { eventName: BI.DynamicDateTimeTrigger.EVENT_VALID, action: function () { + self.storeValue = self.trigger.getValue(); self.combo.element.removeClass("error"); self.fireEvent(BI.DynamicDateTimeCombo.EVENT_VALID); } diff --git a/src/widget/multilayerdownlist/popup.downlist.js b/src/widget/multilayerdownlist/popup.downlist.js index fa222005d..7483349de 100644 --- a/src/widget/multilayerdownlist/popup.downlist.js +++ b/src/widget/multilayerdownlist/popup.downlist.js @@ -150,7 +150,7 @@ BI.MultiLayerDownListPopup = BI.inherit(BI.Pane, { }], cls: "bi-down-list-spliter-container cursor-pointer", vgap: 5, - lgap: 10 + hgap: 12, }); result.push(spliter_container); } 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 diff --git a/src/widget/numberinterval/numberinterval.js b/src/widget/numberinterval/numberinterval.js index 88b640130..9fb76367f 100644 --- a/src/widget/numberinterval/numberinterval.js +++ b/src/widget/numberinterval/numberinterval.js @@ -55,7 +55,7 @@ BI.NumberInterval = BI.inherit(BI.Single, { } return true; }, - cls: "number-interval-small-editor " + (o.simple ? "bi-border-bottom" : "bi-border bi-border-corner-left-radius") + cls: "number-interval-small-editor bi-focus-shadow " + (o.simple ? "bi-border-bottom" : "bi-border bi-border-corner-left-radius") }); this.smallTip = BI.createWidget({ @@ -93,7 +93,7 @@ BI.NumberInterval = BI.inherit(BI.Single, { } return true; }, - cls: "number-interval-big-editor" + (o.simple ? " bi-border-bottom" : " bi-border bi-border-corner-right-radius") + cls: "number-interval-big-editor bi-focus-shadow" + (o.simple ? " bi-border-bottom" : " bi-border bi-border-corner-right-radius") }); this.bigTip = BI.createWidget({ diff --git a/typescript/base/foundation/message.ts b/typescript/base/foundation/message.ts index b30aad417..ad0e7bac0 100644 --- a/typescript/base/foundation/message.ts +++ b/typescript/base/foundation/message.ts @@ -9,5 +9,5 @@ export type _msg = { alert: (title: string, message?: string | { [key: string]: any }, callback?: (result?: boolean) => void) => void confirm: (title: string, message?: string | { [key: string]: any }, callback?: (result: boolean) => void) => void prompt: (title: string, message?: string, value?: any, callback?: (result: string) => void, minWidth?: number) => void - toast: (message: string | Obj, options?: toastOptions | string, context?: HTMLElement) => void + toast: (message: string | Obj, options?: toastOptions | string, context?: HTMLElement) => Function }