@web-utils/component 4.0.14 → 4.0.15
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/address-input/index.mjs +15 -13
- package/card/index.mjs +20 -18
- package/carousel/index.mjs +12 -10
- package/chat/index.mjs +56 -45
- package/chunk-file-uploader/index.mjs +378 -36
- package/chunk-file-uploader/style.css +1 -1
- package/chunks/{ElementTaskConfig.Bko0kgTp.mjs → ElementTaskConfig.AvBOzAni.mjs} +63 -55
- package/chunks/FormItem.Bhsy_O2B.mjs +372 -0
- package/chunks/FyForm.DriwCJ7b.mjs +765 -0
- package/chunks/SignalAndMessage.BpjOoKhK.mjs +92 -0
- package/chunks/SubTablePlus.BH0IIv3X.mjs +270 -0
- package/chunks/TableColumn.BzivvXMF.mjs +337 -0
- package/chunks/{confirmable-mixin.B2TtLAdk.mjs → confirmable-mixin.BFZb6pcK.mjs} +1 -1
- package/chunks/{dataformat.CpqOeGBl.mjs → dataformat.DJoNBlmI.mjs} +6 -6
- package/chunks/{dic.Dkl-leRW.mjs → dic.BinnDitI.mjs} +9 -9
- package/chunks/{event.9aDS6jcw.mjs → event.DSlcqYHL.mjs} +2 -2
- package/chunks/{form-input.CvFdwlEV.mjs → form-input.BtS_J5a2.mjs} +2 -2
- package/chunks/{index.9OxHjTIE.mjs → index.CIfe3UB3.mjs} +2 -2
- package/chunks/{index.B2TRddqf.mjs → index.Cn7aq-Et.mjs} +8 -8
- package/chunks/{init.DAsXSoLW.mjs → init.xOlFpTyZ.mjs} +2 -2
- package/chunks/{util.DqFv_pWg.mjs → util.DI42t5GU.mjs} +22 -22
- package/color-picker/index.mjs +101 -22
- package/confirm-button/index.mjs +1 -1
- package/confirmable/index.mjs +1 -1
- package/data-box/index.mjs +15 -12
- package/data-card/index.mjs +12 -10
- package/data-card-text/index.mjs +12 -10
- package/data-display/index.mjs +17 -15
- package/data-icons/index.mjs +16 -13
- package/data-imgtext/index.mjs +18 -15
- package/data-operatext/index.mjs +16 -14
- package/data-panel/index.mjs +16 -13
- package/data-pay/index.mjs +20 -16
- package/data-price/index.mjs +16 -14
- package/data-progress/index.mjs +17 -13
- package/data-rotate/index.mjs +15 -12
- package/data-table-picker/index.mjs +18 -15
- package/data-tabs/index.mjs +15 -12
- package/dialog-form/index.mjs +18 -16
- package/dynamic-table/index.mjs +30 -25
- package/editable-progress/index.mjs +11 -9
- package/editable-tree/index.mjs +56 -52
- package/egd-collapse-item/index.mjs +9 -9
- package/element-dialog/index.mjs +23 -22
- package/flex-column/index.mjs +1 -1
- package/flex-item/index.mjs +1 -1
- package/flex-row/index.mjs +1 -1
- package/flow/index.mjs +11 -10
- package/flow-designer/index.mjs +1973 -699
- package/flow-designer/style.css +1 -1
- package/flow-node/index.mjs +1 -1
- package/flow-viewer/index.mjs +9 -9
- package/form-block/index.mjs +34 -32
- package/form-cascader/index.mjs +24 -23
- package/form-checkbox/index.mjs +17 -16
- package/form-checkbox-group/index.mjs +23 -20
- package/form-date-picker/index.mjs +20 -18
- package/form-holder/index.mjs +14 -13
- package/form-input/index.mjs +15 -14
- package/form-input-cron-expression/index.mjs +22 -19
- package/form-input-email/index.mjs +16 -15
- package/form-input-id-card/index.mjs +13 -12
- package/form-input-number/index.mjs +17 -16
- package/form-input-phone-number/index.mjs +22 -21
- package/form-input-tag/index.mjs +15 -14
- package/form-input-time/index.mjs +15 -14
- package/form-item/index.mjs +3 -140
- package/form-item-group/index.mjs +31 -28
- package/form-radio-group/index.mjs +28 -27
- package/form-select/index.mjs +23 -21
- package/form-switch/index.mjs +17 -16
- package/form-table/index.mjs +17 -16
- package/form-table-plus/index.mjs +22 -21
- package/form-textarea/index.mjs +16 -15
- package/form-tree-select/index.mjs +15 -14
- package/form-tree-select-multiple/index.mjs +15 -14
- package/form-view/index.mjs +39 -35
- package/fy-array/index.mjs +37 -33
- package/fy-cascader/index.mjs +17 -16
- package/fy-checkbox/index.mjs +13 -11
- package/fy-code/index.mjs +10 -10
- package/fy-curd/index.mjs +1147 -1123
- package/fy-date/index.mjs +11 -10
- package/fy-draggable/index.mjs +10 -9
- package/fy-dynamic/index.mjs +25 -22
- package/fy-empty/index.mjs +1 -1
- package/fy-form/index.mjs +15 -638
- package/fy-form-design/index.mjs +1165 -1127
- package/fy-input/index.mjs +14 -12
- package/fy-input-color/index.mjs +15 -13
- package/fy-input-icon/index.mjs +23 -20
- package/fy-input-map/index.mjs +31 -28
- package/fy-input-number/index.mjs +10 -9
- package/fy-input-table/index.mjs +22 -18
- package/fy-input-tree/index.mjs +37 -33
- package/fy-progress/index.mjs +10 -9
- package/fy-radio/index.mjs +16 -15
- package/fy-rate/index.mjs +11 -10
- package/fy-select/index.mjs +29 -25
- package/fy-slider/index.mjs +12 -11
- package/fy-switch/index.mjs +10 -9
- package/fy-tabs/index.mjs +17 -15
- package/fy-time/index.mjs +1 -1
- package/fy-title/index.mjs +1 -1
- package/fy-tree/index.mjs +24 -18
- package/fy-u-editor/index.mjs +1 -1
- package/fy-upload/index.mjs +76 -74
- package/guide-steps/index.mjs +13 -11
- package/iframe-window/index.mjs +10 -9
- package/image-cropper/index.mjs +30 -28
- package/image-preview/index.mjs +14 -12
- package/index.mjs +72 -72
- package/input-number/index.mjs +14 -13
- package/input-number-range/index.mjs +12 -11
- package/license/index.mjs +1 -1
- package/login/index.mjs +26 -21
- package/nav-bar/index.mjs +10 -9
- package/notice/index.mjs +10 -9
- package/package.json +1 -1
- package/page-index/index.mjs +13 -12
- package/page-index-top/index.mjs +28 -23
- package/page-skeleton/index.mjs +14 -14
- package/page-skeleton-new/index.mjs +9 -8
- package/pageable-table/index.mjs +182 -172
- package/pageable-view/index.mjs +16 -15
- package/picker-table-view/index.mjs +58 -49
- package/present-view/index.mjs +39 -35
- package/record-video/index.mjs +1 -1
- package/resize-observer/index.mjs +1 -1
- package/search/index.mjs +22 -20
- package/search-popover/index.mjs +1 -1
- package/sign/index.mjs +1 -1
- package/skeleton-panel/index.mjs +10 -9
- package/split-pane/index.mjs +37 -36
- package/static-pageable-table/index.mjs +13 -11
- package/sub-table/index.mjs +49 -36
- package/sub-table-plus/index.mjs +18 -229
- package/swiper/index.mjs +12 -11
- package/table-column/index.mjs +3 -223
- package/table-view/index.mjs +60 -52
- package/tabs-view/index.mjs +19 -17
- package/tag-render/index.mjs +18 -16
- package/text-ellipsis/index.mjs +10 -9
- package/toolbar/index.mjs +14 -13
- package/toolbar-button/index.mjs +14 -13
- package/verify/index.mjs +1 -1
- package/vue-cron/index.mjs +267 -259
- package/watermark/index.mjs +1 -1
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +24 -21
- package/chunks/ElementBaseInfo.ZADwixb5.mjs +0 -125
- package/chunks/ElementForm.CQ3PN5qj.mjs +0 -223
- package/chunks/ElementListeners.De_PRuIm.mjs +0 -215
- package/chunks/ElementMultiInstance.DQo2wuAQ.mjs +0 -181
- package/chunks/ElementOtherConfig.B1NfMTYh.mjs +0 -60
- package/chunks/ElementProperties.CosfDrlW.mjs +0 -112
- package/chunks/FlowCondition.Y6qEYi1T.mjs +0 -102
- package/chunks/FormTemp.BQxO5IQq.mjs +0 -123
- package/chunks/SignalAndMessage.Bb5PFX0N.mjs +0 -85
- package/chunks/UserTaskListeners.Bv3BDfEI.mjs +0 -169
- package/chunks/core.0Exl13Mz.mjs +0 -54
- package/chunks/dictionary.DGt59Ir7.mjs +0 -68
- package/chunks/form-item.LWjePsPa.mjs +0 -233
- package/chunks/sub-table-plus-props.BVsD71hT.mjs +0 -30
- package/chunks/utilSelf.Csq1766E.mjs +0 -48
- package/chunks/utils.DRcxC1Fb.mjs +0 -60
- package/element-listeners/style.css +0 -1
- package/element-multi-instance/style.css +0 -1
package/editable-tree/index.mjs
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import b from "
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import r from "element-ui/lib/button";
|
|
2
|
+
import y from "element-ui/lib/input";
|
|
3
|
+
import x from "element-ui/lib/popconfirm";
|
|
4
|
+
import w from "element-ui/lib/tree";
|
|
5
|
+
import { findTreeChildren as N, delay as C, isUndefined as d, isNotEmpty as g, fastClone as v, isPlainObject as l, isFunction as u, computePosition as $, isVerticalScrollbarVisible as b, scrollbarWidth as _, hasOwn as c } from "@web-utils/core";
|
|
6
|
+
import { removeResizeListener as p, addResizeListener as f } from "@web-utils/integrations/resize";
|
|
7
|
+
import { cloneDeep as m } from "@web-utils/integrations/lodash";
|
|
8
|
+
import { c as k, d as B } from "../chunks/index.Cn7aq-Et.mjs";
|
|
9
|
+
import T from "vue";
|
|
10
|
+
import { n as K } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
11
|
+
function h(t, e) {
|
|
8
12
|
for (const i in e)
|
|
9
|
-
|
|
13
|
+
T.set(t, i, e[i]);
|
|
10
14
|
return t;
|
|
11
15
|
}
|
|
12
|
-
const
|
|
16
|
+
const M = {
|
|
13
17
|
name: "EditableTree",
|
|
14
18
|
props: {
|
|
15
19
|
label: {
|
|
@@ -68,7 +72,7 @@ const B = {
|
|
|
68
72
|
default: () => ({
|
|
69
73
|
children: "children",
|
|
70
74
|
label: "name",
|
|
71
|
-
isLeaf: (t) =>
|
|
75
|
+
isLeaf: (t) => c(t, "hasChildren") ? !t.hasChildren : c(t, "hasChild") ? !t.hasChild : c(t, "children") && t.children ? t.children.length === 0 : !0
|
|
72
76
|
})
|
|
73
77
|
},
|
|
74
78
|
menuLabel: {
|
|
@@ -142,14 +146,14 @@ const B = {
|
|
|
142
146
|
this.tryFetch();
|
|
143
147
|
},
|
|
144
148
|
mounted() {
|
|
145
|
-
|
|
149
|
+
f(this.$refs.tree.$el, this.resize), f(this.$refs.treeWrapper, this.resize);
|
|
146
150
|
},
|
|
147
151
|
beforeDestroy() {
|
|
148
|
-
|
|
152
|
+
p(this.$refs.tree.$el, this.resize), p(this.$refs.treeWrapper, this.resize);
|
|
149
153
|
},
|
|
150
154
|
methods: {
|
|
151
|
-
filterTreeProperties:
|
|
152
|
-
filterTreeEvents:
|
|
155
|
+
filterTreeProperties: B,
|
|
156
|
+
filterTreeEvents: k,
|
|
153
157
|
addExpandKey(t) {
|
|
154
158
|
this.reserveExpandKey && this.expandedKeys.push(t[this.nodeKey]);
|
|
155
159
|
},
|
|
@@ -157,10 +161,10 @@ const B = {
|
|
|
157
161
|
this.reserveExpandKey && (this.expandedKeys = this.expandedKeys.filter((e) => e !== t[this.nodeKey]));
|
|
158
162
|
},
|
|
159
163
|
resize() {
|
|
160
|
-
|
|
164
|
+
b(this.$refs.treeWrapper) ? this.right = 4 + _ : this.right = 4;
|
|
161
165
|
},
|
|
162
166
|
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 =
|
|
167
|
+
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 = $(t, this.$refs.contextMenu), window.addEventListener("click", this.hideContextMenu));
|
|
164
168
|
},
|
|
165
169
|
hideContextMenu() {
|
|
166
170
|
this.showMenu = !1, window.removeEventListener("click", this.hideContextMenu);
|
|
@@ -169,12 +173,12 @@ const B = {
|
|
|
169
173
|
var t;
|
|
170
174
|
if (this.lazy === !1 && this.fetchApi) {
|
|
171
175
|
const e = await this.fetchApi(((t = this.rootNode) == null ? void 0 : t.id) ?? -1, {});
|
|
172
|
-
if (
|
|
173
|
-
const i =
|
|
176
|
+
if (l(e.data) && (e.data = [e.data]), e.data = e.data || [], this.empty = e.data.length === 0, l(this.customRootNode)) {
|
|
177
|
+
const i = m(this.customRootNode);
|
|
174
178
|
i[this.treeProps.children || "children"] = e.data, this.treeData = [i];
|
|
175
|
-
} else if (
|
|
179
|
+
} else if (u(this.customRootNode)) {
|
|
176
180
|
const i = this.customRootNode(e.data);
|
|
177
|
-
i[this.treeProps.children || "children"] = e.data, this.treeData =
|
|
181
|
+
i[this.treeProps.children || "children"] = e.data, this.treeData = l(i) ? [i] : i;
|
|
178
182
|
} else
|
|
179
183
|
this.treeData = e.data;
|
|
180
184
|
}
|
|
@@ -183,12 +187,12 @@ const B = {
|
|
|
183
187
|
var i, s, n;
|
|
184
188
|
if (t.level === 0) {
|
|
185
189
|
const o = await this.fetchApi(((i = this.rootNode) == null ? void 0 : i.id) ?? -1, t);
|
|
186
|
-
if (this.empty = o.data.length === 0,
|
|
187
|
-
const a =
|
|
190
|
+
if (this.empty = o.data.length === 0, l(this.customRootNode)) {
|
|
191
|
+
const a = m(this.customRootNode);
|
|
188
192
|
a[this.treeProps.children || "children"] = o.data, e([a]);
|
|
189
|
-
} else if (
|
|
193
|
+
} else if (u(this.customRootNode)) {
|
|
190
194
|
const a = this.customRootNode(o.data);
|
|
191
|
-
a[this.treeProps.children || "children"] = o.data, this.treeData =
|
|
195
|
+
a[this.treeProps.children || "children"] = o.data, this.treeData = l(a) ? [a] : a;
|
|
192
196
|
} else
|
|
193
197
|
e(o.data);
|
|
194
198
|
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]);
|
|
@@ -209,10 +213,10 @@ const B = {
|
|
|
209
213
|
this.newChild && this.newChild.id === -1 && (console.log(this.newChild), this.$refs.tree.remove(this.newChild), this.$emit("remove-new-node"));
|
|
210
214
|
},
|
|
211
215
|
cancelEdit() {
|
|
212
|
-
this.editData && (
|
|
216
|
+
this.editData && (d(this.editData.edit) ? this.$set(this.editData, "edit", !0) : this.editData.edit = !1);
|
|
213
217
|
},
|
|
214
218
|
async editNode(t, e) {
|
|
215
|
-
!this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.editData = e, this.text = e[this.treeProps.label],
|
|
219
|
+
!this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.editData = e, this.text = e[this.treeProps.label], d(e.edit) ? this.$set(e, "edit", !0) : e.edit = !0, await this.$nextTick(), this.$refs.labelTxt.focus()) : await this.$prompt(`请输入新的${this.label}名:`, {
|
|
216
220
|
...this.defaultOptions,
|
|
217
221
|
inputValue: e[this.treeProps.label],
|
|
218
222
|
beforeClose: async (i, s, n) => {
|
|
@@ -236,7 +240,7 @@ const B = {
|
|
|
236
240
|
try {
|
|
237
241
|
this.createNewChild(-1), e.confirmButtonLoading = !0, e.confirmButtonText = "处理中...";
|
|
238
242
|
const s = await this.saveApi(this.newNodeBuilder(e.inputValue, { id: -1 }));
|
|
239
|
-
this.newChild[this.treeProps.label] = e.inputValue, this.newChild.edit = !1,
|
|
243
|
+
this.newChild[this.treeProps.label] = e.inputValue, this.newChild.edit = !1, h(this.newChild, s.data), this.$refs.tree.root.insertChild({ data: this.newChild }, void 0, !0), await this.locateView(), i();
|
|
240
244
|
} catch {
|
|
241
245
|
e.confirmButtonText = "确定";
|
|
242
246
|
}
|
|
@@ -257,7 +261,7 @@ const B = {
|
|
|
257
261
|
try {
|
|
258
262
|
this.createNewChild(t.data.id), s.confirmButtonLoading = !0, s.confirmButtonText = "处理中...";
|
|
259
263
|
const o = await this.saveApi(this.newNodeBuilder(s.inputValue, t.data));
|
|
260
|
-
this.newChild[this.treeProps.label] = s.inputValue, this.newChild.edit = !1,
|
|
264
|
+
this.newChild[this.treeProps.label] = s.inputValue, this.newChild.edit = !1, h(this.newChild, o.data), this.$refs.tree.append(this.newChild, t), await this.locateView(), n();
|
|
261
265
|
} catch {
|
|
262
266
|
s.confirmButtonText = "确定";
|
|
263
267
|
}
|
|
@@ -355,15 +359,15 @@ const B = {
|
|
|
355
359
|
}
|
|
356
360
|
},
|
|
357
361
|
async onConfirm(t, e) {
|
|
358
|
-
if (e[this.treeProps.label] === this.text || !
|
|
362
|
+
if (e[this.treeProps.label] === this.text || !g(this.text)) {
|
|
359
363
|
this.clear();
|
|
360
364
|
return;
|
|
361
365
|
}
|
|
362
|
-
|
|
366
|
+
d(e.loading) ? this.$set(e, "loading", !0) : e.loading = !0;
|
|
363
367
|
try {
|
|
364
368
|
if (this.loading = !0, e.id === -1) {
|
|
365
|
-
const i = await this.saveApi(this.newNodeBuilder(this.text, t.parent.data || { id: -1 })), s =
|
|
366
|
-
|
|
369
|
+
const i = await this.saveApi(this.newNodeBuilder(this.text, t.parent.data || { id: -1 })), s = v(e);
|
|
370
|
+
h(e, { ...i.data, isTempNode: !1 }), this.$emit("node-added", e, s, t), this.registerNode(t);
|
|
367
371
|
} else
|
|
368
372
|
await this.updateApi({ ...e, [this.treeProps.label]: this.text });
|
|
369
373
|
e[this.treeProps.label] = this.text, e.edit = !1, this.$emit("node-updated", e, t), this.text = "";
|
|
@@ -375,7 +379,7 @@ const B = {
|
|
|
375
379
|
e.id === -1 ? this.$refs.tree.remove(t) : e.edit = !1, this.text = "";
|
|
376
380
|
},
|
|
377
381
|
nodeClick(t, e, i) {
|
|
378
|
-
this.hideContextMenu(), (
|
|
382
|
+
this.hideContextMenu(), (d(t.loading) || !t.loading) && (this.curNode = e, this.curData = t, this.$emit("on-node-click", t, e, i));
|
|
379
383
|
},
|
|
380
384
|
getCurrentNode() {
|
|
381
385
|
return this.$refs.tree.getCurrentNode();
|
|
@@ -387,7 +391,7 @@ const B = {
|
|
|
387
391
|
},
|
|
388
392
|
async scrollIntoView(t) {
|
|
389
393
|
var e, i;
|
|
390
|
-
await this.$nextTick(), t || await
|
|
394
|
+
await this.$nextTick(), t || await C(300), (i = (e = this.$refs) == null ? void 0 : e.labelTxt) == null || i.focus();
|
|
391
395
|
},
|
|
392
396
|
inputKeyup(t, e, i) {
|
|
393
397
|
t.keyCode === 13 && this.onConfirm(e, i), t.keyCode === 27 && this.clear();
|
|
@@ -414,7 +418,7 @@ const B = {
|
|
|
414
418
|
return this.$refs.tree.root;
|
|
415
419
|
},
|
|
416
420
|
findTreeNode(t) {
|
|
417
|
-
return
|
|
421
|
+
return N(this.$refs.tree.root.childNodes, (e) => e.data === t || e.data.id === t, "childNodes");
|
|
418
422
|
},
|
|
419
423
|
registerNode(t) {
|
|
420
424
|
t.store.registerNode(t), delete t.store.nodesMap[-1];
|
|
@@ -424,35 +428,35 @@ const B = {
|
|
|
424
428
|
}
|
|
425
429
|
}
|
|
426
430
|
};
|
|
427
|
-
var
|
|
431
|
+
var P = function() {
|
|
428
432
|
var e = this, i = e._self._c;
|
|
429
|
-
return i("div", { staticClass: "editable-tree" }, [!e.readonly && e.addRootNodeButtonStyle === "top-right" ? i(
|
|
433
|
+
return i("div", { staticClass: "editable-tree" }, [!e.readonly && e.addRootNodeButtonStyle === "top-right" ? i(r, { 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) {
|
|
430
434
|
return s.stopPropagation(), e.$emit("add-root-node");
|
|
431
|
-
} } }) : e._e(), i("div", { ref: "treeWrapper", staticClass: "et-tree-wrapper" }, [!e.readonly && e.addRootNodeButtonStyle === "top" ? i("div", { staticStyle: { "padding-left": "24px" } }, [i(
|
|
435
|
+
} } }) : e._e(), i("div", { ref: "treeWrapper", staticClass: "et-tree-wrapper" }, [!e.readonly && e.addRootNodeButtonStyle === "top" ? i("div", { staticStyle: { "padding-left": "24px" } }, [i(r, { 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(w, 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 }) {
|
|
432
436
|
return [e._t("default", function() {
|
|
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(
|
|
437
|
+
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(y, { 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
438
|
return ((a) => e.inputKeyup(a, s, n)).apply(null, arguments);
|
|
435
439
|
}, click: function(o) {
|
|
436
440
|
o.stopPropagation();
|
|
437
441
|
} }, model: { value: e.text, callback: function(o) {
|
|
438
442
|
e.text = o;
|
|
439
|
-
}, expression: "text" } }), e.confirmButton ? [i(
|
|
443
|
+
}, expression: "text" } }), e.confirmButton ? [i(r, { 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
444
|
return o.stopPropagation(), e.onConfirm(s, n);
|
|
441
|
-
} } }, [e._v("确定")]), i(
|
|
445
|
+
} } }, [e._v("确定")]), i(r, { 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
446
|
return o.stopPropagation(), e.onCancel(s, n);
|
|
443
447
|
} } }, [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() {
|
|
444
448
|
return [e._v(e._s(s.label))];
|
|
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(
|
|
449
|
+
}, { 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(r, { attrs: { size: "mini", type: "text" }, on: { click: function(o) {
|
|
446
450
|
return o.stopPropagation(), e.appendChildNode(s, n);
|
|
447
|
-
} } }, [e._v("添加")]), i(
|
|
451
|
+
} } }, [e._v("添加")]), i(r, { attrs: { size: "mini", type: "text" }, on: { click: function(o) {
|
|
448
452
|
return o.stopPropagation(), e.editNode(s, n);
|
|
449
|
-
} } }, [e._v("修改")]), i(
|
|
453
|
+
} } }, [e._v("修改")]), i(x, { staticClass: "pop-confirm", attrs: { "icon-color": "red", title: "你确定要删除吗?" }, on: { confirm: function(o) {
|
|
450
454
|
return e.removeNode(s, n);
|
|
451
455
|
} }, scopedSlots: e._u([{ key: "reference", fn: function() {
|
|
452
|
-
return [i(
|
|
456
|
+
return [i(r, { 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
457
|
o.stopPropagation();
|
|
454
458
|
} } }, [e._v("删除")])];
|
|
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(
|
|
459
|
+
}, 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(r, { staticStyle: { padding: "6px 10px 0" }, attrs: { size: "mini", type: "text" }, on: { click: function(o) {
|
|
456
460
|
return o.stopPropagation(), e.showContextMenu(o, n, s);
|
|
457
461
|
} } }, [e._v(". . .")])], 1) : e._e()])]];
|
|
458
462
|
}, { node: s, data: n })];
|
|
@@ -467,15 +471,15 @@ var _ = function() {
|
|
|
467
471
|
return e.removeNodeModal(e.curNode, e.curData);
|
|
468
472
|
} } }, [i("i", { staticClass: "menu-item-icon el-icon-delete", staticStyle: { color: "#f00" } }), e._v(e._s(e.menuLabel.removeNode) + " ")])];
|
|
469
473
|
}, { curNode: e.curNode, curData: e.curData })], 2)]) : e._e()], 1)], 1);
|
|
470
|
-
},
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
+
}, D = [], L = /* @__PURE__ */ K(
|
|
475
|
+
M,
|
|
476
|
+
P,
|
|
477
|
+
D,
|
|
474
478
|
!1,
|
|
475
479
|
null,
|
|
476
480
|
null
|
|
477
481
|
);
|
|
478
|
-
const
|
|
482
|
+
const j = L.exports;
|
|
479
483
|
export {
|
|
480
|
-
|
|
484
|
+
j as default
|
|
481
485
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import s from "element-ui/
|
|
1
|
+
import s from "element-ui/lib/transitions/collapse-transition";
|
|
2
|
+
import a from "element-ui/src/mixins/emitter";
|
|
2
3
|
import { generateId as l } from "element-ui/src/utils/util";
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
const c = {
|
|
4
|
+
import { n as c } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
5
|
+
const n = {
|
|
6
6
|
name: "EgdCollapseItem",
|
|
7
|
-
components: { ElCollapseTransition:
|
|
7
|
+
components: { ElCollapseTransition: s },
|
|
8
8
|
componentName: "EgdCollapseItem",
|
|
9
|
-
mixins: [
|
|
9
|
+
mixins: [a],
|
|
10
10
|
inject: ["collapse"],
|
|
11
11
|
props: {
|
|
12
12
|
title: {
|
|
@@ -57,9 +57,9 @@ var o = function() {
|
|
|
57
57
|
e.focusing = !1;
|
|
58
58
|
} } }, [i("i", { staticClass: "el-collapse-item__arrow el-icon-arrow-right", class: { "is-active": e.isActive }, staticStyle: { margin: "0 4px 0 0" } }), e._t("title", function() {
|
|
59
59
|
return [e._v(" " + e._s(e.title) + " ")];
|
|
60
|
-
}, { title: e.title })], 2)]), i(
|
|
61
|
-
}, r = [], d = /* @__PURE__ */
|
|
62
|
-
|
|
60
|
+
}, { title: e.title })], 2)]), i(s, [i("div", { directives: [{ name: "show", rawName: "v-show", value: e.isActive, expression: "isActive" }], staticClass: "el-collapse-item__wrap", attrs: { id: `el-collapse-content-${e.id}`, role: "tabpanel", "aria-hidden": !e.isActive, "aria-labelledby": `el-collapse-head-${e.id}` } }, [i("div", { staticClass: "el-collapse-item__content" }, [e._t("default")], 2)])])], 1);
|
|
61
|
+
}, r = [], d = /* @__PURE__ */ c(
|
|
62
|
+
n,
|
|
63
63
|
o,
|
|
64
64
|
r,
|
|
65
65
|
!1,
|
package/element-dialog/index.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import i from "element-ui/lib/button";
|
|
2
|
+
import { n as s } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
3
|
+
import n from "element-ui/lib/dialog";
|
|
4
|
+
import { dialogDrag as r } from "@web-utils/vue/directives/dialog-drag";
|
|
5
|
+
import { getComputedHeight as d, isDef as p } from "@web-utils/core";
|
|
6
|
+
import { g as c } from "../chunks/index.Cn7aq-Et.mjs";
|
|
7
|
+
const u = {
|
|
7
8
|
name: "EmulateForm",
|
|
8
9
|
provide() {
|
|
9
10
|
return {
|
|
@@ -15,16 +16,16 @@ const p = {
|
|
|
15
16
|
render() {
|
|
16
17
|
return this.$slots.default;
|
|
17
18
|
}
|
|
18
|
-
},
|
|
19
|
-
var
|
|
20
|
-
p,
|
|
21
|
-
c,
|
|
19
|
+
}, f = null, h = null;
|
|
20
|
+
var m = /* @__PURE__ */ s(
|
|
22
21
|
u,
|
|
22
|
+
f,
|
|
23
|
+
h,
|
|
23
24
|
!1,
|
|
24
25
|
null,
|
|
25
26
|
null
|
|
26
27
|
);
|
|
27
|
-
const
|
|
28
|
+
const a = m.exports, g = {
|
|
28
29
|
props: {
|
|
29
30
|
/**
|
|
30
31
|
* 对话框是否可见
|
|
@@ -92,13 +93,13 @@ const h = f.exports, m = {
|
|
|
92
93
|
default: "76vh"
|
|
93
94
|
}
|
|
94
95
|
}
|
|
95
|
-
},
|
|
96
|
+
}, _ = {
|
|
96
97
|
name: "ElementDialog",
|
|
97
|
-
components: { EmulateForm:
|
|
98
|
+
components: { EmulateForm: a },
|
|
98
99
|
directives: {
|
|
99
|
-
dialogDrag:
|
|
100
|
+
dialogDrag: r
|
|
100
101
|
},
|
|
101
|
-
mixins: [...
|
|
102
|
+
mixins: [...c(n).mixins, g],
|
|
102
103
|
props: {
|
|
103
104
|
/**
|
|
104
105
|
* 对话框标题
|
|
@@ -237,7 +238,7 @@ const h = f.exports, m = {
|
|
|
237
238
|
},
|
|
238
239
|
methods: {
|
|
239
240
|
async computeTop() {
|
|
240
|
-
await this.$nextTick(), this.verticalCenter ? this.marginTop = `${(document.body.offsetHeight -
|
|
241
|
+
await this.$nextTick(), this.verticalCenter ? this.marginTop = `${(document.body.offsetHeight - d(this.$refs.dialog)) / 2 + (p(this.offsetTop) ? this.offsetTop : 0)}px` : this.marginTop = this.top;
|
|
241
242
|
},
|
|
242
243
|
toggleFullScreen() {
|
|
243
244
|
this.fullScreen = !this.fullScreen;
|
|
@@ -291,16 +292,16 @@ var y = function() {
|
|
|
291
292
|
e.customClass
|
|
292
293
|
], style: e.style, attrs: { role: "dialog", "aria-modal": "true", "aria-label": e.title || "dialog" } }, [l("div", { staticClass: "el-dialog__header" }, [e._t("title", function() {
|
|
293
294
|
return [l("span", { staticClass: "el-dialog__title" }, [e._v(e._s(e.title))])];
|
|
294
|
-
}), l(
|
|
295
|
-
},
|
|
296
|
-
g,
|
|
297
|
-
y,
|
|
295
|
+
}), l(a, [l("div", { staticClass: "header-button-wrapper" }, [e._t("header-button"), e.showFullScreen ? l(i, { staticClass: "header-button", attrs: { disabled: !1, type: "text", icon: e.fullScreen ? "el-icon-copy-document" : "el-icon-full-screen", size: "medium", title: e.fullScreen ? "还原" : "最大化" }, on: { click: e.toggleFullScreen } }) : e._e(), e.showClose ? l(i, { staticClass: "header-button header-dialog-close", attrs: { disabled: !1, "aria-label": "Close", type: "text", title: "关闭", icon: "el-icon-close", size: "medium" }, on: { click: e.handleClose } }) : e._e()], 2)])], 2), e.rendered ? l("div", { staticClass: "el-dialog__body", style: { height: e.fullScreen ? "100%" : e.height } }, [e.destroyOnClose ? [e.visible ? e._t("default") : e._e()] : e._t("default")], 2) : e._e(), e.shouldShowFooter() ? l("div", { staticClass: "el-dialog__footer" }, [e._t("footer", null, { handleClose: e.handleClose })], 2) : e._e()])])]);
|
|
296
|
+
}, v = [], C = /* @__PURE__ */ s(
|
|
298
297
|
_,
|
|
298
|
+
y,
|
|
299
|
+
v,
|
|
299
300
|
!1,
|
|
300
301
|
null,
|
|
301
302
|
null
|
|
302
303
|
);
|
|
303
|
-
const
|
|
304
|
+
const B = C.exports;
|
|
304
305
|
export {
|
|
305
|
-
|
|
306
|
+
B as default
|
|
306
307
|
};
|
package/flex-column/index.mjs
CHANGED
package/flex-item/index.mjs
CHANGED
package/flex-row/index.mjs
CHANGED
package/flow/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import r from "../flow-node/index.mjs";
|
|
2
|
+
import { t as a, s as l } from "../chunks/util.DI42t5GU.mjs";
|
|
3
|
+
import { n as c } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
4
|
+
const u = {
|
|
4
5
|
name: "Flow",
|
|
5
6
|
props: {
|
|
6
7
|
value: {
|
|
@@ -99,7 +100,7 @@ const c = {
|
|
|
99
100
|
}
|
|
100
101
|
},
|
|
101
102
|
created() {
|
|
102
|
-
this.id =
|
|
103
|
+
this.id = a(), this.jsplumbSetting.Container = this.id;
|
|
103
104
|
},
|
|
104
105
|
mounted() {
|
|
105
106
|
this.init();
|
|
@@ -224,24 +225,24 @@ const c = {
|
|
|
224
225
|
}
|
|
225
226
|
}
|
|
226
227
|
};
|
|
227
|
-
var
|
|
228
|
+
var h = function() {
|
|
228
229
|
var t = this, i = t._self._c;
|
|
229
230
|
return i("div", { staticClass: "avue-flow", style: t.styleName }, [i("div", { style: t.styleName, attrs: { id: t.id } }, [i("div", { staticClass: "avue-grid" }), t._l(t.option.nodeList, function(n, o) {
|
|
230
|
-
return [n.display ? t._e() : i(
|
|
231
|
+
return [n.display ? t._e() : i(r, { key: o, attrs: { id: n.id, node: n, index: o, active: t.active }, on: { changeNodeSite: t.changeNodeSite }, nativeOn: { click: function(s) {
|
|
231
232
|
return t.handleClick(n);
|
|
232
233
|
} }, scopedSlots: t._u([{ key: "header", fn: function({ node: s }) {
|
|
233
234
|
return [t._t("header", null, { node: s })];
|
|
234
235
|
} }], null, !0) }, [t._t("default", null, { node: n })], 2)];
|
|
235
236
|
})], 2)]);
|
|
236
|
-
},
|
|
237
|
-
c,
|
|
237
|
+
}, d = [], m = /* @__PURE__ */ c(
|
|
238
238
|
u,
|
|
239
239
|
h,
|
|
240
|
+
d,
|
|
240
241
|
!1,
|
|
241
242
|
null,
|
|
242
243
|
null
|
|
243
244
|
);
|
|
244
|
-
const
|
|
245
|
+
const b = m.exports;
|
|
245
246
|
export {
|
|
246
|
-
|
|
247
|
+
b as default
|
|
247
248
|
};
|