diff --git a/packages/fineui/bi.lessconfig.json b/packages/fineui/bi.lessconfig.json index e46fb6e34..037d218ec 100644 --- a/packages/fineui/bi.lessconfig.json +++ b/packages/fineui/bi.lessconfig.json @@ -23,8 +23,8 @@ "@color-bi-border-disabled-radio": "rgba(9, 30, 64, 0.19)", "@color-bi-background-active-radio-content": "#2C60DB", "@color-bi-border-checkbox-theme-dark": "rgba(255, 255, 255, 0.37)", - "@color-bi-border-hover-active-radio-theme-dark": "#3869DC", - "@color-bi-background-active-radio-content-theme-dark": "#3869DC", + "@color-bi-border-hover-active-radio-theme-dark": "#497FFD", + "@color-bi-background-active-radio-content-theme-dark": "#497FFD", "@color-bi-background-disabled-active-radio-content": "#FFFFFF", "@color-bi-background-disabled-active-radio-content-theme-dark": "#606479", "@color-bi-background-disabled-active-checkbox-content": "#FFFFFF", @@ -48,5 +48,17 @@ "@font-solid-bottom": "e905", "@font-solid-right": "e906", "@font-dot": "e762", - "@font-down-triangle": "e70b" + "@font-down-triangle": "e70b", + "@color-bi-background-theme-dark": "#1B1F31", + "@border-color-light-line-theme-dark": "#30364B", + "@color-bi-background-header-background": "#F8F9FC", + "@color-bi-background-header-background-theme-dark": "#1B1F31", + "@color-bi-background-common-light-button": "#E5EFFF", + "@color-bi-background-common-light-button-theme-dark": "#0F2A62", + "@color-bi-text-highlight-theme-dark": "#497FFD", + "@color-bi-border-active-chooser-show-button-theme-dark": "#497FFD", + "@color-bi-background-button-theme-dark": "#497FFD", + "@color-bi-background-active-switch-theme-dark": "#497FFD", + "@color-bi-text-common-light-button-theme-dark": "#497FFD", + "@color-bi-text-common-light-button": "#2c60db" } diff --git a/packages/fineui/dist/font/iconfont.eot b/packages/fineui/dist/font/iconfont.eot index 044b77bf6..70e4d934a 100644 Binary files a/packages/fineui/dist/font/iconfont.eot and b/packages/fineui/dist/font/iconfont.eot differ diff --git a/packages/fineui/dist/font/iconfont.svg b/packages/fineui/dist/font/iconfont.svg index cfaa0c400..4d2393e54 100644 --- a/packages/fineui/dist/font/iconfont.svg +++ b/packages/fineui/dist/font/iconfont.svg @@ -14,6 +14,62 @@ /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -26,7 +82,7 @@ - + @@ -48,15 +104,15 @@ - + - + - + diff --git a/packages/fineui/dist/font/iconfont.ttf b/packages/fineui/dist/font/iconfont.ttf index c0b1a2247..2b7abb202 100644 Binary files a/packages/fineui/dist/font/iconfont.ttf and b/packages/fineui/dist/font/iconfont.ttf differ diff --git a/packages/fineui/dist/font/iconfont.woff b/packages/fineui/dist/font/iconfont.woff index b5741e03d..dbd285e14 100644 Binary files a/packages/fineui/dist/font/iconfont.woff and b/packages/fineui/dist/font/iconfont.woff differ diff --git a/packages/fineui/dist/font/iconfont.woff2 b/packages/fineui/dist/font/iconfont.woff2 index 31c1eb2ef..75d399f9f 100644 Binary files a/packages/fineui/dist/font/iconfont.woff2 and b/packages/fineui/dist/font/iconfont.woff2 differ diff --git a/packages/fineui/src/core/1.lodash.js b/packages/fineui/src/core/1.lodash.js index 2658bdf48..91035c165 100644 --- a/packages/fineui/src/core/1.lodash.js +++ b/packages/fineui/src/core/1.lodash.js @@ -14,7 +14,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.17.5'; + var VERSION = '4.17.21'; /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; @@ -899,7 +899,7 @@ } /** - * Gets the value at `key`, unless `key` is "__proto__". + * Gets the value at `key`, unless `key` is "__proto__" or "constructor". * * @private * @param {Object} object The object to query. @@ -907,6 +907,10 @@ * @returns {*} Returns the property value. */ function safeGet(object, key) { + if (key === 'constructor' && typeof object[key] === 'function') { + return; + } + return key == '__proto__' ? undefined : object[key]; diff --git a/packages/fineui/src/core/5.inject.js b/packages/fineui/src/core/5.inject.js index f9aeacd07..901512a03 100644 --- a/packages/fineui/src/core/5.inject.js +++ b/packages/fineui/src/core/5.inject.js @@ -427,7 +427,7 @@ const providers = {}, export const Providers = { getProvider: (type, config) => { if (!providerInjection[type]) { - _global.console && console.error(`provider: [${type}] undefined`); + _global.console && console.warn(`provider: [${type}] undefined`); } runConfigFunction(type); if (!providers[type]) { diff --git a/packages/fineui/src/core/controller/controller.layer.js b/packages/fineui/src/core/controller/controller.layer.js index 9dcac7f83..1ad1001b8 100644 --- a/packages/fineui/src/core/controller/controller.layer.js +++ b/packages/fineui/src/core/controller/controller.layer.js @@ -108,7 +108,7 @@ export class LayerController extends Controller { height: offset.height || (w.outerHeight() - (offset.top || 0) - (offset.bottom || 0)) || "", }; - const { top, left, scaleY, scaleX } = getPositionRelativeContainingBlockRect(layout.element[0]); + const { top, left, scaleY, scaleX } = getPositionRelativeContainingBlockRect(layout.element[0].parentNode || layout.element[0]); css.top = (css.top - top) / scaleY; css.left = (css.left - left) / scaleX; diff --git a/packages/fineui/src/less/base/colorchooser/colorpicker/button.colorshow.less b/packages/fineui/src/less/base/colorchooser/colorpicker/button.colorshow.less index c754a42cd..05baf6639 100644 --- a/packages/fineui/src/less/base/colorchooser/colorpicker/button.colorshow.less +++ b/packages/fineui/src/less/base/colorchooser/colorpicker/button.colorshow.less @@ -4,4 +4,12 @@ &.active, &:active { border-color: @color-bi-border-active-chooser-show-button; } +} + +.bi-theme-dark { + .bi-color-chooser-show-button { + &.active, &:active { + border-color: @color-bi-border-active-chooser-show-button-theme-dark; + } + } } \ No newline at end of file diff --git a/packages/fineui/src/less/base/single/button/button.less b/packages/fineui/src/less/base/single/button/button.less index 6f186ef0f..e352d4c3c 100644 --- a/packages/fineui/src/less/base/single/button/button.less +++ b/packages/fineui/src/less/base/single/button/button.less @@ -578,6 +578,8 @@ body .bi-button, #body .bi-button { .bi-theme-dark, #body .bi-theme-dark { .bi-button { + background-color: @color-bi-background-button-theme-dark; + &.button-ignore { background-color: @color-bi-background-ignore-button-theme-dark; @@ -643,5 +645,15 @@ body .bi-button, #body .bi-button { } } } + + &.button-common { + &.light { + background-color: @color-bi-background-common-light-button-theme-dark; + + &, & .b-font:before { + color: @color-bi-text-common-light-button-theme-dark; + } + } + } } } diff --git a/packages/fineui/src/less/base/single/button/switch.less b/packages/fineui/src/less/base/single/button/switch.less index f7101201a..bf5f4e921 100644 --- a/packages/fineui/src/less/base/single/button/switch.less +++ b/packages/fineui/src/less/base/single/button/switch.less @@ -25,7 +25,7 @@ .bi-switch { background-color: @color-bi-background-switch-theme-dark; &.active { - background-color: @color-bi-background-active-switch; + background-color: @color-bi-background-active-switch-theme-dark; } } } diff --git a/packages/fineui/src/less/core/utils/common.less b/packages/fineui/src/less/core/utils/common.less index 3da0ab1c0..ee7cc0d27 100644 --- a/packages/fineui/src/less/core/utils/common.less +++ b/packages/fineui/src/less/core/utils/common.less @@ -104,6 +104,10 @@ .bi-theme-dark { .bi-focus-shadow { + &:focus, &:hover { + border-color: @color-bi-border-highlight-theme-dark; + } + &.disabled { &:hover { border-color: @border-color-line-theme-dark; @@ -142,7 +146,7 @@ .bi-theme-dark { .bi-background { - background-color: @color-bi-background-normal-theme-dark; + background-color: @color-bi-background-theme-dark; color: @color-bi-text-background-theme-dark; & .bi-input { diff --git a/packages/fineui/src/less/core/utils/list-item.less b/packages/fineui/src/less/core/utils/list-item.less index ce5b6abb1..c61035316 100644 --- a/packages/fineui/src/less/core/utils/list-item.less +++ b/packages/fineui/src/less/core/utils/list-item.less @@ -161,12 +161,12 @@ } } &.active, &:active { - color: @color-bi-text-highlight; + color: @color-bi-text-highlight-theme-dark; & .bi-input { - color: @color-bi-text-highlight; + color: @color-bi-text-highlight-theme-dark; } & .bi-textarea { - color: @color-bi-text-highlight; + color: @color-bi-text-highlight-theme-dark; } } &.disabled { diff --git a/packages/fineui/src/less/lib/colors.less b/packages/fineui/src/less/lib/colors.less index 810745b94..478597e26 100644 --- a/packages/fineui/src/less/lib/colors.less +++ b/packages/fineui/src/less/lib/colors.less @@ -38,6 +38,7 @@ //基本提亮颜色 @color-bi-text-highlight: @font-color-highlight; +@color-bi-text-highlight-theme-dark: @font-color-highlight; //标红色 @color-bi-text-redmark: @font-color-warning; @@ -50,6 +51,7 @@ @color-bi-background-normal: @background-color-normal; //深色主题普通背景 @color-bi-background-normal-theme-dark: @background-color-normal-theme-dark; +@color-bi-background-theme-dark: @background-color-normal-theme-dark; //默认背景 @color-bi-background-default: @background-color-default; //深色主题默认背景 @@ -132,5 +134,6 @@ @color-bi-border-warning: @border-color-warning; //边框提亮 @color-bi-border-highlight: @border-color-highlight; +@color-bi-border-highlight-theme-dark: @border-color-highlight; @color-bi-alert-warning: @color-bi-orange; diff --git a/packages/fineui/src/less/lib/theme.less b/packages/fineui/src/less/lib/theme.less index 50339345c..28aa355e9 100644 --- a/packages/fineui/src/less/lib/theme.less +++ b/packages/fineui/src/less/lib/theme.less @@ -62,6 +62,7 @@ // 按钮 @color-bi-border-button: @color-bi-border-highlight; @color-bi-background-button: @color-bi-background-highlight; +@color-bi-background-button-theme-dark: @color-bi-background-highlight; @color-bi-text-common-button: @color-bi-text; @color-bi-text-common-clear-button: @color-bi-text-highlight; @color-bi-text-common-plain-button: @color-bi-text-highlight; @@ -75,7 +76,9 @@ @color-bi-background-hover-common-ghost-button-theme-dark: @color-bi-background-default; @color-bi-text-common-light-button: @color-bi-text-highlight; +@color-bi-text-common-light-button-theme-dark: @color-bi-text-highlight; @color-bi-background-common-light-button: @color-bi-background-light-blue; +@color-bi-background-common-light-button-theme-dark: @color-bi-background-light-blue; @color-bi-background-hover-common-light-button: @color-bi-background-light-blue; @color-bi-background-active-common-light-button: @color-bi-background-light-blue; @color-bi-background-hover-plain-button: @color-black-5; @@ -202,6 +205,7 @@ @color-bi-border-picker-button-mask: @color-bi-border-black; @color-bi-border-picker-button-mask-theme-dark: @color-bi-border-default; @color-bi-border-active-chooser-show-button: @color-bi-border-highlight; +@color-bi-border-active-chooser-show-button-theme-dark: @color-bi-border-highlight; @color-bi-background-disabled-chooser-popup-mask: @color-bi-background-default; // combo @color-bi-border-hover-combo: @color-bi-border-highlight; diff --git a/packages/fineui/src/widget/multiselect/trigger/switcher.checkselected.js b/packages/fineui/src/widget/multiselect/trigger/switcher.checkselected.js index 4d5bab1da..2c854fb31 100644 --- a/packages/fineui/src/widget/multiselect/trigger/switcher.checkselected.js +++ b/packages/fineui/src/widget/multiselect/trigger/switcher.checkselected.js @@ -10,6 +10,7 @@ export class MultiSelectCheckSelectedSwitcher extends Widget { static EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; static EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; static EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW"; + static EVENT_TRIGGER_COMBO = "EVENT_TRIGGER_COMBO"; _defaultConfig() { return extend(super._defaultConfig(...arguments), { @@ -48,6 +49,7 @@ export class MultiSelectCheckSelectedSwitcher extends Widget { itemsCreator: o.itemsCreator, onClickContinueSelect() { self.switcher.hideView(); + self.fireEvent(MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_COMBO); }, ref(_ref) { self.checkPane = _ref; diff --git a/packages/fineui/src/widget/multitree/multi.tree.combo.js b/packages/fineui/src/widget/multitree/multi.tree.combo.js index 7d61b6e9d..435db661e 100644 --- a/packages/fineui/src/widget/multitree/multi.tree.combo.js +++ b/packages/fineui/src/widget/multitree/multi.tree.combo.js @@ -182,6 +182,7 @@ export class MultiTreeCombo extends Single { return self.combo.isViewVisible(); } + let shouldComboPopulate = true; this.trigger.on(MultiSelectTrigger.EVENT_FOCUS, () => { self.fireEvent(MultiTreeCombo.EVENT_FOCUS); }); @@ -259,14 +260,14 @@ export class MultiTreeCombo extends Single { } self.combo.setValue(self.storeValue); self.numberCounter.setValue(self.storeValue); - self.populate(); + shouldComboPopulate && self.populate(); self.fireEvent(MultiTreeCombo.EVENT_BEFORE_POPUPVIEW); }); this.combo.on(Combo.EVENT_BEFORE_HIDEVIEW, () => { if (isSearching()) { self._stopEditing(); self._dataChange && - self.fireEvent(MultiTreeCombo.EVENT_CONFIRM); + self.fireEvent(MultiTreeCombo.EVENT_CONFIRM); } else { if (isPopupView()) { self._stopEditing(); @@ -275,7 +276,7 @@ export class MultiTreeCombo extends Single { self.storeValue = { value: {} }; } self._dataChange && - self.fireEvent(MultiTreeCombo.EVENT_CONFIRM); + self.fireEvent(MultiTreeCombo.EVENT_CONFIRM); } } clear = false; @@ -316,10 +317,18 @@ export class MultiTreeCombo extends Single { valueFormatter: o.valueFormatter, value: { value: o.value || {} }, }); + this.numberCounter.on( + MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_COMBO, + () => { + self.populate(); + shouldComboPopulate = true; + } + ); this.numberCounter.on( MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE, () => { if (!self.combo.isViewVisible()) { + shouldComboPopulate = false; self.combo.showView(); } }