@web-utils/component 3.8.3 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/awesome-button/index.mjs +25 -55
- package/base.css +1 -1
- package/card/index.mjs +13 -13
- package/card/style.css +1 -1
- package/carousel/style.css +1 -1
- package/chat/index.mjs +2 -2
- package/chat/style.css +1 -1
- package/chunks/{ElementForm.8w6UkiuU.mjs → ElementForm.CQ3PN5qj.mjs} +17 -35
- package/chunks/{ElementListeners.DOy8wyD2.mjs → ElementListeners.De_PRuIm.mjs} +56 -95
- package/chunks/{ElementMultiInstance.3Z28ewuh.mjs → ElementMultiInstance.DQo2wuAQ.mjs} +16 -26
- package/chunks/{ElementProperties.B2I48muA.mjs → ElementProperties.CosfDrlW.mjs} +16 -16
- package/chunks/{ElementTaskConfig.MBbkLrth.mjs → ElementTaskConfig.Bko0kgTp.mjs} +104 -113
- package/chunks/{FlowCondition.BfU9kw6h.mjs → FlowCondition.Y6qEYi1T.mjs} +36 -66
- package/chunks/{FormTemp.BSpnNput.mjs → FormTemp.Bu2VCxUh.mjs} +2 -2
- package/chunks/{SignalAndMessage.CH6L7cYu.mjs → SignalAndMessage.Bb5PFX0N.mjs} +11 -22
- package/chunks/{UserTaskListeners.XXe5dC5I.mjs → UserTaskListeners.Bv3BDfEI.mjs} +45 -86
- package/chunks/configComponents.BDhlZU8F.mjs +23 -0
- package/chunks/confirmable-mixin.D9aKzKZ9.mjs +85 -0
- package/chunks/core.DJEgjQW6.mjs +54 -0
- package/chunks/{dataformat.B9UvztrQ.mjs → dataformat.CpqOeGBl.mjs} +2 -2
- package/chunks/{dic.CET0XdKP.mjs → dic.Dkl-leRW.mjs} +43 -43
- package/chunks/dictionary.DqiP9x2m.mjs +25 -0
- package/chunks/{event.BT1F_1vF.mjs → event.9aDS6jcw.mjs} +2 -2
- package/chunks/form-input.B8z37eqj.mjs +31 -0
- package/chunks/form-item.D-H-wCPE.mjs +233 -0
- package/chunks/form-validate.CVarNHKX.mjs +12 -0
- package/chunks/helper.BiMLcEEk.mjs +41 -0
- package/chunks/index.9OxHjTIE.mjs +16 -0
- package/chunks/{index.MAFc4eFi.mjs → index.d3MV3Wq2.mjs} +43 -47
- package/chunks/{init.ofpxEyAI.mjs → init.DAsXSoLW.mjs} +2 -2
- package/chunks/{packages.CWPkeLu9.mjs → packages.ByyangTp.mjs} +3 -3
- package/chunks/sub-table-plus-props.BVsD71hT.mjs +30 -0
- package/chunks/{tab-mixin.CVr9bZtn.mjs → tab-mixin.BNK6dxLN.mjs} +1 -1
- package/chunks/{util.CoahLDYn.mjs → util.DqFv_pWg.mjs} +54 -55
- package/chunks/utilSelf.Csq1766E.mjs +48 -0
- package/color-picker/index.mjs +19 -37
- package/comment/style.css +1 -1
- package/confirm-button/index.mjs +1 -1
- package/confirmable/index.mjs +1 -1
- package/context-menu/style.css +1 -1
- package/count-up/index.mjs +13 -24
- package/custom-scrollbar/index.mjs +1 -2
- package/data-operatext/style.css +1 -1
- package/data-panel/style.css +1 -1
- package/data-pay/style.css +1 -1
- package/data-price/style.css +1 -1
- package/data-rotate/style.css +1 -1
- package/data-table-picker/index.mjs +1 -1
- package/data-tabs/style.css +1 -1
- package/dialog-form/index.mjs +16 -28
- package/dynamic-table/style.css +1 -1
- package/easy-popup/index.mjs +22 -40
- package/easy-popup/style.css +1 -1
- package/editable-tree/index.mjs +203 -250
- package/editable-tree/style.css +1 -1
- package/element-dialog/index.mjs +30 -52
- package/element-dialog/style.css +1 -1
- package/flex-column/index.mjs +13 -25
- package/flex-item/index.mjs +15 -27
- package/flex-row/index.mjs +13 -25
- package/flow/index.mjs +30 -32
- package/flow-designer/index.mjs +344 -375
- package/flow-designer/style.css +1 -1
- package/flow-node/index.mjs +1 -1
- package/flow-viewer/index.mjs +64 -91
- package/form-block/index.mjs +33 -26
- package/form-card/index.mjs +25 -0
- package/form-cascader/index.mjs +70 -67
- package/form-checkbox/index.mjs +71 -0
- package/form-checkbox-group/index.mjs +33 -53
- package/form-date-picker/index.mjs +44 -73
- package/form-holder/index.mjs +60 -64
- package/form-holder/style.css +1 -0
- package/form-input/index.mjs +62 -40
- package/form-input-cron-expression/index.mjs +77 -0
- package/form-input-cron-expression/style.css +1 -0
- package/form-input-email/index.mjs +21 -33
- package/form-input-id-card/index.mjs +25 -38
- package/form-input-number/index.mjs +39 -42
- package/form-input-number/style.css +1 -1
- package/form-input-phone-number/index.mjs +26 -37
- package/form-input-tag/index.mjs +32 -34
- package/form-input-time/index.mjs +22 -37
- package/form-item/index.mjs +109 -101
- package/form-item/style.css +1 -1
- package/form-item-config-provider/index.mjs +18 -10
- package/form-item-group/index.mjs +73 -69
- package/form-item-group/style.css +1 -1
- package/form-radio-group/index.mjs +41 -36
- package/form-radio-group/style.css +1 -1
- package/form-select/index.mjs +142 -75
- package/form-select/style.css +1 -0
- package/form-switch/index.mjs +29 -34
- package/form-table/index.mjs +85 -0
- package/form-table-plus/index.mjs +109 -0
- package/form-textarea/index.mjs +23 -35
- package/form-tree-select/index.mjs +72 -0
- package/form-tree-select/style.css +1 -0
- package/form-tree-select-multiple/index.mjs +78 -0
- package/form-view/index.mjs +43 -77
- package/form-view/style.css +1 -1
- package/fy-array/index.mjs +2 -2
- package/fy-cascader/index.mjs +1 -1
- package/fy-checkbox/index.mjs +1 -1
- package/fy-code/index.mjs +1 -1
- package/fy-curd/index.mjs +12 -17
- package/fy-curd/style.css +1 -1
- package/fy-date/index.mjs +1 -1
- package/fy-draggable/index.mjs +5 -7
- package/fy-draggable/style.css +1 -1
- package/fy-dynamic/index.mjs +14 -16
- package/fy-empty/index.mjs +1 -1
- package/fy-empty/style.css +1 -1
- package/fy-form/index.mjs +117 -136
- package/fy-form/style.css +1 -1
- package/fy-form-design/index.mjs +319 -345
- package/fy-form-design/style.css +1 -1
- package/fy-input/index.mjs +2 -2
- package/fy-input-color/index.mjs +1 -1
- package/fy-input-icon/index.mjs +1 -1
- package/fy-input-map/index.mjs +21 -26
- package/fy-input-map/style.css +1 -1
- package/fy-input-number/index.mjs +1 -1
- package/fy-input-table/index.mjs +10 -12
- package/fy-input-tree/index.mjs +1 -1
- package/fy-radio/index.mjs +1 -1
- package/fy-rate/index.mjs +1 -1
- package/fy-select/index.mjs +4 -4
- package/fy-slider/index.mjs +2 -2
- package/fy-switch/index.mjs +1 -1
- package/fy-tabs/index.mjs +0 -1
- package/fy-time/index.mjs +1 -1
- package/fy-title/index.mjs +1 -1
- package/fy-tree/index.mjs +1 -1
- package/fy-u-editor/index.mjs +77 -103
- package/fy-upload/index.mjs +3 -3
- package/fy-upload/style.css +1 -1
- package/highlight-j-s/index.mjs +1 -1
- package/highlight-j-s/style.css +1 -1
- package/image-cropper/index.mjs +14 -65
- package/image-preview/index.mjs +17 -45
- package/image-preview/style.css +1 -1
- package/image-viewer/style.css +1 -1
- package/index.mjs +666 -496
- package/input-number/index.mjs +64 -9
- package/keyboard/style.css +1 -1
- package/license/index.mjs +1 -1
- package/login/index.mjs +1 -1
- package/monaco-editor/index.mjs +44 -74
- package/name-avatar/style.css +1 -1
- package/package.json +18 -17
- package/page-index/index.mjs +30 -54
- package/page-index-top/index.mjs +25 -47
- package/pageable-table/index.mjs +354 -226
- package/pageable-table/style.css +1 -1
- package/pageable-view/index.mjs +63 -106
- package/photo-swipe/index.mjs +51 -74
- package/picker-table-view/index.mjs +117 -0
- package/present-view/index.mjs +43 -77
- package/present-view/style.css +1 -1
- package/record-video/index.mjs +1 -1
- package/resize-observer/index.mjs +1 -1
- package/resize-observer/style.css +1 -1
- package/search/index.mjs +2 -2
- package/search/style.css +1 -1
- package/search-popover/index.mjs +28 -48
- package/search-popover/style.css +1 -1
- package/sign/index.mjs +2 -2
- package/sign-panel/style.css +1 -1
- package/skeleton-panel/index.mjs +38 -0
- package/skeleton-panel/style.css +1 -0
- package/split-pane/index.mjs +31 -49
- package/split-pane/style.css +1 -1
- package/sub-table/index.mjs +206 -0
- package/sub-table/style.css +1 -0
- package/sub-table-plus/index.mjs +231 -0
- package/sub-table-plus/style.css +1 -0
- package/swiper/index.mjs +18 -38
- package/swiper/style.css +1 -1
- package/tab/index.mjs +1 -1
- package/tab/style.css +1 -1
- package/tab-item/index.mjs +2 -2
- package/table-column/index.mjs +112 -37
- package/table-column/style.css +1 -0
- package/table-view/index.mjs +178 -135
- package/table-view/style.css +1 -1
- package/tabs-view/index.mjs +104 -0
- package/tabs-view/style.css +1 -0
- package/tag-render/index.mjs +13 -24
- package/text-ellipsis/index.mjs +1 -1
- package/toolbar/index.mjs +115 -58
- package/toolbar/style.css +1 -1
- package/toolbar-button/index.mjs +92 -48
- package/verify/index.mjs +1 -1
- package/vue-cron/index.mjs +48 -66
- package/vue-qr-code/index.mjs +14 -32
- package/vue-quill-editor/index.mjs +3 -3
- package/vue-tags-input/index.mjs +1 -1
- package/vue-tree-select/index.mjs +352 -393
- package/vue-tree-select/style.css +1 -1
- package/vue-video-player/index.mjs +36 -67
- package/watermark/index.mjs +21 -31
- package/web-types.json +9240 -3843
- package/x-input-tag/index.mjs +29 -61
- package/chunks/confirmable-mixin.D4LAArE5.mjs +0 -114
- package/chunks/form-input-mixin.BkKiqJhi.mjs +0 -24
- package/chunks/form-item-mixin.CG4ZwzMC.mjs +0 -140
- package/chunks/input-number-mixin.CzjtGf2n.mjs +0 -60
- package/chunks/utilSelf.CRqpl0Cz.mjs +0 -56
- package/toolbar-button/style.css +0 -1
- /package/chunks/{form-pick-mixin.BFTIVn_i.mjs → form-pick.BFTIVn_i.mjs} +0 -0
package/editable-tree/index.mjs
CHANGED
|
@@ -1,37 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
_.call(e, i) && w(t, i, e[i]);
|
|
1
|
+
import { findTreeChildren as m, delay as y, isUndefined as l, isNotEmpty as x, fastClone as w, isPlainObject as r, isFunction as h, computePosition as N, isVerticalScrollbarVisible as C, scrollbarWidth as g, hasOwn as d } from "@web-utils/core";
|
|
2
|
+
import { removeResizeListener as u, addResizeListener as p } from "@web-utils/integrations/resize";
|
|
3
|
+
import { cloneDeep as f } from "@web-utils/integrations/lodash";
|
|
4
|
+
import { a as v, b as $ } from "../chunks/index.d3MV3Wq2.mjs";
|
|
5
|
+
import b from "vue";
|
|
6
|
+
import { n as k } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
7
|
+
function c(t, e) {
|
|
8
|
+
for (const i in e)
|
|
9
|
+
b.set(t, i, e[i]);
|
|
11
10
|
return t;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
var n = (d) => {
|
|
15
|
-
try {
|
|
16
|
-
l(i.next(d));
|
|
17
|
-
} catch (f) {
|
|
18
|
-
o(f);
|
|
19
|
-
}
|
|
20
|
-
}, r = (d) => {
|
|
21
|
-
try {
|
|
22
|
-
l(i.throw(d));
|
|
23
|
-
} catch (f) {
|
|
24
|
-
o(f);
|
|
25
|
-
}
|
|
26
|
-
}, l = (d) => d.done ? s(d.value) : Promise.resolve(d.value).then(n, r);
|
|
27
|
-
l((i = i.apply(t, e)).next());
|
|
28
|
-
});
|
|
29
|
-
import { findTreeChildren as T, delay as M, isUndefined as p, isNotEmpty as K, fastClone as P, isPlainObject as u, isFunction as N, computePosition as E, isVerticalScrollbarVisible as D, scrollbarWidth as L, hasOwn as m } from "@web-utils/core";
|
|
30
|
-
import { removeResizeListener as C, addResizeListener as g } from "@web-utils/integrations/resize";
|
|
31
|
-
import { cloneDeep as v } from "@web-utils/integrations/lodash";
|
|
32
|
-
import { a as R, b as z, c as y } from "../chunks/index.MAFc4eFi.mjs";
|
|
33
|
-
import { n as S } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
34
|
-
const V = {
|
|
11
|
+
}
|
|
12
|
+
const B = {
|
|
35
13
|
name: "EditableTree",
|
|
36
14
|
props: {
|
|
37
15
|
label: {
|
|
@@ -90,7 +68,7 @@ const V = {
|
|
|
90
68
|
default: () => ({
|
|
91
69
|
children: "children",
|
|
92
70
|
label: "name",
|
|
93
|
-
isLeaf: (t) =>
|
|
71
|
+
isLeaf: (t) => d(t, "hasChildren") ? !t.hasChildren : d(t, "hasChild") ? !t.hasChild : d(t, "children") && t.children ? t.children.length === 0 : !0
|
|
94
72
|
})
|
|
95
73
|
},
|
|
96
74
|
menuLabel: {
|
|
@@ -164,14 +142,14 @@ const V = {
|
|
|
164
142
|
this.tryFetch();
|
|
165
143
|
},
|
|
166
144
|
mounted() {
|
|
167
|
-
|
|
145
|
+
p(this.$refs.tree.$el, this.resize), p(this.$refs.treeWrapper, this.resize);
|
|
168
146
|
},
|
|
169
147
|
beforeDestroy() {
|
|
170
|
-
|
|
148
|
+
u(this.$refs.tree.$el, this.resize), u(this.$refs.treeWrapper, this.resize);
|
|
171
149
|
},
|
|
172
150
|
methods: {
|
|
173
|
-
filterTreeProperties:
|
|
174
|
-
filterTreeEvents:
|
|
151
|
+
filterTreeProperties: $,
|
|
152
|
+
filterTreeEvents: v,
|
|
175
153
|
addExpandKey(t) {
|
|
176
154
|
this.reserveExpandKey && this.expandedKeys.push(t[this.nodeKey]);
|
|
177
155
|
},
|
|
@@ -179,53 +157,47 @@ const V = {
|
|
|
179
157
|
this.reserveExpandKey && (this.expandedKeys = this.expandedKeys.filter((e) => e !== t[this.nodeKey]));
|
|
180
158
|
},
|
|
181
159
|
resize() {
|
|
182
|
-
|
|
160
|
+
C(this.$refs.treeWrapper) ? this.right = 4 + g : this.right = 4;
|
|
183
161
|
},
|
|
184
|
-
showContextMenu(t, e, i) {
|
|
185
|
-
|
|
186
|
-
e.contextmenu === !1 || e.id === -1 || e.id === 0 || e.edit === !0 || this.contextMenu && (this.curNode = i, this.curData = e, this.showMenu = !0, this.$refs.tree.setCurrentKey(e.id), yield this.$nextTick(), this.position = E(t, this.$refs.contextMenu), window.addEventListener("click", this.hideContextMenu));
|
|
187
|
-
});
|
|
162
|
+
async showContextMenu(t, e, i) {
|
|
163
|
+
e.contextmenu === !1 || e.id === -1 || e.id === 0 || e.edit === !0 || this.contextMenu && (this.curNode = i, this.curData = e, this.showMenu = !0, this.$refs.tree.setCurrentKey(e.id), await this.$nextTick(), this.position = N(t, this.$refs.contextMenu), window.addEventListener("click", this.hideContextMenu));
|
|
188
164
|
},
|
|
189
165
|
hideContextMenu() {
|
|
190
166
|
this.showMenu = !1, window.removeEventListener("click", this.hideContextMenu);
|
|
191
167
|
},
|
|
192
|
-
tryFetch() {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}
|
|
206
|
-
});
|
|
168
|
+
async tryFetch() {
|
|
169
|
+
var t;
|
|
170
|
+
if (this.lazy === !1 && this.fetchApi) {
|
|
171
|
+
const e = await this.fetchApi(((t = this.rootNode) == null ? void 0 : t.id) ?? -1, {});
|
|
172
|
+
if (r(e.data) && (e.data = [e.data]), e.data = e.data || [], this.empty = e.data.length === 0, r(this.customRootNode)) {
|
|
173
|
+
const i = f(this.customRootNode);
|
|
174
|
+
i[this.treeProps.children || "children"] = e.data, this.treeData = [i];
|
|
175
|
+
} else if (h(this.customRootNode)) {
|
|
176
|
+
const i = this.customRootNode(e.data);
|
|
177
|
+
i[this.treeProps.children || "children"] = e.data, this.treeData = r(i) ? [i] : i;
|
|
178
|
+
} else
|
|
179
|
+
this.treeData = e.data;
|
|
180
|
+
}
|
|
207
181
|
},
|
|
208
|
-
loadNode(t, e) {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
}
|
|
228
|
-
});
|
|
182
|
+
async loadNode(t, e) {
|
|
183
|
+
var i, s, n;
|
|
184
|
+
if (t.level === 0) {
|
|
185
|
+
const o = await this.fetchApi(((i = this.rootNode) == null ? void 0 : i.id) ?? -1, t);
|
|
186
|
+
if (this.empty = o.data.length === 0, r(this.customRootNode)) {
|
|
187
|
+
const a = f(this.customRootNode);
|
|
188
|
+
a[this.treeProps.children || "children"] = o.data, e([a]);
|
|
189
|
+
} else if (h(this.customRootNode)) {
|
|
190
|
+
const a = this.customRootNode(o.data);
|
|
191
|
+
a[this.treeProps.children || "children"] = o.data, this.treeData = r(a) ? [a] : a;
|
|
192
|
+
} else
|
|
193
|
+
e(o.data);
|
|
194
|
+
await this.$nextTick(), this.$emit("root-node-loaded", o.data), this.defaultExpandedKeys ? this.expandedKeys = [(s = o == null ? void 0 : o.data[0]) == null ? void 0 : s.id, ...this.defaultExpandedKeys] : this.expandFirstNode && (this.expandedKeys = [(n = o == null ? void 0 : o.data[0]) == null ? void 0 : n.id]);
|
|
195
|
+
} else {
|
|
196
|
+
if (t.leaf || t.data.isTempNode)
|
|
197
|
+
return e([]);
|
|
198
|
+
const o = await this.fetchApi(t.data.id, t);
|
|
199
|
+
e(o.data), await this.$nextTick(), this.$emit("node-loaded", o.data);
|
|
200
|
+
}
|
|
229
201
|
},
|
|
230
202
|
clear() {
|
|
231
203
|
this.cancelEdit(), this.removeNewNode();
|
|
@@ -237,70 +209,69 @@ const V = {
|
|
|
237
209
|
this.newChild && this.newChild.id === -1 && (console.log(this.newChild), this.$refs.tree.remove(this.newChild), this.$emit("remove-new-node"));
|
|
238
210
|
},
|
|
239
211
|
cancelEdit() {
|
|
240
|
-
this.editData && (
|
|
241
|
-
},
|
|
242
|
-
editNode(t, e) {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
})).catch((t) => t);
|
|
277
|
-
});
|
|
212
|
+
this.editData && (l(this.editData.edit) ? this.$set(this.editData, "edit", !0) : this.editData.edit = !1);
|
|
213
|
+
},
|
|
214
|
+
async editNode(t, e) {
|
|
215
|
+
!this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.editData = e, this.text = e[this.treeProps.label], l(e.edit) ? this.$set(e, "edit", !0) : e.edit = !0, await this.$nextTick(), this.$refs.labelTxt.focus()) : await this.$prompt(`请输入新的${this.label}名:`, {
|
|
216
|
+
...this.defaultOptions,
|
|
217
|
+
inputValue: e[this.treeProps.label],
|
|
218
|
+
beforeClose: async (i, s, n) => {
|
|
219
|
+
if (i === "confirm") {
|
|
220
|
+
try {
|
|
221
|
+
s.confirmButtonLoading = !0, s.confirmButtonText = "处理中...", this.text = s.inputValue, await this.onConfirm(this.curNode, this.curData), n();
|
|
222
|
+
} catch {
|
|
223
|
+
s.confirmButtonText = "确定";
|
|
224
|
+
}
|
|
225
|
+
s.confirmButtonLoading = !1;
|
|
226
|
+
} else
|
|
227
|
+
n();
|
|
228
|
+
}
|
|
229
|
+
}).catch((i) => i);
|
|
230
|
+
},
|
|
231
|
+
async appendRootNode() {
|
|
232
|
+
this.text = "", !this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.createNewChild(void 0), this.$refs.tree.root.insertChild({ data: this.newChild }, void 0, !0), await this.scrollIntoView(!0)) : await this.$prompt(`请输入${this.label}名:`, {
|
|
233
|
+
...this.defaultOptions,
|
|
234
|
+
beforeClose: async (t, e, i) => {
|
|
235
|
+
if (t === "confirm") {
|
|
236
|
+
try {
|
|
237
|
+
this.createNewChild(-1), e.confirmButtonLoading = !0, e.confirmButtonText = "处理中...";
|
|
238
|
+
const s = await this.saveApi(this.newNodeBuilder(e.inputValue, { id: -1 }));
|
|
239
|
+
this.newChild[this.treeProps.label] = e.inputValue, this.newChild.edit = !1, c(this.newChild, s.data), this.$refs.tree.root.insertChild({ data: this.newChild }, void 0, !0), await this.locateView(), i();
|
|
240
|
+
} catch {
|
|
241
|
+
e.confirmButtonText = "确定";
|
|
242
|
+
}
|
|
243
|
+
e.confirmButtonLoading = !1;
|
|
244
|
+
} else
|
|
245
|
+
i();
|
|
246
|
+
}
|
|
247
|
+
}).catch((t) => t);
|
|
278
248
|
},
|
|
279
249
|
appendChildNode(t) {
|
|
280
250
|
this.text = "";
|
|
281
251
|
const e = t.expanded;
|
|
282
|
-
t.expand(() =>
|
|
283
|
-
!this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.createNewChild(t.data.id), this.$refs.tree.append(this.newChild, t),
|
|
284
|
-
|
|
252
|
+
t.expand(async () => {
|
|
253
|
+
!this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.createNewChild(t.data.id), this.$refs.tree.append(this.newChild, t), await this.scrollIntoView(e)) : await this.$prompt(`请输入${this.label}名:`, {
|
|
254
|
+
...this.defaultOptions,
|
|
255
|
+
beforeClose: async (i, s, n) => {
|
|
285
256
|
if (i === "confirm") {
|
|
286
257
|
try {
|
|
287
258
|
this.createNewChild(t.data.id), s.confirmButtonLoading = !0, s.confirmButtonText = "处理中...";
|
|
288
|
-
const
|
|
289
|
-
this.newChild[this.treeProps.label] = s.inputValue, this.newChild.edit = !1,
|
|
290
|
-
} catch
|
|
259
|
+
const o = await this.saveApi(this.newNodeBuilder(s.inputValue, t.data));
|
|
260
|
+
this.newChild[this.treeProps.label] = s.inputValue, this.newChild.edit = !1, c(this.newChild, o.data), this.$refs.tree.append(this.newChild, t), await this.locateView(), n();
|
|
261
|
+
} catch {
|
|
291
262
|
s.confirmButtonText = "确定";
|
|
292
263
|
}
|
|
293
264
|
s.confirmButtonLoading = !1;
|
|
294
265
|
} else
|
|
295
|
-
|
|
296
|
-
}
|
|
297
|
-
})
|
|
298
|
-
})
|
|
266
|
+
n();
|
|
267
|
+
}
|
|
268
|
+
}).catch((i) => i);
|
|
269
|
+
});
|
|
299
270
|
},
|
|
300
271
|
appendChildNodeWithData(t, e, i) {
|
|
301
272
|
this.text = "";
|
|
302
273
|
const s = t.expanded;
|
|
303
|
-
t.expand(() =>
|
|
274
|
+
t.expand(async () => {
|
|
304
275
|
this.clear(), this.newChild = {
|
|
305
276
|
id: -1,
|
|
306
277
|
parentId: e,
|
|
@@ -308,30 +279,24 @@ const V = {
|
|
|
308
279
|
edit: !1,
|
|
309
280
|
isTempNode: !0,
|
|
310
281
|
hasChildren: !1
|
|
311
|
-
}, this.$refs.tree.append(this.newChild, t),
|
|
312
|
-
})
|
|
282
|
+
}, this.$refs.tree.append(this.newChild, t), await this.scrollIntoView(s);
|
|
283
|
+
});
|
|
313
284
|
},
|
|
314
285
|
appendPeerNode(t) {
|
|
315
286
|
t.parent && t.parent.level !== 0 ? this.appendChildNode(t.parent) : this.appendRootNode();
|
|
316
287
|
},
|
|
317
|
-
addRootNode(t) {
|
|
318
|
-
|
|
319
|
-
this.$refs.tree.remove(t), yield this.$nextTick(), this.$refs.tree.root.insertChild({ data: t }, void 0, !0);
|
|
320
|
-
});
|
|
288
|
+
async addRootNode(t) {
|
|
289
|
+
this.$refs.tree.remove(t), await this.$nextTick(), this.$refs.tree.root.insertChild({ data: t }, void 0, !0);
|
|
321
290
|
},
|
|
322
|
-
addChildNode(t) {
|
|
323
|
-
|
|
324
|
-
this.
|
|
325
|
-
|
|
326
|
-
})) : yield this.addRootNode(t);
|
|
327
|
-
});
|
|
291
|
+
async addChildNode(t) {
|
|
292
|
+
this.curNode && this.curNode.level !== 0 ? this.curNode.expand(async () => {
|
|
293
|
+
this.$refs.tree.remove(t), await this.$nextTick(), this.$refs.tree.append(t, this.curNode);
|
|
294
|
+
}) : await this.addRootNode(t);
|
|
328
295
|
},
|
|
329
|
-
addPeerNode(t) {
|
|
330
|
-
|
|
331
|
-
this.
|
|
332
|
-
|
|
333
|
-
})) : yield this.addRootNode(t);
|
|
334
|
-
});
|
|
296
|
+
async addPeerNode(t) {
|
|
297
|
+
this.curNode && this.curNode.parent && this.curNode.parent.level !== 0 ? this.curNode.parent.expand(async () => {
|
|
298
|
+
this.$refs.tree.remove(t), await this.$nextTick(), this.$refs.tree.append(t, this.curNode.parent);
|
|
299
|
+
}) : await this.addRootNode(t);
|
|
335
300
|
},
|
|
336
301
|
updateNode(t) {
|
|
337
302
|
const e = this.$refs.tree.getNode(t);
|
|
@@ -351,88 +316,78 @@ const V = {
|
|
|
351
316
|
hasChildren: !1
|
|
352
317
|
}, this.$emit("create-new-node", this.newChild);
|
|
353
318
|
},
|
|
354
|
-
removeNodeModal(t) {
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
s();
|
|
378
|
-
})
|
|
319
|
+
async removeNodeModal(t) {
|
|
320
|
+
await this.$confirm(
|
|
321
|
+
`你确定要删除${this.label}[<span class="break-word" style="color: orange">${t.data[this.treeProps.label]}</span>]吗?`,
|
|
322
|
+
"系统提示",
|
|
323
|
+
{
|
|
324
|
+
type: "warning",
|
|
325
|
+
modal: !0,
|
|
326
|
+
dangerouslyUseHTMLString: !0,
|
|
327
|
+
iconClass: "el-icon-question",
|
|
328
|
+
closeOnClickModal: !1,
|
|
329
|
+
confirmButtonClass: "el-button--danger",
|
|
330
|
+
cancelButtonClass: "el-button--primary is-plain",
|
|
331
|
+
beforeClose: async (e, i, s) => {
|
|
332
|
+
if (e === "confirm") {
|
|
333
|
+
try {
|
|
334
|
+
i.confirmButtonLoading = !0, i.confirmButtonText = "删除...";
|
|
335
|
+
const n = t.parent, o = await this.deleteApi(t.data.id);
|
|
336
|
+
o.code === 0 ? (this.$message.success("删除成功!"), this.$refs.tree.remove(t), this.$emit("node-deleted", n, t.data), s()) : this.$message.error(o.message);
|
|
337
|
+
} catch {
|
|
338
|
+
}
|
|
339
|
+
i.confirmButtonText = "确定", i.confirmButtonLoading = !1;
|
|
340
|
+
} else
|
|
341
|
+
s();
|
|
379
342
|
}
|
|
380
|
-
).catch((e) => e);
|
|
381
|
-
});
|
|
382
|
-
},
|
|
383
|
-
removeNode(t) {
|
|
384
|
-
return a(this, null, function* () {
|
|
385
|
-
try {
|
|
386
|
-
const e = t.parent;
|
|
387
|
-
if (this.deleteApi) {
|
|
388
|
-
const i = yield this.deleteApi(t.data.id);
|
|
389
|
-
i.code === 0 ? (this.$message.success("删除成功!"), this.$refs.tree.remove(t), this.$emit("node-deleted", e, t.data)) : this.$message.error(i.message);
|
|
390
|
-
} else
|
|
391
|
-
this.$refs.tree.remove(t);
|
|
392
|
-
} catch (e) {
|
|
393
343
|
}
|
|
394
|
-
|
|
344
|
+
).catch((e) => e);
|
|
345
|
+
},
|
|
346
|
+
async removeNode(t) {
|
|
347
|
+
try {
|
|
348
|
+
const e = t.parent;
|
|
349
|
+
if (this.deleteApi) {
|
|
350
|
+
const i = await this.deleteApi(t.data.id);
|
|
351
|
+
i.code === 0 ? (this.$message.success("删除成功!"), this.$refs.tree.remove(t), this.$emit("node-deleted", e, t.data)) : this.$message.error(i.message);
|
|
352
|
+
} else
|
|
353
|
+
this.$refs.tree.remove(t);
|
|
354
|
+
} catch {
|
|
355
|
+
}
|
|
395
356
|
},
|
|
396
|
-
onConfirm(t, e) {
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
e.loading = !1, this.loading = !1;
|
|
413
|
-
});
|
|
357
|
+
async onConfirm(t, e) {
|
|
358
|
+
if (e[this.treeProps.label] === this.text || !x(this.text)) {
|
|
359
|
+
this.clear();
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
l(e.loading) ? this.$set(e, "loading", !0) : e.loading = !0;
|
|
363
|
+
try {
|
|
364
|
+
if (this.loading = !0, e.id === -1) {
|
|
365
|
+
const i = await this.saveApi(this.newNodeBuilder(this.text, t.parent.data || { id: -1 })), s = w(e);
|
|
366
|
+
c(e, { ...i.data, isTempNode: !1 }), this.$emit("node-added", e, s, t), this.registerNode(t);
|
|
367
|
+
} else
|
|
368
|
+
await this.updateApi({ ...e, [this.treeProps.label]: this.text });
|
|
369
|
+
e[this.treeProps.label] = this.text, e.edit = !1, this.$emit("node-updated", e, t), this.text = "";
|
|
370
|
+
} catch {
|
|
371
|
+
}
|
|
372
|
+
e.loading = !1, this.loading = !1;
|
|
414
373
|
},
|
|
415
374
|
onCancel(t, e) {
|
|
416
375
|
e.id === -1 ? this.$refs.tree.remove(t) : e.edit = !1, this.text = "";
|
|
417
376
|
},
|
|
418
377
|
nodeClick(t, e, i) {
|
|
419
|
-
this.hideContextMenu(), (
|
|
378
|
+
this.hideContextMenu(), (l(t.loading) || !t.loading) && (this.curNode = e, this.curData = t, this.$emit("on-node-click", t, e, i));
|
|
420
379
|
},
|
|
421
380
|
getCurrentNode() {
|
|
422
381
|
return this.$refs.tree.getCurrentNode();
|
|
423
382
|
},
|
|
424
|
-
locateView() {
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
t && t.scrollIntoView();
|
|
429
|
-
});
|
|
383
|
+
async locateView() {
|
|
384
|
+
await this.$nextTick();
|
|
385
|
+
const t = this.$el.querySelector(`[data-id="${this.newChild.id}"]`);
|
|
386
|
+
t && t.scrollIntoView();
|
|
430
387
|
},
|
|
431
|
-
scrollIntoView(t) {
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
yield this.$nextTick(), t || (yield M(300)), (i = (e = this.$refs) == null ? void 0 : e.labelTxt) == null || i.focus();
|
|
435
|
-
});
|
|
388
|
+
async scrollIntoView(t) {
|
|
389
|
+
var e, i;
|
|
390
|
+
await this.$nextTick(), t || await y(300), (i = (e = this.$refs) == null ? void 0 : e.labelTxt) == null || i.focus();
|
|
436
391
|
},
|
|
437
392
|
inputKeyup(t, e, i) {
|
|
438
393
|
t.keyCode === 13 && this.onConfirm(e, i), t.keyCode === 27 && this.clear();
|
|
@@ -459,50 +414,48 @@ const V = {
|
|
|
459
414
|
return this.$refs.tree.root;
|
|
460
415
|
},
|
|
461
416
|
findTreeNode(t) {
|
|
462
|
-
return
|
|
417
|
+
return m(this.$refs.tree.root.childNodes, (e) => e.data === t || e.data.id === t, "childNodes");
|
|
463
418
|
},
|
|
464
419
|
registerNode(t) {
|
|
465
420
|
t.store.registerNode(t), delete t.store.nodesMap[-1];
|
|
466
421
|
},
|
|
467
|
-
reloadTree() {
|
|
468
|
-
|
|
469
|
-
this.lazy ? this.treeKey = Date.now() : yield this.tryFetch();
|
|
470
|
-
});
|
|
422
|
+
async reloadTree() {
|
|
423
|
+
this.lazy ? this.treeKey = Date.now() : await this.tryFetch();
|
|
471
424
|
}
|
|
472
425
|
}
|
|
473
426
|
};
|
|
474
|
-
var
|
|
427
|
+
var _ = function() {
|
|
475
428
|
var e = this, i = e._self._c;
|
|
476
429
|
return i("div", { staticClass: "editable-tree" }, [!e.readonly && e.addRootNodeButtonStyle === "top-right" ? i("ElButton", { staticStyle: { position: "absolute", top: "4px", "z-index": "1" }, style: { right: `${e.right}px` }, attrs: { type: "primary", size: "mini", icon: "el-icon-plus", circle: "", plain: "" }, on: { click: function(s) {
|
|
477
430
|
return s.stopPropagation(), e.$emit("add-root-node");
|
|
478
|
-
} } }) : e._e(), i("div", { ref: "treeWrapper", staticClass: "et-tree-wrapper" }, [!e.readonly && e.addRootNodeButtonStyle === "top" ? i("div", { staticStyle: { "padding-left": "24px" } }, [i("ElButton", { attrs: { disabled: e.loading, size: "mini", type: "text" }, on: { click: e.appendRootNode } }, [i("i", { staticClass: "el-icon-lx-add" }), e._v(" " + e._s(e.addRootNodeLabel ? e.addRootNodeLabel : `添加${e.label}`) + " ")])], 1) : e._e(), i("ElTree", e._g(e._b({ key: e.treeKey, ref: "tree", staticClass: "flex-item", attrs: { "default-expanded-keys": e.expandedKeys, "expand-on-click-node": !1, "highlight-current": "", load: e.loadNode, data: e.innerTreeData, props: e.treeProps, lazy: e.lazy, "node-key": e.nodeKey }, on: { "node-click": e.nodeClick, "node-contextmenu": e.showContextMenu, "node-expand": e.addExpandKey, "node-collapse": e.removeExpandKey }, scopedSlots: e._u([{ key: "default", fn: function({ node: s, data:
|
|
431
|
+
} } }) : e._e(), i("div", { ref: "treeWrapper", staticClass: "et-tree-wrapper" }, [!e.readonly && e.addRootNodeButtonStyle === "top" ? i("div", { staticStyle: { "padding-left": "24px" } }, [i("ElButton", { attrs: { disabled: e.loading, size: "mini", type: "text" }, on: { click: e.appendRootNode } }, [i("i", { staticClass: "el-icon-lx-add" }), e._v(" " + e._s(e.addRootNodeLabel ? e.addRootNodeLabel : `添加${e.label}`) + " ")])], 1) : e._e(), i("ElTree", e._g(e._b({ key: e.treeKey, ref: "tree", staticClass: "flex-item", attrs: { "default-expanded-keys": e.expandedKeys, "expand-on-click-node": !1, "highlight-current": "", load: e.loadNode, data: e.innerTreeData, props: e.treeProps, lazy: e.lazy, "node-key": e.nodeKey }, on: { "node-click": e.nodeClick, "node-contextmenu": e.showContextMenu, "node-expand": e.addExpandKey, "node-collapse": e.removeExpandKey }, scopedSlots: e._u([{ key: "default", fn: function({ node: s, data: n }) {
|
|
479
432
|
return [e._t("default", function() {
|
|
480
|
-
return [
|
|
481
|
-
return ((
|
|
482
|
-
}, click: function(
|
|
483
|
-
|
|
484
|
-
} }, model: { value: e.text, callback: function(
|
|
485
|
-
e.text =
|
|
486
|
-
}, expression: "text" } }), e.confirmButton ? [i("ElButton", { directives: [{ name: "show", rawName: "v-show", value: !
|
|
487
|
-
return
|
|
488
|
-
} } }, [e._v("确定")]), i("ElButton", { directives: [{ name: "show", rawName: "v-show", value: !
|
|
489
|
-
return
|
|
490
|
-
} } }, [e._v("取消")])] : e._e()], 2)] : [i("span", { staticClass: "custom-tree-node", attrs: { "data-id":
|
|
433
|
+
return [n.edit ? [i("span", { staticClass: "custom-tree-node flex-row flex-item oh", attrs: { "data-id": n.id } }, [e.icon ? i("i", { staticClass: "node-icon shrink-0", class: n.loading ? "el-icon-loading" : "el-icon-edit-outline" }) : e._e(), i("ElInput", { ref: "labelTxt", staticClass: "node-input flex-item", attrs: { size: "mini", placeholder: e.defaultOptions.inputPlaceholder }, on: { blur: (o) => e.inputBlur(o, s, n) }, nativeOn: { keyup: function(o) {
|
|
434
|
+
return ((a) => e.inputKeyup(a, s, n)).apply(null, arguments);
|
|
435
|
+
}, click: function(o) {
|
|
436
|
+
o.stopPropagation();
|
|
437
|
+
} }, model: { value: e.text, callback: function(o) {
|
|
438
|
+
e.text = o;
|
|
439
|
+
}, expression: "text" } }), e.confirmButton ? [i("ElButton", { directives: [{ name: "show", rawName: "v-show", value: !n.loading, expression: "!data.loading" }], staticClass: "shrink-0", attrs: { size: "mini", type: "text" }, on: { click: function(o) {
|
|
440
|
+
return o.stopPropagation(), e.onConfirm(s, n);
|
|
441
|
+
} } }, [e._v("确定")]), i("ElButton", { directives: [{ name: "show", rawName: "v-show", value: !n.loading, expression: "!data.loading" }], staticClass: "shrink-0", attrs: { size: "mini", type: "text" }, on: { click: function(o) {
|
|
442
|
+
return o.stopPropagation(), e.onCancel(s, n);
|
|
443
|
+
} } }, [e._v("取消")])] : e._e()], 2)] : [i("span", { staticClass: "custom-tree-node", attrs: { "data-id": n.id } }, [i("span", { staticClass: "node-label flex-row flex-item oh ellipsis-1" }, [e.icon ? i("i", { staticClass: "node-icon", class: n.loading ? "el-icon-loading" : e.icon(n, s) }) : e._e(), i("span", { staticClass: "flex-item-relative", staticStyle: { height: "21px" } }, [i("span", { staticClass: "ellipsis-1 absolute-box et-tree-label", attrs: { title: s.label } }, [e._t("label", function() {
|
|
491
444
|
return [e._v(e._s(s.label))];
|
|
492
|
-
}, { data:
|
|
493
|
-
return
|
|
494
|
-
} } }, [e._v("添加")]), i("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(
|
|
495
|
-
return
|
|
496
|
-
} } }, [e._v("修改")]), i("ElPopconfirm", { staticClass: "pop-confirm", attrs: { "icon-color": "red", title: "你确定要删除吗?" }, on: { confirm: function(
|
|
497
|
-
return e.removeNode(s,
|
|
445
|
+
}, { data: n, node: s })], 2)]), e._t("label-suffix", null, { node: s, data: n })], 2), !e.contextMenu && !e.readonly ? i("span", { directives: [{ name: "show", rawName: "v-show", value: !n.loading && !e.loading, expression: "!data.loading && !loading" }], staticClass: "handle-actions" }, [i("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(o) {
|
|
446
|
+
return o.stopPropagation(), e.appendChildNode(s, n);
|
|
447
|
+
} } }, [e._v("添加")]), i("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(o) {
|
|
448
|
+
return o.stopPropagation(), e.editNode(s, n);
|
|
449
|
+
} } }, [e._v("修改")]), i("ElPopconfirm", { staticClass: "pop-confirm", attrs: { "icon-color": "red", title: "你确定要删除吗?" }, on: { confirm: function(o) {
|
|
450
|
+
return e.removeNode(s, n);
|
|
498
451
|
} }, scopedSlots: e._u([{ key: "reference", fn: function() {
|
|
499
|
-
return [i("ElButton", { directives: [{ name: "show", rawName: "v-show", value: s.isLeaf, expression: "node.isLeaf" }], staticStyle: { "margin-left": "4px" }, attrs: { size: "mini", type: "text" }, on: { click: function(
|
|
500
|
-
|
|
452
|
+
return [i("ElButton", { directives: [{ name: "show", rawName: "v-show", value: s.isLeaf, expression: "node.isLeaf" }], staticStyle: { "margin-left": "4px" }, attrs: { size: "mini", type: "text" }, on: { click: function(o) {
|
|
453
|
+
o.stopPropagation();
|
|
501
454
|
} } }, [e._v("删除")])];
|
|
502
|
-
}, proxy: !0 }], null, !0) })], 1) : e._e(), e.contextMenuIcon && e.contextMenu && !e.readonly ? i("span", { directives: [{ name: "show", rawName: "v-show", value: !
|
|
503
|
-
return
|
|
455
|
+
}, proxy: !0 }], null, !0) })], 1) : e._e(), e.contextMenuIcon && e.contextMenu && !e.readonly ? i("span", { directives: [{ name: "show", rawName: "v-show", value: !n.loading && !e.loading, expression: "!data.loading && !loading" }], staticClass: "handle-actions", staticStyle: { display: "inline-block" } }, [i("ElButton", { staticStyle: { padding: "6px 10px 0" }, attrs: { size: "mini", type: "text" }, on: { click: function(o) {
|
|
456
|
+
return o.stopPropagation(), e.showContextMenu(o, n, s);
|
|
504
457
|
} } }, [e._v(". . .")])], 1) : e._e()])]];
|
|
505
|
-
}, { node: s, data:
|
|
458
|
+
}, { node: s, data: n })];
|
|
506
459
|
} }], null, !0) }, "ElTree", e.filterTreeProperties(e.$attrs), !1), e.filterTreeEvents(e.$listeners))), e.contextMenu && !e.readonly ? i("div", { directives: [{ name: "show", rawName: "v-show", value: e.showMenu, expression: "showMenu" }], ref: "contextMenu", staticClass: "menu", style: e.position }, [i("ul", { staticClass: "menu-list" }, [e._t("context-menu", function() {
|
|
507
460
|
return [i("li", { directives: [{ name: "show", rawName: "v-show", value: e.curData.id > -1, expression: "curData.id > -1" }], staticClass: "menu-item", on: { click: function(s) {
|
|
508
461
|
return e.appendPeerNode(e.curNode, e.curData);
|
|
@@ -514,15 +467,15 @@ var A = function() {
|
|
|
514
467
|
return e.removeNodeModal(e.curNode, e.curData);
|
|
515
468
|
} } }, [i("i", { staticClass: "menu-item-icon el-icon-delete", staticStyle: { color: "#f00" } }), e._v(e._s(e.menuLabel.removeNode) + " ")])];
|
|
516
469
|
}, { curNode: e.curNode, curData: e.curData })], 2)]) : e._e()], 1)], 1);
|
|
517
|
-
},
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
470
|
+
}, T = [], K = /* @__PURE__ */ k(
|
|
471
|
+
B,
|
|
472
|
+
_,
|
|
473
|
+
T,
|
|
521
474
|
!1,
|
|
522
475
|
null,
|
|
523
476
|
null
|
|
524
477
|
);
|
|
525
|
-
const
|
|
478
|
+
const z = K.exports;
|
|
526
479
|
export {
|
|
527
|
-
|
|
480
|
+
z as default
|
|
528
481
|
};
|
package/editable-tree/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.editable-tree{position:relative}.editable-tree.et-tree-label-overflow-visible .et-tree-label{position:static}.et-tree-wrapper{text-align:left;flex-direction:column;width:100%;display:flex;overflow:auto}.et-tree-wrapper .el-tree{width:100%;display:table;overflow:visible}.et-tree-wrapper .el-button+.el-button{margin-left:8px!important}.et-tree-wrapper .el-input__inner{padding:0 4px}.et-tree-wrapper .custom-tree-node{align-items:center;width:100%;padding-right:8px;font-size:14px;display:flex}.et-tree-wrapper .custom-tree-node:hover .handle-actions{display:block}.et-tree-wrapper .custom-tree-node .handle-actions{align-self:flex-end;display:none}.et-tree-wrapper .custom-tree-node .node-icon{margin-top:2px;margin-right:4px}.et-tree-wrapper .node-label{align-items:center}.et-tree-wrapper .node-input{min-width:140px;margin-right:10px}.et-tree-wrapper .menu{z-index:3;background:#fff;border-radius:4px;padding:0;position:fixed;box-shadow:0 5px 10px #bebebe}.et-tree-wrapper .menu-item{color:#242f42;white-space:nowrap;cursor:pointer;-webkit-user-select:none
|
|
1
|
+
.editable-tree{position:relative}.editable-tree.et-tree-label-overflow-visible .et-tree-label{position:static}.et-tree-wrapper{text-align:left;flex-direction:column;width:100%;display:flex;overflow:auto}.et-tree-wrapper .el-tree{width:100%;display:table;overflow:visible}.et-tree-wrapper .el-button+.el-button{margin-left:8px!important}.et-tree-wrapper .el-input__inner{padding:0 4px}.et-tree-wrapper .custom-tree-node{align-items:center;width:100%;padding-right:8px;font-size:14px;display:flex}.et-tree-wrapper .custom-tree-node:hover .handle-actions{display:block}.et-tree-wrapper .custom-tree-node .handle-actions{align-self:flex-end;display:none}.et-tree-wrapper .custom-tree-node .node-icon{margin-top:2px;margin-right:4px}.et-tree-wrapper .node-label{align-items:center}.et-tree-wrapper .node-input{min-width:140px;margin-right:10px}.et-tree-wrapper .menu{z-index:3;background:#fff;border-radius:4px;padding:0;position:fixed;box-shadow:0 5px 10px #bebebe}.et-tree-wrapper .menu-item{color:#242f42;white-space:nowrap;cursor:pointer;-webkit-user-select:none;user-select:none;padding:8px 20px 8px 8px;font:11px/100% tahoma,arial,sans-serif;display:block}.et-tree-wrapper .menu .menu-item:hover{color:#66b1ff;background-color:#ecf5ff}.et-tree-wrapper .menu-item-icon{margin-right:4px;font-size:1.3em;font-weight:700}
|