From 9335c4ef9387defb6a8badd793272365936b749a Mon Sep 17 00:00:00 2001 From: zsmj Date: Fri, 13 Jan 2023 15:38:14 +0800 Subject: [PATCH] update --- src/widget/multilayersingletree/index.js | 2 - .../selecttree/nodes/node.first.plus.js | 109 ------------------ src/widget/selecttree/nodes/node.last.plus.js | 109 ------------------ src/widget/selecttree/nodes/node.mid.plus.js | 109 ------------------ src/widget/selecttree/nodes/node.plus.js | 109 ------------------ 5 files changed, 438 deletions(-) delete mode 100644 src/widget/selecttree/nodes/node.first.plus.js delete mode 100644 src/widget/selecttree/nodes/node.last.plus.js delete mode 100644 src/widget/selecttree/nodes/node.mid.plus.js delete mode 100644 src/widget/selecttree/nodes/node.plus.js diff --git a/src/widget/multilayersingletree/index.js b/src/widget/multilayersingletree/index.js index 4098e74cc..d0f9e5497 100644 --- a/src/widget/multilayersingletree/index.js +++ b/src/widget/multilayersingletree/index.js @@ -3,5 +3,3 @@ export { MultiLayerSingleTreeInsertSearchPane } from "./multilayersingletree.ins export { MultiLayerSingleLevelTree } from "./multilayersingletree.leveltree"; export { MultiLayerSingleTreePopup } from "./multilayersingletree.popup"; export { MultiLayerSingleTreeTrigger } from "./multilayersingletree.trigger"; -export * from "./node"; -export * from "./treeitem"; diff --git a/src/widget/selecttree/nodes/node.first.plus.js b/src/widget/selecttree/nodes/node.first.plus.js deleted file mode 100644 index 484128e4d..000000000 --- a/src/widget/selecttree/nodes/node.first.plus.js +++ /dev/null @@ -1,109 +0,0 @@ -import { - shortcut, - extend, - createWidget, - Controller, - Events, - isNotNull, LogicFactory, Direction -} from "@/core"; -import { NodeButton, Label } from "@/base"; -import { FirstTreeNodeCheckbox } from "@/case"; - -@shortcut() -export class SelectTreeFirstPlusGroupNode extends NodeButton { - static xtype = "bi.select_tree_first_plus_group_node"; - - _defaultConfig() { - const conf = super._defaultConfig(...arguments); - - return extend(conf, { - baseCls: - `${conf.baseCls || "" - } bi-select-tree-first-plus-group-node bi-list-item-active`, - logic: { - dynamic: false, - }, - id: "", - pId: "", - readonly: true, - open: false, - height: 24, - }); - } - - _init() { - super._init(...arguments); - const self = this, - o = this.options; - this.checkbox = createWidget({ - type: FirstTreeNodeCheckbox.xtype, - stopPropagation: true, - iconHeight: o.height, - iconWidth: o.height, - }); - this.text = createWidget({ - type: Label.xtype, - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - value: o.value, - keyword: o.keyword, - py: o.py, - }); - this.checkbox.on(Controller.EVENT_CHANGE, function (type) { - if (type === Events.CLICK) { - if (this.isSelected()) { - self.triggerExpand(); - } else { - self.triggerCollapse(); - } - } - }); - const type = LogicFactory.createLogicTypeByDirection( - Direction.Left - ); - const items = LogicFactory.createLogicItemsByDirection( - Direction.Left, - { - width: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, - el: this.checkbox, - }, - this.text - ); - createWidget( - extend( - { - element: this, - }, - LogicFactory.createLogic( - type, - extend(o.logic, { - items, - }) - ) - ) - ); - } - - isOnce() { - return true; - } - - doRedMark() { - this.text.doRedMark(...arguments); - } - - unRedMark() { - this.text.unRedMark(...arguments); - } - - setOpened(v) { - super.setOpened(...arguments); - if (isNotNull(this.checkbox)) { - this.checkbox.setSelected(v); - } - } -} diff --git a/src/widget/selecttree/nodes/node.last.plus.js b/src/widget/selecttree/nodes/node.last.plus.js deleted file mode 100644 index 572d66e55..000000000 --- a/src/widget/selecttree/nodes/node.last.plus.js +++ /dev/null @@ -1,109 +0,0 @@ -import { - shortcut, - extend, - createWidget, - Controller, - Events, - isNotNull, LogicFactory, Direction -} from "@/core"; -import { NodeButton, Label } from "@/base"; -import { LastTreeNodeCheckbox } from "@/case"; - -@shortcut() -export class SelectTreeLastPlusGroupNode extends NodeButton { - static xtype = "bi.select_tree_last_plus_group_node"; - - _defaultConfig() { - const conf = super._defaultConfig(...arguments); - - return extend(conf, { - baseCls: - `${conf.baseCls || "" - } bi-select-tree-last-plus-group-node bi-list-item-active`, - logic: { - dynamic: false, - }, - id: "", - pId: "", - readonly: true, - open: false, - height: 24, - }); - } - - _init() { - super._init(...arguments); - const self = this, - o = this.options; - this.checkbox = createWidget({ - type: LastTreeNodeCheckbox.xtype, - stopPropagation: true, - iconHeight: o.height, - iconWidth: o.height, - }); - this.text = createWidget({ - type: Label.xtype, - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - value: o.value, - keyword: o.keyword, - py: o.py, - }); - this.checkbox.on(Controller.EVENT_CHANGE, function (type) { - if (type === Events.CLICK) { - if (this.isSelected()) { - self.triggerExpand(); - } else { - self.triggerCollapse(); - } - } - }); - const type = LogicFactory.createLogicTypeByDirection( - Direction.Left - ); - const items = LogicFactory.createLogicItemsByDirection( - Direction.Left, - { - width: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, - el: this.checkbox, - }, - this.text - ); - createWidget( - extend( - { - element: this, - }, - LogicFactory.createLogic( - type, - extend(o.logic, { - items, - }) - ) - ) - ); - } - - isOnce() { - return true; - } - - doRedMark() { - this.text.doRedMark(...arguments); - } - - unRedMark() { - this.text.unRedMark(...arguments); - } - - setOpened(v) { - super.setOpened(...arguments); - if (isNotNull(this.checkbox)) { - this.checkbox.setSelected(v); - } - } -} diff --git a/src/widget/selecttree/nodes/node.mid.plus.js b/src/widget/selecttree/nodes/node.mid.plus.js deleted file mode 100644 index 670533dd5..000000000 --- a/src/widget/selecttree/nodes/node.mid.plus.js +++ /dev/null @@ -1,109 +0,0 @@ -import { - shortcut, - extend, - createWidget, - Controller, - Events, - isNotNull, Direction, LogicFactory -} from "@/core"; -import { NodeButton, Label } from "@/base"; -import { MidTreeNodeCheckbox } from "@/case"; - -@shortcut() -export class SelectTreeMidPlusGroupNode extends NodeButton { - static xtype = "bi.select_tree_mid_plus_group_node"; - - _defaultConfig() { - const conf = super._defaultConfig(...arguments); - - return extend(conf, { - baseCls: - `${conf.baseCls || "" - } bi-select-tree-mid-plus-group-node bi-list-item-active`, - logic: { - dynamic: false, - }, - id: "", - pId: "", - readonly: true, - open: false, - height: 24, - }); - } - - _init() { - super._init(...arguments); - const self = this, - o = this.options; - this.checkbox = createWidget({ - type: MidTreeNodeCheckbox.xtype, - stopPropagation: true, - iconHeight: o.height, - iconWidth: o.height, - }); - this.text = createWidget({ - type: Label.xtype, - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - value: o.value, - keyword: o.keyword, - py: o.py, - }); - this.checkbox.on(Controller.EVENT_CHANGE, function (type) { - if (type === Events.CLICK) { - if (this.isSelected()) { - self.triggerExpand(); - } else { - self.triggerCollapse(); - } - } - }); - const type = LogicFactory.createLogicTypeByDirection( - Direction.Left - ); - const items = LogicFactory.createLogicItemsByDirection( - Direction.Left, - { - width: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, - el: this.checkbox, - }, - this.text - ); - createWidget( - extend( - { - element: this, - }, - LogicFactory.createLogic( - type, - extend(o.logic, { - items, - }) - ) - ) - ); - } - - isOnce() { - return true; - } - - doRedMark() { - this.text.doRedMark(...arguments); - } - - unRedMark() { - this.text.unRedMark(...arguments); - } - - setOpened(v) { - super.setOpened(...arguments); - if (isNotNull(this.checkbox)) { - this.checkbox.setSelected(v); - } - } -} diff --git a/src/widget/selecttree/nodes/node.plus.js b/src/widget/selecttree/nodes/node.plus.js deleted file mode 100644 index e3e41de7f..000000000 --- a/src/widget/selecttree/nodes/node.plus.js +++ /dev/null @@ -1,109 +0,0 @@ -import { - shortcut, - extend, - createWidget, - Controller, - Events, - isNotNull, LogicFactory -} from "@/core"; -import { NodeButton, Label } from "@/base"; -import { TreeNodeCheckbox } from "@/case"; - -@shortcut() -export class SelectTreePlusGroupNode extends NodeButton { - static xtype = "bi.select_tree_plus_group_node"; - - _defaultConfig() { - const conf = super._defaultConfig(...arguments); - - return extend(conf, { - baseCls: - `${conf.baseCls || "" - } bi-select-tree-plus-group-node bi-list-item-active`, - logic: { - dynamic: false, - }, - id: "", - pId: "", - readonly: true, - open: false, - height: 24, - }); - } - - _init() { - super._init(...arguments); - const self = this, - o = this.options; - this.checkbox = createWidget({ - type: TreeNodeCheckbox.xtype, - stopPropagation: true, - iconHeight: o.height, - iconWidth: o.iconWrapperWidth || o.height, - }); - this.text = createWidget({ - type: Label.xtype, - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - value: o.value, - keyword: o.keyword, - py: o.py, - }); - this.checkbox.on(Controller.EVENT_CHANGE, function (type) { - if (type === Events.CLICK) { - if (this.isSelected()) { - self.triggerExpand(); - } else { - self.triggerCollapse(); - } - } - }); - const type = LogicFactory.createLogicTypeByDirection( - BI.Direction.Left - ); - const items = LogicFactory.createLogicItemsByDirection( - BI.Direction.Left, - { - width: 24, - el: this.checkbox, - }, - this.text - ); - createWidget( - extend( - { - element: this, - }, - LogicFactory.createLogic( - type, - extend(o.logic, { - items, - }) - ) - ) - ); - } - - isOnce() { - return true; - } - - doRedMark() { - this.text.doRedMark(...arguments); - } - - unRedMark() { - this.text.unRedMark(...arguments); - } - - setOpened(v) { - super.setOpened(...arguments); - if (isNotNull(this.checkbox)) { - this.checkbox.setSelected(v); - } - } -}