diff --git a/packages/fineui/dist/font/iconfont.eot b/packages/fineui/dist/font/iconfont.eot index 4d687da28..30d5644ca 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 376406180..0aa415779 100644 --- a/packages/fineui/dist/font/iconfont.svg +++ b/packages/fineui/dist/font/iconfont.svg @@ -14,6 +14,20 @@ /> + + + + + + + + + + + + + + @@ -186,9 +200,9 @@ - + - + diff --git a/packages/fineui/dist/font/iconfont.ttf b/packages/fineui/dist/font/iconfont.ttf index f244d53da..243165efe 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 f866bc389..e8fb8e441 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 78fc1dbb9..2229cff55 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/base/combination/tab.js b/packages/fineui/src/base/combination/tab.js index 6f025baf4..c9f79278a 100644 --- a/packages/fineui/src/base/combination/tab.js +++ b/packages/fineui/src/base/combination/tab.js @@ -158,6 +158,10 @@ export class Tab extends Widget { return this.layout.isCardExisted(cardName); } + getAllCardIds() { + return Object.keys(this.cardMap); + } + getSelect() { return this.curr; } diff --git a/packages/fineui/src/component/treevaluechooser/abstract.treevaluechooser.js b/packages/fineui/src/component/treevaluechooser/abstract.treevaluechooser.js index 651ce58e1..cc582a3eb 100644 --- a/packages/fineui/src/component/treevaluechooser/abstract.treevaluechooser.js +++ b/packages/fineui/src/component/treevaluechooser/abstract.treevaluechooser.js @@ -169,6 +169,7 @@ export class AbstractTreeValueChooser extends Widget { value: node.value, open: true, disabled: node.disabled, + iconCls: node.iconCls, }); } } @@ -531,6 +532,7 @@ export class AbstractTreeValueChooser extends Widget { halfCheck: half, flag, disabled: node.disabled, + iconCls: node.iconCls, }); } @@ -702,6 +704,7 @@ export class AbstractTreeValueChooser extends Widget { disabled: nodes[i].disabled, title: nodes[i].title || nodes[i].text, warningTitle: nodes[i].warningTitle, + iconCls: nodes[i].iconCls, }); if (openState) { getResult(parentValues.concat([nodes[i].value]), { checked: state[0], half: state[1] }); diff --git a/packages/fineui/src/component/treevaluechooser/pane.treevaluechooser.js b/packages/fineui/src/component/treevaluechooser/pane.treevaluechooser.js index ff5aad90f..1ecd52f6c 100644 --- a/packages/fineui/src/component/treevaluechooser/pane.treevaluechooser.js +++ b/packages/fineui/src/component/treevaluechooser/pane.treevaluechooser.js @@ -15,6 +15,7 @@ export class TreeValueChooserPane extends AbstractTreeValueChooser { items: null, itemsCreator: emptyFn, showLine: true, + showIcon: false, //searcherPaneAutoShrink和searcherPaneIsSelectedAny同时为false时,返回值和非搜索状态下的树逻辑一致 searcherPaneAutoShrink: true,//其搜索树是否会判别子结点全选则取父结点的值 searcherPaneIsSelectedAny: true, //其搜索树是否返回所有被checked的结点(包括被checked的结点的子结点) @@ -28,6 +29,7 @@ export class TreeValueChooserPane extends AbstractTreeValueChooser { type: o.hideSearch ? MultiSelectTreePopup.xtype : MultiSelectTree.xtype, element: this, showLine: o.showLine, + showIcon: o.showIcon, searcherPaneIsSelectedAny: o.hideSearch || o.searcherPaneIsSelectedAny, itemsCreator: (options, callback) => { options.searcherPaneAutoShrink = o.hideSearch || o.searcherPaneAutoShrink; diff --git a/packages/fineui/src/core/2.base.js b/packages/fineui/src/core/2.base.js index fe0c611f2..fe07103c6 100644 --- a/packages/fineui/src/core/2.base.js +++ b/packages/fineui/src/core/2.base.js @@ -1518,7 +1518,7 @@ export function getTime() { } if (isNotNull(BI.timeZone)) { // BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准 - return dt.getTime() - BI.timeZone - new Date().getTimezoneOffset() * 60000; + return dt.getTime() + BI.timeZone + new Date().getTimezoneOffset() * 60000; } return dt.getTime(); diff --git a/packages/fineui/src/core/utils/dom.js b/packages/fineui/src/core/utils/dom.js index df573a746..fbee6b287 100644 --- a/packages/fineui/src/core/utils/dom.js +++ b/packages/fineui/src/core/utils/dom.js @@ -66,10 +66,10 @@ export function preloadImages(srcArray, onload) { each(srcArray, (i, src) => { images[i] = new Image(); images[i].src = src; - images[i].onload = function() { + images[i].onload = function () { complete(); }; - images[i].onerror = function() { + images[i].onerror = function () { complete(); }; }); @@ -741,8 +741,14 @@ export function getComboPosition(combo, popup, extraWidth, extraHeight, needAdap default: break; } - if (needAdaptHeight === true) { - popup.resetHeight && popup.resetHeight(Math.min(viewportBounds.height - position.top - (positionRelativeElement ? positionRelativeElement.getBoundingClientRect().top : 0), maxHeight)); + if (needAdaptHeight === true && popup.resetHeight) { + const comboRect = combo.element[0].getBoundingClientRect(); + const relativeOffset = positionRelativeElement ? positionRelativeElement.getBoundingClientRect().top : 0; + if (position.top < comboRect.top) { + popup.resetHeight(Math.min(viewportBounds.height - position.top - relativeOffset, comboRect.top, maxHeight)); + } else if (position.top >= comboRect.bottom) { + popup.resetHeight(Math.min(viewportBounds.height - position.top - relativeOffset, viewportBounds.height - comboRect.bottom, maxHeight)); + } } return position; diff --git a/packages/fineui/src/less/resource/app.less b/packages/fineui/src/less/resource/app.less index e09b2bd15..e6f29e3f9 100644 --- a/packages/fineui/src/less/resource/app.less +++ b/packages/fineui/src/less/resource/app.less @@ -25,10 +25,20 @@ body { outline: 0 none; } -div, textarea { - scrollbar-color: fade(@scroll-color, 10%) fade(@scroll-color, 5%); - scrollbar-width: thin; +@-moz-document url-prefix() { + div, textarea { + scrollbar-color: fade(@scroll-color, 10%) fade(@scroll-color, 5%); + scrollbar-width: thin; + } + .bi-theme-dark { + div, textarea { + scrollbar-color: fade(@scroll-color-theme-dark, 10%) fade(@scroll-color-theme-dark, 5%); + } + } +} + +div, textarea { &::-webkit-scrollbar { -webkit-appearance: none; width: 10px; @@ -63,8 +73,6 @@ div, textarea { .bi-theme-dark { div, textarea { - scrollbar-color: fade(@scroll-color-theme-dark, 10%) fade(@scroll-color-theme-dark, 5%); - &::-webkit-scrollbar { -webkit-appearance: none; } diff --git a/packages/fineui/src/widget/downlist/combo.downlist.js b/packages/fineui/src/widget/downlist/combo.downlist.js index 4b8a9294b..341372724 100644 --- a/packages/fineui/src/widget/downlist/combo.downlist.js +++ b/packages/fineui/src/widget/downlist/combo.downlist.js @@ -1,4 +1,4 @@ -import { shortcut, Widget, extend, createWidget, cloneDeep, some, isArray, each } from "@/core"; +import { cloneDeep, createWidget, each, extend, isArray, isNull, shortcut, some, Widget } from "@/core"; import { DownListPopup } from "./popup.downlist"; import { Combo } from "@/base"; import { IconTrigger } from "@/case"; @@ -102,7 +102,7 @@ export class DownListCombo extends Widget { this.fireEvent(DownListCombo.EVENT_SON_VALUE_CHANGE, value, fatherValue); this.downlistcombo.hideView(); }, - } + }, ], }, stopPropagation: o.stopPropagation, @@ -134,7 +134,11 @@ export class DownListCombo extends Widget { } getValue() { - return this.popupView.getValue(); + if (isNull(this.popupView)) { + return this.options.value; + } else { + return this.popupView.getValue(); + } } adjustWidth() { diff --git a/packages/fineui/src/widget/multiselect/multiselect.insert.combo.js b/packages/fineui/src/widget/multiselect/multiselect.insert.combo.js index 9a047fbd0..25ebc9feb 100644 --- a/packages/fineui/src/widget/multiselect/multiselect.insert.combo.js +++ b/packages/fineui/src/widget/multiselect/multiselect.insert.combo.js @@ -31,7 +31,8 @@ import { pushDistinct, Selection, SIZE_CONSANTS, - BlankSplitChar + BlankSplitChar, + size, } from "@/core"; import { Single, Combo, Msg } from "@/base"; import { MultiSelectBar, TriggerIconButton } from "@/case"; @@ -215,7 +216,19 @@ export class MultiSelectInsertCombo extends Single { }, } ], - itemsCreator: o.itemsCreator, + itemsCreator: (op, callback) => { + o.itemsCreator(op, ob => { + callback(ob); + // 全选时数据变化,配置需要同步 + if (op.times === 1 &&this.storeValue.type === Selection.All && size(ob.items) !== size(this.storeValue.assist)) { + this._dataChange = true; + this.storeValue.assist = map(ob.items, 'value'); + this._adjust(() => { + assertShowValue(); + }); + } + }); + }, valueFormatter: o.valueFormatter, itemFormatter: o.itemFormatter, itemHeight: o.itemHeight, diff --git a/packages/fineui/src/widget/multiselect/trigger/editor.multiselect.js b/packages/fineui/src/widget/multiselect/trigger/editor.multiselect.js index 3391c22a8..896549dfc 100644 --- a/packages/fineui/src/widget/multiselect/trigger/editor.multiselect.js +++ b/packages/fineui/src/widget/multiselect/trigger/editor.multiselect.js @@ -1,4 +1,15 @@ -import { shortcut, Widget, extend, i18nText, createWidget, Controller, isEmptyString, isEmptyArray, BlankSplitChar } from "@/core"; +import { + shortcut, + Widget, + extend, + i18nText, + createWidget, + Controller, + isEmptyString, + isEmptyArray, + BlankSplitChar, + first, last, isNotEmptyString +} from "@/core"; import { StateEditor } from "@/case"; import { SelectPatchEditor } from "./editor/editor.patch"; @@ -77,8 +88,13 @@ export class MultiSelectEditor extends Widget { getKeywords() { const val = this.editor.getValue(); let keywords = val.split(/\u200b\s\u200b/); - if (isEmptyString(keywords[keywords.length - 1])) { - keywords = keywords.slice(0, keywords.length - 1); + if (isEmptyString(first(keywords)) || isEmptyString(last(keywords))) { + keywords = keywords.filter((word, index) => { + if (index === 0 || index === keywords.length - 1) { + return isNotEmptyString(word); + } + return true; + }); } if (/\u200b\s\u200b$/.test(val)) { return keywords.concat([BlankSplitChar]); diff --git a/packages/fineui/src/widget/multiselecttree/multiselecttree.js b/packages/fineui/src/widget/multiselecttree/multiselecttree.js index 1047a9601..779e86d7a 100644 --- a/packages/fineui/src/widget/multiselecttree/multiselecttree.js +++ b/packages/fineui/src/widget/multiselecttree/multiselecttree.js @@ -30,6 +30,7 @@ export class MultiSelectTree extends Single { type: MultiSelectTreePopup.xtype, itemsCreator: o.itemsCreator, showLine: o.showLine, + showIcon: o.showIcon, }); this.adapter.on(MultiSelectTreePopup.EVENT_CHANGE, () => { if (self.searcher.isSearching()) { @@ -45,6 +46,7 @@ export class MultiSelectTree extends Single { this.searcherPane = createWidget({ type: MultiTreeSearchPane.xtype, cls: "bi-border-left bi-border-right bi-border-bottom", + showIcon: o.showIcon, isSelectedAny: o.searcherPaneIsSelectedAny, keywordGetter() { return self.searcher.getKeyword(); diff --git a/packages/fineui/src/widget/multiselecttree/multiselecttree.popup.js b/packages/fineui/src/widget/multiselecttree/multiselecttree.popup.js index 3782d209b..1c45ceb3b 100644 --- a/packages/fineui/src/widget/multiselecttree/multiselecttree.popup.js +++ b/packages/fineui/src/widget/multiselecttree/multiselecttree.popup.js @@ -22,6 +22,7 @@ export class MultiSelectTreePopup extends Widget { this.popup = createWidget({ type: AsyncTree.xtype, showLine: o.showLine, + showIcon: o.showIcon, element: this, itemsCreator: o.itemsCreator, }); diff --git a/packages/fineui/src/widget/multitree/trigger/multi.tree.search.pane.js b/packages/fineui/src/widget/multitree/trigger/multi.tree.search.pane.js index 01bb92499..d947b8d82 100644 --- a/packages/fineui/src/widget/multitree/trigger/multi.tree.search.pane.js +++ b/packages/fineui/src/widget/multitree/trigger/multi.tree.search.pane.js @@ -31,6 +31,7 @@ export class MultiTreeSearchPane extends Pane { opts.itemsCreator(op, callback); }, value: opts.value, + showIcon: opts.showIcon, listeners: [ { eventName: Controller.EVENT_CHANGE, diff --git a/packages/fineui/typescript/base/combination/tab.ts b/packages/fineui/typescript/base/combination/tab.ts index fa4cc8b25..dbb4c907a 100644 --- a/packages/fineui/typescript/base/combination/tab.ts +++ b/packages/fineui/typescript/base/combination/tab.ts @@ -31,4 +31,6 @@ export declare class Tab extends Widget { populate(): void; isCardExisted(cardName: string): boolean; + + getAllCardIds(): string[]; }