diff --git a/packages/fineui/src/base/combination/loader.js b/packages/fineui/src/base/combination/loader.js index 95081f18b..4706d4c2a 100644 --- a/packages/fineui/src/base/combination/loader.js +++ b/packages/fineui/src/base/combination/loader.js @@ -181,7 +181,7 @@ export class Loader extends Widget { isEmpty(optionsItems) && nextTick( bind(() => { - isDefaultInit && isEmpty(optionsItems) && this._populate(); + isDefaultInit && isEmpty(this.options.items) && this._populate(); }, this) ); const items = isFunction(optionsItems) diff --git a/packages/fineui/src/base/single/button/listitem/icontextitem.js b/packages/fineui/src/base/single/button/listitem/icontextitem.js index fb0f36b46..1690e75a1 100644 --- a/packages/fineui/src/base/single/button/listitem/icontextitem.js +++ b/packages/fineui/src/base/single/button/listitem/icontextitem.js @@ -59,6 +59,7 @@ export class IconTextItem extends BasicButton { lgap: o.textLgap, rgap: o.textRgap, text: o.text, + title: o.title, value: o.value, keyword: o.keyword, height: o.height, diff --git a/packages/fineui/src/base/single/input/file.js b/packages/fineui/src/base/single/input/file.js index 5c33d99b0..c89a02e70 100644 --- a/packages/fineui/src/base/single/input/file.js +++ b/packages/fineui/src/base/single/input/file.js @@ -541,7 +541,7 @@ export class File extends Widget { // We can still show some information } this.fireEvent(File.EVENT_PROGRESS, { - file: this.file, + file: _wrap.file, total: rpe.total, loaded: rpe.loaded, simulation: rpe.simulation, diff --git a/packages/fineui/src/case/combo/textvaluecombo/combo.textvalue.js b/packages/fineui/src/case/combo/textvaluecombo/combo.textvalue.js index 8139a1524..dce27ea81 100644 --- a/packages/fineui/src/case/combo/textvaluecombo/combo.textvalue.js +++ b/packages/fineui/src/case/combo/textvaluecombo/combo.textvalue.js @@ -144,8 +144,8 @@ export class TextValueCombo extends Widget { return { type: Combo.xtype, - height: toPix(o.height, 2), - width: toPix(o.width, 2), + height: toPix(o.height, o.simple ? 1 : 2), + width: toPix(o.width, o.simple ? 0 : 2), ref: ref => (this.combo = ref), container: o.container, direction: o.direction, diff --git a/packages/fineui/src/case/ztree/asynctree.js b/packages/fineui/src/case/ztree/asynctree.js index f9b5bf6b6..7921ef821 100644 --- a/packages/fineui/src/case/ztree/asynctree.js +++ b/packages/fineui/src/case/ztree/asynctree.js @@ -1,7 +1,19 @@ -import { cjkEncodeDO, deepClone, each, extend, isEmpty, isNotNull, isNull, shortcut } from "@/core"; +import { + cjkEncodeDO, + deepClone, + each, + extend, + isEmpty, + isNotNull, + isNull, + shortcut, + AbsoluteLayout, + createWidget, +} from "@/core"; import { TreeView } from "./treeview"; import { TreeRenderPageService } from "./treerender.page.service"; import $ from "jquery"; +import { IconLabel } from "@/base"; @shortcut() export class AsyncTree extends TreeView { @@ -197,7 +209,34 @@ export class AsyncTree extends TreeView { }, options ); - o.itemsCreator(op, complete); + + let loadingIcon; + createWidget({ + type: AbsoluteLayout.xtype, + element: self.element.find(`#${treeNode.tId}`), + css: { + position: "relative", + }, + items: [ + { + el: { + type: IconLabel.xtype, + width: 20, + height: 20, + cls: "button-loading-font anim-rotate bi-card", + ref: ref => { + loadingIcon = ref; + }, + }, + left: 5, + top: 5, + }, + ], + }); + o.itemsCreator(op, (...args) => { + complete.apply(this, args); + loadingIcon.destroy(); + }); } // 展开节点会将halfCheck置为false以开启自动计算半选, 所以第一次展开节点的时候需要在置为false之前获取配置 diff --git a/packages/fineui/src/case/ztree/parttree.js b/packages/fineui/src/case/ztree/parttree.js index 266e0d6b9..d31610099 100644 --- a/packages/fineui/src/case/ztree/parttree.js +++ b/packages/fineui/src/case/ztree/parttree.js @@ -24,7 +24,7 @@ export class PartTree extends AsyncTree { constructor(...args) { super(...args); - this.seMethos = super._selectTreeNode; + this.seMethos = AsyncTree.superclass._selectTreeNode; } _loadMore() { diff --git a/packages/fineui/src/core/func/alias.js b/packages/fineui/src/core/func/alias.js index c2ddbb28f..fc0eaa772 100644 --- a/packages/fineui/src/core/func/alias.js +++ b/packages/fineui/src/core/func/alias.js @@ -637,7 +637,7 @@ export const getEncodeURL = function(urlTemplate, param) { export const encodeURIComponent = function(url) { const specialCharsMap = getSpecialCharsMap(); - url = url || ""; + url = url ?? ""; url = replaceAll(`${url}`, keys(specialCharsMap || []).join("|"), str => { switch (str) { case "\\": diff --git a/packages/fineui/src/less/base/single/button/button.less b/packages/fineui/src/less/base/single/button/button.less index d404edd24..6d96e3c83 100644 --- a/packages/fineui/src/less/base/single/button/button.less +++ b/packages/fineui/src/less/base/single/button/button.less @@ -479,8 +479,8 @@ body .bi-button, #body .bi-button { } } -.bi-theme-dark { - .bi-button, #body .bi-button { +.bi-theme-dark, #body .bi-theme-dark { + .bi-button { &.button-ignore { background-color: @color-bi-background-ignore-button-theme-dark; &:hover, &:focus { diff --git a/packages/fineui/src/widget/downlist/item.downlist.js b/packages/fineui/src/widget/downlist/item.downlist.js index 8a222f980..6e27674ec 100644 --- a/packages/fineui/src/widget/downlist/item.downlist.js +++ b/packages/fineui/src/widget/downlist/item.downlist.js @@ -39,6 +39,7 @@ export class DownListItem extends BasicButton { lgap: o.textLgap, rgap: o.textRgap, text: o.text, + title: o.title, value: o.value, keyword: o.keyword, height: o.height, diff --git a/packages/fineui/src/widget/downlist/item.downlistgroup.js b/packages/fineui/src/widget/downlist/item.downlistgroup.js index 8bc1d6094..afd200dcd 100644 --- a/packages/fineui/src/widget/downlist/item.downlistgroup.js +++ b/packages/fineui/src/widget/downlist/item.downlistgroup.js @@ -42,6 +42,7 @@ export class DownListGroupItem extends BasicButton { cls: "list-group-item-text", textAlign: "left", text: o.text, + title: o.title, value: o.value, height: o.height, }); diff --git a/packages/fineui/src/widget/downlist/popup.downlist.js b/packages/fineui/src/widget/downlist/popup.downlist.js index b598ea65d..c4171246c 100644 --- a/packages/fineui/src/widget/downlist/popup.downlist.js +++ b/packages/fineui/src/widget/downlist/popup.downlist.js @@ -1,5 +1,6 @@ import { ButtonTree, Pane } from "@/base"; import { + Selection, VerticalLayout, Layout, shortcut, diff --git a/packages/fineui/src/widget/dynamicdatetime/dynamicdatetime.combo.js b/packages/fineui/src/widget/dynamicdatetime/dynamicdatetime.combo.js index 97f916acb..3ac88d788 100644 --- a/packages/fineui/src/widget/dynamicdatetime/dynamicdatetime.combo.js +++ b/packages/fineui/src/widget/dynamicdatetime/dynamicdatetime.combo.js @@ -31,29 +31,19 @@ export class DynamicDateTimeCombo extends Single { iconWidth: 24 }; - props = () => { - const date = getDate(); - return { - baseCls: "bi-dynamic-date--time-combo", - height: 24, - minDate: "1900-01-01", - maxDate: "2099-12-31", - format: "", - allowEdit: true, - supportDynamic: true, - attributes: { - tabIndex: -1 - }, - isNeedAdjustHeight: false, - isNeedAdjustWidth: false, - value: { - type: DynamicDateTimeCombo.Static, - value: { - year: date.getFullYear(), - month: date.getMonth() + 1 - } - } - }; + props = { + baseCls: "bi-dynamic-date--time-combo", + height: 24, + minDate: "1900-01-01", + maxDate: "2099-12-31", + format: "", + allowEdit: true, + supportDynamic: true, + attributes: { + tabIndex: -1, + }, + isNeedAdjustHeight: false, + isNeedAdjustWidth: false, }; static EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; diff --git a/packages/fineui/src/widget/editor/editor.search.js b/packages/fineui/src/widget/editor/editor.search.js index 00909258f..e0387b342 100644 --- a/packages/fineui/src/widget/editor/editor.search.js +++ b/packages/fineui/src/widget/editor/editor.search.js @@ -69,6 +69,7 @@ export class SearchEditor extends Widget { quitChecker: o.quitChecker, value: o.value, autoTrim: o.autoTrim, + autocomplete: o.autocomplete }); this.clear = createWidget({ type: IconButton.xtype, diff --git a/packages/fineui/src/widget/index.js b/packages/fineui/src/widget/index.js index b378d16ad..365447f78 100644 --- a/packages/fineui/src/widget/index.js +++ b/packages/fineui/src/widget/index.js @@ -7,6 +7,7 @@ export { MultiTreeInsertCombo } from "./multitree/multi.tree.insert.combo"; export { MultiTreeListCombo } from "./multitree/multi.tree.list.combo"; export { NumberEditor } from "./numbereditor/number.editor"; export { NumberInterval } from "./numberinterval/numberinterval"; +export { NumberIntervalSingleEidtor } from "./numberinterval/singleeditor/single.editor"; export { YearMonthInterval } from "./yearmonthinterval/yearmonthinterval"; export { YearQuarterInterval } from "./yearquarterinterval/yearquarterinterval"; export { YearInterval } from "./yearinterval/yearinterval"; diff --git a/packages/fineui/src/widget/multitree/trigger/multi.tree.search.insert.pane.js b/packages/fineui/src/widget/multitree/trigger/multi.tree.search.insert.pane.js index 6ae93d971..454e1daf9 100644 --- a/packages/fineui/src/widget/multitree/trigger/multi.tree.search.insert.pane.js +++ b/packages/fineui/src/widget/multitree/trigger/multi.tree.search.insert.pane.js @@ -11,6 +11,10 @@ export class MultiTreeSearchInsertPane extends Widget { el: { type: PartTree.xtype }, }; + static CONSTANTS = { + height: 24, + }; + static EVENT_CHANGE = "EVENT_CHANGE"; static EVENT_CLICK_CONFIRM = "EVENT_CLICK_CONFIRM"; static EVENT_CLICK_CLEAR = "EVENT_CLICK_CLEAR"; @@ -32,7 +36,7 @@ export class MultiTreeSearchInsertPane extends Widget { self.addTip = _ref; }, text: i18nText("BI-Basic_Click_To_Add_Text", ""), - height: this.constants.height, + height: MultiTreeSearchInsertPane.CONSTANTS.height, cls: "bi-high-light", handler() { self.fireEvent(MultiTreeSearchInsertPane.EVENT_ADD_ITEM, opts.keywordGetter()); diff --git a/packages/fineui/src/widget/multitree/trigger/searcher.list.multi.tree.js b/packages/fineui/src/widget/multitree/trigger/searcher.list.multi.tree.js index 0c6bcf7e0..d38fd3436 100644 --- a/packages/fineui/src/widget/multitree/trigger/searcher.list.multi.tree.js +++ b/packages/fineui/src/widget/multitree/trigger/searcher.list.multi.tree.js @@ -1,4 +1,4 @@ -import { shortcut, Widget, extend, emptyFn, createWidget, isNotNull, isNumber, size, each, last, Selection } from "@/core"; +import { shortcut, Widget, extend, emptyFn, createWidget, isNotNull, isNumber, size, each, last, Selection, isObject } from "@/core"; import { MultiSelectEditor } from "../../multiselect/trigger/editor.multiselect"; import { MultiSelectSearcher } from "../../multiselect/trigger/searcher.multiselect"; import { Searcher } from "@/base"; @@ -137,7 +137,7 @@ export class MultiListTreeSearcher extends Widget { setState(ob) { const o = this.options; ob || (ob = {}); - ob.value || (ob.value = []); + isObject(ob) && (ob.value || (ob.value = [])); let count = 0; if (isNumber(ob)) { this.editor.setState(ob); diff --git a/packages/fineui/src/widget/multitree/trigger/searcher.multi.tree.js b/packages/fineui/src/widget/multitree/trigger/searcher.multi.tree.js index 555e579fd..518dff408 100644 --- a/packages/fineui/src/widget/multitree/trigger/searcher.multi.tree.js +++ b/packages/fineui/src/widget/multitree/trigger/searcher.multi.tree.js @@ -11,7 +11,8 @@ import { each, isEmptyObject, Func, - Selection + Selection, + isObject } from "@/core"; import { MultiSelectEditor } from "../../multiselect/trigger/editor.multiselect"; import { MultiSelectSearcher } from "../../multiselect/trigger/searcher.multiselect"; @@ -165,7 +166,7 @@ export class MultiTreeSearcher extends Widget { setState(ob) { const o = this.options; ob || (ob = {}); - ob.value || (ob.value = {}); + isObject(ob) && (ob.value || (ob.value = {})); let count = 0; if (isNumber(ob)) { this.editor.setState(ob); diff --git a/packages/fineui/webpack/webpack.prod.js b/packages/fineui/webpack/webpack.prod.js index 2fc6ceb37..d1d7b9ffc 100644 --- a/packages/fineui/webpack/webpack.prod.js +++ b/packages/fineui/webpack/webpack.prod.js @@ -10,12 +10,14 @@ module.exports = merge(common, { entry: { "fineui.min": attachments.fineui, "fineui.worker.min": attachments.fineuiForWorker, - "fineui.worker": attachments.fineuiForWorker + "fineui.worker": attachments.fineuiForWorker, + "fineui_without_jquery_polyfill.min":attachments.fineuiForWorker, }, output: { path: dirs.DEST, - filename: "[name].js" + filename: "[name].js", + publicPath: "" }, devtool: "hidden-source-map"