diff --git a/packages/fineui/src/base/combination/expander.js b/packages/fineui/src/base/combination/expander.js index bbca8fadd..ad418a0f9 100644 --- a/packages/fineui/src/base/combination/expander.js +++ b/packages/fineui/src/base/combination/expander.js @@ -276,7 +276,7 @@ export class Expander extends Widget { } _setEnable(arg) { - super._setEnable(arguments); + super._setEnable(...arguments); !arg && this.element.removeClass(this.options.hoverClass); !arg && this.isViewVisible() && this._hideView(); } @@ -341,6 +341,6 @@ export class Expander extends Widget { } destroy() { - super.destroy(arguments); + super.destroy(...arguments); } } diff --git a/packages/fineui/src/base/combination/group.button.js b/packages/fineui/src/base/combination/group.button.js index 16894a283..1b228d4e6 100644 --- a/packages/fineui/src/base/combination/group.button.js +++ b/packages/fineui/src/base/combination/group.button.js @@ -418,12 +418,12 @@ export class ButtonGroup extends Widget { } empty() { - super.empty(arguments); + super.empty(...arguments); this.options.items = []; } destroy() { - super.destroy(arguments); + super.destroy(...arguments); this.options.items = []; } } diff --git a/packages/fineui/src/base/combination/loader.js b/packages/fineui/src/base/combination/loader.js index 14ec167bc..95081f18b 100644 --- a/packages/fineui/src/base/combination/loader.js +++ b/packages/fineui/src/base/combination/loader.js @@ -342,6 +342,6 @@ export class Loader extends Widget { } destroy() { - super.destroy(arguments); + super.destroy(...arguments); } } diff --git a/packages/fineui/src/base/combination/navigation.js b/packages/fineui/src/base/combination/navigation.js index 7a5e88faf..f79df33a2 100644 --- a/packages/fineui/src/base/combination/navigation.js +++ b/packages/fineui/src/base/combination/navigation.js @@ -191,6 +191,6 @@ export class Navigation extends Widget { } destroy() { - super.destroy(arguments); + super.destroy(...arguments); } } diff --git a/packages/fineui/src/base/combination/switcher.js b/packages/fineui/src/base/combination/switcher.js index 85e4a8083..dfb0c1da9 100644 --- a/packages/fineui/src/base/combination/switcher.js +++ b/packages/fineui/src/base/combination/switcher.js @@ -263,7 +263,7 @@ export class Switcher extends Widget { } _setEnable(arg) { - super._setEnable(arguments); + super._setEnable(...arguments); !arg && this.isViewVisible() && this._hideView(); } diff --git a/packages/fineui/src/base/combination/tab.js b/packages/fineui/src/base/combination/tab.js index b00554dcd..6f025baf4 100644 --- a/packages/fineui/src/base/combination/tab.js +++ b/packages/fineui/src/base/combination/tab.js @@ -200,6 +200,6 @@ export class Tab extends Widget { destroy() { this.cardMap = {}; - super.destroy(arguments); + super.destroy(...arguments); } } diff --git a/packages/fineui/src/base/index.js b/packages/fineui/src/base/index.js index e5c6dcdb5..da9f8a0c0 100644 --- a/packages/fineui/src/base/index.js +++ b/packages/fineui/src/base/index.js @@ -11,3 +11,4 @@ export * from "./layer"; export * from "./list"; export * from "./single"; export * from "./el"; +export * from "./context"; \ No newline at end of file diff --git a/packages/fineui/src/base/single/0.single.js b/packages/fineui/src/base/single/0.single.js index 6d2408b4f..d113ef908 100644 --- a/packages/fineui/src/base/single/0.single.js +++ b/packages/fineui/src/base/single/0.single.js @@ -72,7 +72,7 @@ export class Single extends Widget { this.setValue(newValue); }) : value; - super._init(arguments); + super._init(...arguments); } _mounted() { diff --git a/packages/fineui/src/base/single/button/button.basic.js b/packages/fineui/src/base/single/button/button.basic.js index 825b0bf91..210218c37 100644 --- a/packages/fineui/src/base/single/button/button.basic.js +++ b/packages/fineui/src/base/single/button/button.basic.js @@ -69,7 +69,7 @@ export class BasicButton extends Single { this.setSelected(newValue); }) : opts.selected; - super._init(arguments); + super._init(...arguments); if (opts.shadow) { this._createShadow(); diff --git a/packages/fineui/src/base/single/editor/editor.textarea.js b/packages/fineui/src/base/single/editor/editor.textarea.js index 4152af588..f0d306bbd 100644 --- a/packages/fineui/src/base/single/editor/editor.textarea.js +++ b/packages/fineui/src/base/single/editor/editor.textarea.js @@ -279,7 +279,7 @@ export class TextAreaEditor extends Single { } _setValid(b) { - super._setValid(arguments); + super._setValid(...arguments); // this.content.setValid(b); // this.watermark && this.watermark.setValid(b); } diff --git a/packages/fineui/src/base/single/input/checkbox/checkbox.js b/packages/fineui/src/base/single/input/checkbox/checkbox.js index 1cf223924..e943c00ad 100644 --- a/packages/fineui/src/base/single/input/checkbox/checkbox.js +++ b/packages/fineui/src/base/single/input/checkbox/checkbox.js @@ -52,7 +52,7 @@ export class Checkbox extends BasicButton { } doClick() { - super.doClick(arguments); + super.doClick(...arguments); if (this.isValid()) { this.fireEvent(Checkbox.EVENT_CHANGE); } diff --git a/packages/fineui/src/base/single/input/file.js b/packages/fineui/src/base/single/input/file.js index 0b1bb059e..5c33d99b0 100644 --- a/packages/fineui/src/base/single/input/file.js +++ b/packages/fineui/src/base/single/input/file.js @@ -759,7 +759,7 @@ export class File extends Widget { } _setEnable(enable) { - super._setEnable(arguments); + super._setEnable(...arguments); if (enable === true) { this.element.removeAttr("disabled"); } else { diff --git a/packages/fineui/src/base/single/input/input.js b/packages/fineui/src/base/single/input/input.js index 9ca0207f5..fb950aaed 100644 --- a/packages/fineui/src/base/single/input/input.js +++ b/packages/fineui/src/base/single/input/input.js @@ -344,7 +344,7 @@ export class Input extends Single { } _setValid() { - super._setValid(arguments); + super._setValid(...arguments); if (this.isValid()) { this._lastChangedValue = this.getValue(); this.element.removeClass("bi-input-error"); diff --git a/packages/fineui/src/base/single/input/radio/radio.image.js b/packages/fineui/src/base/single/input/radio/radio.image.js index 6c939eba1..2d807cb82 100644 --- a/packages/fineui/src/base/single/input/radio/radio.image.js +++ b/packages/fineui/src/base/single/input/radio/radio.image.js @@ -28,7 +28,7 @@ export class ImageRadio extends IconButton { } doClick() { - super.doClick(arguments); + super.doClick(...arguments); if (this.isValid()) { this.fireEvent(ImageRadio.EVENT_CHANGE); } diff --git a/packages/fineui/src/base/single/input/radio/radio.js b/packages/fineui/src/base/single/input/radio/radio.js index 041255355..fa6a10401 100644 --- a/packages/fineui/src/base/single/input/radio/radio.js +++ b/packages/fineui/src/base/single/input/radio/radio.js @@ -51,7 +51,7 @@ export class Radio extends BasicButton { } doClick() { - super.doClick(arguments); + super.doClick(...arguments); if (this.isValid()) { this.fireEvent(Radio.EVENT_CHANGE); } diff --git a/packages/fineui/src/bundle.js b/packages/fineui/src/bundle.js index 7d9f259d1..a7e875954 100644 --- a/packages/fineui/src/bundle.js +++ b/packages/fineui/src/bundle.js @@ -5,12 +5,15 @@ import {_defineVarProperties} from "@/core/constant/writable.var"; _global.BI = _global.BI || {}; +// for fr, 已经有的就不对外暴露了. +// 要知道BI只有`BI.$`, 挂在全局对象上的只是为了兼容而已 +if (!_global.$ && !_global.jQuery) { + _global.jQuery = _global.$ = fuiExport.$; +} Object.assign(_global, { Fix: fuiExport.Fix, _: fuiExport._, - $: fuiExport.$, - jQuery: fuiExport.$, }); Object.assign(_global.BI, fuiExport, injectFn); diff --git a/packages/fineui/src/case/ztree/list/listasynctree.js b/packages/fineui/src/case/ztree/list/listasynctree.js index 716d6c79e..f3ec1214d 100644 --- a/packages/fineui/src/case/ztree/list/listasynctree.js +++ b/packages/fineui/src/case/ztree/list/listasynctree.js @@ -11,7 +11,7 @@ import $ from "jquery"; */ @shortcut() -export class Listasynctree extends Listtreeview { +export class ListAsyncTree extends ListTreeView { static xtype = "bi.list_async_tree"; // 配置属性 diff --git a/packages/fineui/src/case/ztree/list/listparttree.js b/packages/fineui/src/case/ztree/list/listparttree.js index 9ec25d2f0..8bcae708f 100644 --- a/packages/fineui/src/case/ztree/list/listparttree.js +++ b/packages/fineui/src/case/ztree/list/listparttree.js @@ -11,7 +11,7 @@ import $ from "jquery"; */ @shortcut() -export class ListPartTree extends Listasynctree { +export class ListPartTree extends ListAsyncTree { static xtype = "bi.list_part_tree"; _loadMore() { diff --git a/packages/fineui/src/case/ztree/list/listtreeview.js b/packages/fineui/src/case/ztree/list/listtreeview.js index b7ec3aaa7..b6955e3de 100644 --- a/packages/fineui/src/case/ztree/list/listtreeview.js +++ b/packages/fineui/src/case/ztree/list/listtreeview.js @@ -11,7 +11,7 @@ import $ from "jquery"; */ @shortcut() -export class Listtreeview extends TreeView { +export class ListTreeView extends TreeView { static xtype = "bi.list_tree_view"; _constants = { diff --git a/packages/fineui/src/case/ztree/parttree.js b/packages/fineui/src/case/ztree/parttree.js index 2a93dd7bb..266e0d6b9 100644 --- a/packages/fineui/src/case/ztree/parttree.js +++ b/packages/fineui/src/case/ztree/parttree.js @@ -16,6 +16,12 @@ export class PartTree extends AsyncTree { static EVENT_CLICK_TREE_NODE = "EVENT_CLICK_TREE_NODE"; + _defaultConfig() { + return extend(super._defaultConfig(...arguments), { + isSelectedAny: true, //是否返回所有被checked的结点(包括被checked的结点的子结点) + }); + } + constructor(...args) { super(...args); this.seMethos = super._selectTreeNode; @@ -55,8 +61,11 @@ export class PartTree extends AsyncTree { const name = this._getNodeValue(treeNode); this.fireEvent(PartTree.EVENT_CLICK_TREE_NODE); if (treeNode.checked === true) { - this.options.paras.selectedValues = this._getUnionValue(); - // this._buildTree(self.options.paras.selectedValues, concat(parentValues, name)); + if (this.options.isSelectedAny) { + this.options.paras.selectedValues = this._getUnionValue(); //获取所有被selected的结点 + } else { + this._addTreeNode(this.options.paras.selectedValues, parentValues, name, {});//给selectedValues增加被click的结点(不包含该节点的子结点) + } o.itemsCreator( extend({}, o.paras, { type: TreeView.REQ_TYPE_ADJUST_DATA, diff --git a/packages/fineui/src/case/ztree/tree.list.display.js b/packages/fineui/src/case/ztree/tree.list.display.js index 9add974f5..85720f3d4 100644 --- a/packages/fineui/src/case/ztree/tree.list.display.js +++ b/packages/fineui/src/case/ztree/tree.list.display.js @@ -10,7 +10,7 @@ import $ from "jquery"; */ @shortcut() -export class ListDisplayTree extends Listtreeview { +export class ListDisplayTree extends ListTreeView { static xtype = "bi.list_display_tree"; static EVENT_CHANGE = "EVENT_CHANGE"; diff --git a/packages/fineui/src/component/treevaluechooser/abstract.treevaluechooser.js b/packages/fineui/src/component/treevaluechooser/abstract.treevaluechooser.js index 87e23cb84..90bf612d4 100644 --- a/packages/fineui/src/component/treevaluechooser/abstract.treevaluechooser.js +++ b/packages/fineui/src/component/treevaluechooser/abstract.treevaluechooser.js @@ -174,6 +174,7 @@ export class AbstractTreeValueChooser extends Widget { } _reqSelectedTreeNode(op, callback) { + const self = this; const selectedValues = deepClone(op.selectedValues); const notSelectedValue = op.notSelectedValue || {}; const keyword = op.keyword || ""; @@ -188,7 +189,7 @@ export class AbstractTreeValueChooser extends Widget { dealWithSelectedValues(selectedValues); callback(selectedValues); - const dealWithSelectedValues = selectedValues => { + function dealWithSelectedValues(selectedValues) { let p = parentValues.concat(notSelectedValue); // 存储的值中存在这个值就把它删掉 // 例如选中了中国-江苏-南京, 取消中国或江苏或南京 @@ -197,18 +198,18 @@ export class AbstractTreeValueChooser extends Widget { // 如果搜索的值在父亲链中 if (isSearchValueInParent(p)) { // 例如选中了 中国-江苏, 搜索江苏, 取消江苏(干掉了江苏) - this._deleteNode(selectedValues, p); + self._deleteNode(selectedValues, p); } else { const searched = []; // 要找到所有以notSelectedValue为叶子节点的链路 const find = search(parentValues, notSelectedValue, [], searched); if (find && isNotEmptyArray(searched)) { each(searched, (i, arr) => { - const node = this._getNode(selectedValues, arr); + const node = self._getNode(selectedValues, arr); if (node) { // 例如选中了 中国-江苏, 搜索江苏, 取消中国(实际上只想删除中国-江苏,因为搜的是江苏) // 例如选中了 中国-江苏-南京,搜索南京,取消中国(实际上只想删除中国-江苏-南京,因为搜的是南京) - this._deleteNode(selectedValues, arr); + self._deleteNode(selectedValues, arr); } else { // 例如选中了 中国-江苏,搜索南京,取消中国(实际上只想删除中国-江苏-南京,因为搜的是南京) expandSelectedValue(selectedValues, arr, last(arr)); @@ -239,14 +240,14 @@ export class AbstractTreeValueChooser extends Widget { // 添加去掉搜索的结果集 if (result.length > 0) { each(result, (i, strs) => { - this._buildTree(selectedValues, strs); + self._buildTree(selectedValues, strs); }); } } } }; - const expandSelectedValue = (selectedValues, parents, notSelectedValue) => { + function expandSelectedValue(selectedValues, parents, notSelectedValue) { let next = selectedValues; const childrenCount = []; const path = []; @@ -259,7 +260,7 @@ export class AbstractTreeValueChooser extends Widget { } if (isEmpty(next)) { const split = parents.slice(0, i); - const expanded = this._getChildren(split); + const expanded = self._getChildren(split); path.push(split); childrenCount.push(expanded.length); // 如果只有一个值且取消的就是这个值 @@ -270,7 +271,7 @@ export class AbstractTreeValueChooser extends Widget { ) { for (let j = childrenCount.length - 1; j >= 0; j--) { if (childrenCount[j] === 1) { - this._deleteNode(selectedValues, path[j]); + self._deleteNode(selectedValues, path[j]); } else { break; } @@ -295,16 +296,16 @@ export class AbstractTreeValueChooser extends Widget { }); }; - const search = (parents, current, result, searched) => { + function search(parents, current, result, searched) { const newParents = clone(parents); newParents.push(current); - if (this._isMatch(parents, current, keyword)) { + if (self._isMatch(parents, current, keyword)) { searched && searched.push(newParents); return true; } - const children = this._getChildren(newParents); + const children = self._getChildren(newParents); const notSearch = []; let can = false; @@ -327,9 +328,9 @@ export class AbstractTreeValueChooser extends Widget { return can; }; - const isSearchValueInParent = parentValues => { + function isSearchValueInParent(parentValues) { for (let i = 0, len = parentValues.length; i < len; i++) { - if (this._isMatch(parentValues.slice(0, i), parentValues[i], keyword)) { + if (self._isMatch(parentValues.slice(0, i), parentValues[i], keyword)) { return true; } } @@ -389,7 +390,7 @@ export class AbstractTreeValueChooser extends Widget { each(selected, (k, v) => { const p = clone(parents); p.push(k); - if (!dealWithSelectedValues(selected[k], p)) { + if (!dealWithSelectedValues(selected[k], p) || op.searcherPaneAutoShrink === false) { each(selected[k], (nk, nv) => { const t = clone(p); t.push(nk); diff --git a/packages/fineui/src/component/treevaluechooser/abstract.treevaluechooser.list.js b/packages/fineui/src/component/treevaluechooser/abstract.treevaluechooser.list.js index 9c84e13ba..d3afdae79 100644 --- a/packages/fineui/src/component/treevaluechooser/abstract.treevaluechooser.list.js +++ b/packages/fineui/src/component/treevaluechooser/abstract.treevaluechooser.list.js @@ -31,7 +31,7 @@ export class AbstractListTreeValueChooser extends AbstractTreeValueChooser { return; } - doCheck([], this.tree.getRoot(), selectedValues); + doCheck.call(this, [], this.tree.getRoot(), selectedValues); callback({ items: values(result), diff --git a/packages/fineui/src/component/treevaluechooser/pane.treevaluechooser.js b/packages/fineui/src/component/treevaluechooser/pane.treevaluechooser.js index aad0bf08d..ff5aad90f 100644 --- a/packages/fineui/src/component/treevaluechooser/pane.treevaluechooser.js +++ b/packages/fineui/src/component/treevaluechooser/pane.treevaluechooser.js @@ -15,6 +15,9 @@ export class TreeValueChooserPane extends AbstractTreeValueChooser { items: null, itemsCreator: emptyFn, showLine: true, + //searcherPaneAutoShrink和searcherPaneIsSelectedAny同时为false时,返回值和非搜索状态下的树逻辑一致 + searcherPaneAutoShrink: true,//其搜索树是否会判别子结点全选则取父结点的值 + searcherPaneIsSelectedAny: true, //其搜索树是否返回所有被checked的结点(包括被checked的结点的子结点) }); } @@ -25,7 +28,11 @@ export class TreeValueChooserPane extends AbstractTreeValueChooser { type: o.hideSearch ? MultiSelectTreePopup.xtype : MultiSelectTree.xtype, element: this, showLine: o.showLine, - itemsCreator: bind(this._itemsCreator, this), + searcherPaneIsSelectedAny: o.hideSearch || o.searcherPaneIsSelectedAny, + itemsCreator: (options, callback) => { + options.searcherPaneAutoShrink = o.hideSearch || o.searcherPaneAutoShrink; + this._itemsCreator.call(this, options, callback); + }, }); this.pane.on(MultiSelectTree.EVENT_CHANGE, () => { diff --git a/packages/fineui/src/core/controller/controller.masker.js b/packages/fineui/src/core/controller/controller.masker.js index dc07a48b8..cd8f4cc05 100644 --- a/packages/fineui/src/core/controller/controller.masker.js +++ b/packages/fineui/src/core/controller/controller.masker.js @@ -12,7 +12,7 @@ export class MaskersController extends LayerController { } init() { - super.init(arguments); + super.init(...arguments); this.zindex = zIndex_masker; } } diff --git a/packages/fineui/src/core/loader/loader.style.js b/packages/fineui/src/core/loader/loader.style.js index a8b1dd2b0..b8e4780ff 100644 --- a/packages/fineui/src/core/loader/loader.style.js +++ b/packages/fineui/src/core/loader/loader.style.js @@ -13,7 +13,7 @@ export class StyleLoaderManager extends OB { } _init() { - super._init(arguments); + super._init(...arguments); this.stylesManager = {}; } diff --git a/packages/fineui/src/less/core/utils/list-item.less b/packages/fineui/src/less/core/utils/list-item.less index c084ac275..ce5b6abb1 100644 --- a/packages/fineui/src/less/core/utils/list-item.less +++ b/packages/fineui/src/less/core/utils/list-item.less @@ -93,6 +93,25 @@ } } +.bi-theme-dark { + .bi-list-item-simple { + &.disabled { + &, &:hover, &:active { + color: @color-bi-text-disabled-theme-dark !important; + & .bi-input { + color: @color-bi-text-disabled-theme-dark !important; + } + & .bi-textarea { + color: @color-bi-text-disabled-theme-dark !important; + } + & .bi-high-light { + color: @color-bi-text-disabled-theme-dark !important; + } + } + } + } +} + // hover的时候文字变黑 // active的时候文字高亮 .bi-list-item-effect { diff --git a/packages/fineui/src/widget/multiselecttree/multiselecttree.js b/packages/fineui/src/widget/multiselecttree/multiselecttree.js index 9493f444b..1047a9601 100644 --- a/packages/fineui/src/widget/multiselecttree/multiselecttree.js +++ b/packages/fineui/src/widget/multiselecttree/multiselecttree.js @@ -16,6 +16,7 @@ export class MultiSelectTree extends Single { baseCls: "bi-multi-select-tree", itemsCreator: emptyFn, simple: false, + searcherPaneIsSelectedAny: true, }); } @@ -44,6 +45,7 @@ export class MultiSelectTree extends Single { this.searcherPane = createWidget({ type: MultiTreeSearchPane.xtype, cls: "bi-border-left bi-border-right bi-border-bottom", + isSelectedAny: o.searcherPaneIsSelectedAny, keywordGetter() { return self.searcher.getKeyword(); }, diff --git a/packages/fineui/src/widget/multitree/multi.tree.list.combo.js b/packages/fineui/src/widget/multitree/multi.tree.list.combo.js index eb20de280..d32f941ed 100644 --- a/packages/fineui/src/widget/multitree/multi.tree.list.combo.js +++ b/packages/fineui/src/widget/multitree/multi.tree.list.combo.js @@ -19,7 +19,7 @@ import { Single, Combo } from "@/base"; import { MultiTreeSearchInsertPane } from "./trigger/multi.tree.search.insert.pane"; import { MultiTreePopup } from "./multi.tree.popup"; import { MultiSelectTrigger } from "../multiselect/multiselect.trigger"; -import { TriggerIconButton, ListPartTree, ListDisplayTree, Listasynctree } from "@/case"; +import { TriggerIconButton, ListPartTree, ListDisplayTree, ListAsyncTree } from "@/case"; import { MultiSelectCheckSelectedSwitcher } from "../multiselect/trigger/switcher.checkselected"; @shortcut() @@ -126,7 +126,7 @@ export class MultiTreeListCombo extends Single { self.numberCounter.setAdapter(this); }, el: { - type: Listasynctree.xtype, + type: ListAsyncTree.xtype, }, listeners: [ { 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 63de74987..01bb92499 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 @@ -6,7 +6,10 @@ import { TreeView, PartTree } from "@/case"; export class MultiTreeSearchPane extends Pane { static xtype = "bi.multi_tree_search_pane"; - props = { baseCls: "bi-multi-tree-search-pane bi-card" }; + props = { + baseCls: "bi-multi-tree-search-pane bi-card", + isSelectedAny: true, + }; static EVENT_CHANGE = "EVENT_CHANGE"; static EVENT_CLICK_CONFIRM = "EVENT_CLICK_CONFIRM"; @@ -22,6 +25,7 @@ export class MultiTreeSearchPane extends Pane { type: PartTree.xtype, element: this, tipText: i18nText("BI-No_Select"), + isSelectedAny: opts.isSelectedAny, itemsCreator(op, callback) { op.keyword = opts.keywordGetter(); opts.itemsCreator(op, callback); diff --git a/packages/fineui/src/worker.js b/packages/fineui/src/worker.js new file mode 100644 index 000000000..2956dde18 --- /dev/null +++ b/packages/fineui/src/worker.js @@ -0,0 +1,36 @@ +// sideEffects +import "./core/system"; + +import * as _core from "./core"; +import * as _base from "./base"; +import * as _fix from "./fix"; +import * as _router from "./router"; + +export * as Popper from "@popperjs/core"; + +import * as D from "@/core/decorator"; +import { Fix } from "./fix"; + +const Decorators = { ...D, Model: Fix.Model }; + +const fuiExport = { + ..._core, + ..._base, + ..._fix, + ..._router +}; + +import * as injectFn from "@/core/5.inject"; +import { _global } from "@/core/0.foundation"; +import { _defineVarProperties } from "@/core/constant/writable.var"; + +_global.BI = _global.BI || {}; + +Object.assign(_global, { + Fix: fuiExport.Fix, + _: fuiExport._, +}); + +Object.assign(_global.BI, fuiExport, injectFn, { Decorators, }); + +_defineVarProperties(_global.BI); diff --git a/packages/fineui/typescript/bundle.ts b/packages/fineui/typescript/bundle.ts index fb4e34400..174fa3e6e 100644 --- a/packages/fineui/typescript/bundle.ts +++ b/packages/fineui/typescript/bundle.ts @@ -1,3 +1,5 @@ -// import fineui from "./index"; - -// BI.extend(BI, fineui); +import { Workers } from "./core/worker/workers"; +// 仅Workers是ts实现的代码,所以要挂载到BI上 +BI?.extend(BI, { + Workers: Workers +}); \ No newline at end of file diff --git a/packages/fineui/webpack/attachments.js b/packages/fineui/webpack/attachments.js index be1d89017..3adb47d20 100644 --- a/packages/fineui/webpack/attachments.js +++ b/packages/fineui/webpack/attachments.js @@ -19,7 +19,8 @@ const basicAttachmentMap = { "src/less/widget/**/*.less", "src/less/component/**/*.less" ]), - js_bundle: sync(["src/bundle.js"]) + js_bundle: sync(["src/bundle.js"]), + js_worker: sync(["src/worker.js"]) }; const bundleCss = [].concat(basicAttachmentMap.less, sync(["public/less/app.less", "public/less/**/*.less"])); @@ -34,8 +35,7 @@ const fineui = [].concat( ); const fineuiForWorker = [].concat( - jqueryPolyfill, - basicAttachmentMap.js_bundle, + basicAttachmentMap.js_worker, basicAttachmentMap.ui, basicAttachmentMap.ts ); diff --git a/scripts/lib/fui.component.json b/scripts/lib/fui.component.json index 35bfe7cc1..22d45963a 100644 --- a/scripts/lib/fui.component.json +++ b/scripts/lib/fui.component.json @@ -167,9 +167,9 @@ "bi.small_select_text_trigger": "SmallSelectTextTrigger", "bi.small_text_trigger": "SmallTextTrigger", "bi.async_tree": "AsyncTree", - "bi.list_async_tree": "Listasynctree", + "bi.list_async_tree": "ListAsyncTree", "bi.list_part_tree": "ListPartTree", - "bi.list_tree_view": "Listtreeview", + "bi.list_tree_view": "ListTreeView", "bi.part_tree": "PartTree", "bi.display_tree": "DisplayTree", "bi.list_display_tree": "ListDisplayTree", diff --git a/scripts/lib/fui.export.txt b/scripts/lib/fui.export.txt index ef18cb6a8..b04b355ce 100644 --- a/scripts/lib/fui.export.txt +++ b/scripts/lib/fui.export.txt @@ -233,8 +233,8 @@ ListLoader ListPane ListPartTree ListView -Listasynctree -Listtreeview +ListAsyncTree +ListTreeView Loader LoadingBar Logic