jmash-core 0.0.9 → 0.0.11
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/dist/{401-C_jDuubo.mjs → 401-BjFOoJaQ.mjs} +13 -15
- package/dist/{404-D1KiG-19.mjs → 404-CT8Yk873.mjs} +1 -1
- package/dist/{BarChart-BiYcyOIt.mjs → BarChart-CbBhpMpZ.mjs} +27 -30
- package/dist/{FileSaver.min-CpTDBPJB.mjs → FileSaver.min-CivbhzMe.mjs} +8 -8
- package/dist/{PieChart-DvQrr19I.mjs → PieChart-B8Tay-HH.mjs} +1 -1
- package/dist/{PieChart.vue_vue_type_script_setup_true_lang-DcF0vyqZ.mjs → PieChart.vue_vue_type_script_setup_true_lang-CH5ME8e4.mjs} +2 -2
- package/dist/{RadarChart-DadH3Bsc.mjs → RadarChart-BzUQwTnX.mjs} +1 -1
- package/dist/{RadarChart.vue_vue_type_script_setup_true_lang-mZYAljbA.mjs → RadarChart.vue_vue_type_script_setup_true_lang-DC-Ww3Mu.mjs} +2 -2
- package/dist/{caret-bottom-ByzDT72p.mjs → caret-bottom-Lhe9M7aA.mjs} +1 -1
- package/dist/{edit-BZ3xqmLv.mjs → edit-5ZpeysVY.mjs} +154 -164
- package/dist/{edit-Cbvy2Sfv.mjs → edit-B95ajyfH.mjs} +1 -1
- package/dist/{edit-Cb6DydNq.mjs → edit-BJAAEDVd.mjs} +1 -1
- package/dist/{edit-CTPp57mz.mjs → edit-C0aHXOi3.mjs} +1 -1
- package/dist/{edit-BEZbUD7x.mjs → edit-CR7ZiKuo.mjs} +47 -58
- package/dist/{edit-BNIu335Q.mjs → edit-DaxU7bBz.mjs} +1 -1
- package/dist/edit-Di-ksvTh.mjs +4 -0
- package/dist/edit-II1vFfNu.mjs +4 -0
- package/dist/{edit.vue_vue_type_script_setup_true_lang-D8zavJFz.mjs → edit.vue_vue_type_script_setup_true_lang-0Q5XHHkN.mjs} +28 -29
- package/dist/{edit.vue_vue_type_script_setup_true_lang-CZoUg9gj.mjs → edit.vue_vue_type_script_setup_true_lang-C-BRxRH6.mjs} +22 -23
- package/dist/{edit.vue_vue_type_script_setup_true_lang-p1_8U_WZ.mjs → edit.vue_vue_type_script_setup_true_lang-CCq_E2KT.mjs} +19 -20
- package/dist/{edit.vue_vue_type_script_setup_true_lang-Dzw7eFuh.mjs → edit.vue_vue_type_script_setup_true_lang-D4w7Aa9M.mjs} +52 -59
- package/dist/{edit.vue_vue_type_script_setup_true_lang-mbsAcwCr.mjs → edit.vue_vue_type_script_setup_true_lang-DqqWi384.mjs} +63 -71
- package/dist/{edit.vue_vue_type_script_setup_true_lang-B87Ti-_7.mjs → edit.vue_vue_type_script_setup_true_lang-VlMd6HAa.mjs} +249 -300
- package/dist/{el-card-CNibUy3q.mjs → el-card-acRFAeYD.mjs} +1 -1
- package/dist/{el-col-faEvjKbh.mjs → el-col-BFrxkvh3.mjs} +16 -16
- package/dist/{el-date-picker-CmipR6MW.mjs → el-date-picker-CjE5H0IY.mjs} +588 -592
- package/dist/{el-dropdown-item-BDZy-ttj.mjs → el-dropdown-item-SBcx6_kX.mjs} +145 -149
- package/dist/{el-tree-select-Czi47mIj.mjs → el-tree-select-RwYP-GEn.mjs} +108 -111
- package/dist/{index-VAf5EsQ5.mjs → index-4UdK9Nb9.mjs} +65 -68
- package/dist/{index-xo5uwQYL.mjs → index-B-lo0ywJ.mjs} +66 -70
- package/dist/{index-CzGRc0hK.mjs → index-B7zhho5d.mjs} +224 -239
- package/dist/{index-LhUQe1Xu.mjs → index-BcstP65E.mjs} +148 -159
- package/dist/{index-5-dP9leL.mjs → index-Bqg1CGw2.mjs} +1 -1
- package/dist/index-CF6p3ONN.mjs +319 -0
- package/dist/{index-CC1cqzhH.mjs → index-CJvo28Bb.mjs} +56 -59
- package/dist/{index-BbdkfW1u.mjs → index-CQlxUoOf.mjs} +1 -1
- package/dist/{index-CugZa1Ys.mjs → index-CS-ceXqM.mjs} +98 -107
- package/dist/{index-BAy-MZyA.mjs → index-CcXjdXcD.mjs} +73 -84
- package/dist/index-ChzNa2kp.mjs +29726 -0
- package/dist/{index-KWJbe1VG.mjs → index-DAIdsjwj.mjs} +98 -107
- package/dist/{index-DqGCMao5.mjs → index-DBmv4w5y.mjs} +5 -5
- package/dist/{index-DJ08yxAP.mjs → index-DQbHbpgW.mjs} +1 -1
- package/dist/{index-ChvYPMES.mjs → index-DQtth-qu.mjs} +55 -58
- package/dist/{index-TIICDILF.mjs → index-DvrFzTq2.mjs} +1 -1
- package/dist/{index-X9SBRcLU.mjs → index-Dyn0k8Ib.mjs} +102 -106
- package/dist/{index-DrDJJbqj.mjs → index-SUlMvdOg.mjs} +72 -82
- package/dist/{index-D4nHCHVJ.mjs → index-hr-nwn6C.mjs} +1 -1
- package/dist/{index-uMGobxHH.mjs → index-u66O7nvc.mjs} +35 -39
- package/dist/index.mjs +25 -25
- package/dist/{picture-BT7yeXEj.mjs → picture-877nN1qH.mjs} +26 -27
- package/dist/profile-BfDHQ_n5.mjs +261 -0
- package/dist/style.css +1 -1
- package/dist/{types-fCJt2Tua.mjs → types-D2vHMNqn.mjs} +45 -46
- package/dist/{updatePwd-DgqhTWUV.mjs → updatePwd-Dc31cBOV.mjs} +1 -1
- package/dist/{updatePwd.vue_vue_type_script_setup_true_lang-B6YhGyCY.mjs → updatePwd.vue_vue_type_script_setup_true_lang-Do-jRGf0.mjs} +24 -25
- package/package.json +1 -1
- package/dist/_plugin-vue_export-helper-CHgC5LLL.mjs +0 -9
- package/dist/debounce-D-IJxfPF.mjs +0 -81
- package/dist/dropdown2-Cnd0SGXe.mjs +0 -160
- package/dist/edit-D9vdHRed.mjs +0 -4
- package/dist/edit-NenpQsL5.mjs +0 -4
- package/dist/el-checkbox-Bb05WXyt.mjs +0 -547
- package/dist/el-dialog-ttaEYSPa.mjs +0 -378
- package/dist/el-icon-l0sNRNKZ.mjs +0 -1
- package/dist/el-popover-CRZimqDD.mjs +0 -159
- package/dist/el-popper-D2LHTqDy.mjs +0 -1656
- package/dist/el-progress-COmCqT1a.mjs +0 -897
- package/dist/el-radio-BKt8lW7J.mjs +0 -251
- package/dist/el-scrollbar-CcOhSvuU.mjs +0 -606
- package/dist/el-select-BLskFr20.mjs +0 -1040
- package/dist/el-switch-BL2KLnPo.mjs +0 -254
- package/dist/el-table-AWydVCJY.mjs +0 -3167
- package/dist/el-tag-l0sNRNKZ.mjs +0 -1
- package/dist/el-tooltip-l0sNRNKZ.mjs +0 -1
- package/dist/importUpload.vue_vue_type_script_setup_true_lang-uF63aa0G.mjs +0 -116
- package/dist/index-BEjEqYND.mjs +0 -107
- package/dist/index-Dd6PCsAJ.mjs +0 -328
- package/dist/index-DjkMA-Wh.mjs +0 -40
- package/dist/index-HyB-t-wB.mjs +0 -633
- package/dist/index-PuLggzCy.mjs +0 -19287
- package/dist/index.vue_vue_type_script_setup_true_lang-BCQXNjtA.mjs +0 -57
- package/dist/index.vue_vue_type_script_setup_true_lang-BIbfa3W2.mjs +0 -286
- package/dist/index.vue_vue_type_style_index_0_scope_true_lang-AvcZIlmm.mjs +0 -119
- package/dist/isUndefined-CUQZk6oB.mjs +0 -6
- package/dist/profile-fw7e0wjU.mjs +0 -319
- package/dist/refs-B_ySplLd.mjs +0 -9
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { reactive as _, defineComponent as H, inject as V, h as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { _ as nt } from "./index-D4nHCHVJ.mjs";
|
|
5
|
-
import { E as ot, p as re } from "./el-checkbox-Bb05WXyt.mjs";
|
|
6
|
-
import { a as dt } from "./el-scrollbar-CcOhSvuU.mjs";
|
|
1
|
+
import { reactive as _, defineComponent as H, inject as V, h as X, renderSlot as xe, provide as Z, ref as w, getCurrentInstance as me, watch as x, nextTick as R, resolveComponent as I, withDirectives as he, openBlock as A, createElementBlock as j, normalizeClass as T, withModifiers as L, createElementVNode as ue, normalizeStyle as Pe, createBlock as P, withCtx as ie, resolveDynamicComponent as je, createCommentVNode as J, createVNode as le, Fragment as Se, renderList as Ae, vShow as fe, shallowRef as Ee, onMounted as Oe, onUpdated as Fe, computed as B, toDisplayString as Ve, toRefs as Te } from "vue";
|
|
2
|
+
import { bU as ye, s as Re, u as U, _ as se, r as ce, e as He, aL as Ue, E as We, bV as Ye, bI as Je, bW as Xe, ax as Le, k as Ze, an as Ge, c as M, i as Qe, af as _e, bX as et, bY as re, a2 as pe, bZ as ee, a1 as De, bJ as tt, b_ as nt, b$ as ot } from "./index-ChzNa2kp.mjs";
|
|
3
|
+
import { _ as dt } from "./index-hr-nwn6C.mjs";
|
|
7
4
|
const F = "$treeNodeId", we = function(e, t) {
|
|
8
5
|
!t || t[F] || Object.defineProperty(t, F, {
|
|
9
6
|
value: e.id,
|
|
@@ -32,7 +29,7 @@ const F = "$treeNodeId", we = function(e, t) {
|
|
|
32
29
|
t ? (e.checked = !0, e.indeterminate = !1) : d ? (e.checked = !1, e.indeterminate = !0) : o && (e.checked = !1, e.indeterminate = !1);
|
|
33
30
|
const n = e.parent;
|
|
34
31
|
!n || n.level === 0 || e.store.checkStrictly || te(n);
|
|
35
|
-
},
|
|
32
|
+
}, Q = function(e, t) {
|
|
36
33
|
const o = e.store.props, d = e.data || {}, n = o[t];
|
|
37
34
|
if (typeof n == "function")
|
|
38
35
|
return n(d, e);
|
|
@@ -48,7 +45,7 @@ class $ {
|
|
|
48
45
|
constructor(t) {
|
|
49
46
|
this.id = rt++, this.text = null, this.checked = !1, this.indeterminate = !1, this.data = null, this.expanded = !1, this.parent = null, this.visible = !0, this.isCurrent = !1, this.canFocus = !1;
|
|
50
47
|
for (const o in t)
|
|
51
|
-
|
|
48
|
+
ye(t, o) && (this[o] = t[o]);
|
|
52
49
|
this.level = 0, this.loaded = !1, this.childNodes = [], this.loading = !1, this.parent && (this.level = this.parent.level + 1);
|
|
53
50
|
}
|
|
54
51
|
initialize() {
|
|
@@ -58,7 +55,7 @@ class $ {
|
|
|
58
55
|
t.registerNode(this);
|
|
59
56
|
const o = t.props;
|
|
60
57
|
if (o && typeof o.isLeaf < "u") {
|
|
61
|
-
const r =
|
|
58
|
+
const r = Q(this, "isLeaf");
|
|
62
59
|
typeof r == "boolean" && (this.isLeafByUser = r);
|
|
63
60
|
}
|
|
64
61
|
if (t.lazy !== !0 && this.data ? (this.setData(this.data), t.defaultExpandAll && (this.expanded = !0, this.canFocus = !0)) : this.level > 0 && t.lazy && t.defaultExpandAll && this.expand(), Array.isArray(this.data) || we(this, this.data), !this.data)
|
|
@@ -69,19 +66,19 @@ class $ {
|
|
|
69
66
|
setData(t) {
|
|
70
67
|
Array.isArray(t) || we(this, t), this.data = t, this.childNodes = [];
|
|
71
68
|
let o;
|
|
72
|
-
this.level === 0 && Array.isArray(this.data) ? o = this.data : o =
|
|
69
|
+
this.level === 0 && Array.isArray(this.data) ? o = this.data : o = Q(this, "children") || [];
|
|
73
70
|
for (let d = 0, n = o.length; d < n; d++)
|
|
74
71
|
this.insertChild({ data: o[d] });
|
|
75
72
|
}
|
|
76
73
|
get label() {
|
|
77
|
-
return
|
|
74
|
+
return Q(this, "label");
|
|
78
75
|
}
|
|
79
76
|
get key() {
|
|
80
77
|
const t = this.store.key;
|
|
81
78
|
return this.data ? this.data[t] : null;
|
|
82
79
|
}
|
|
83
80
|
get disabled() {
|
|
84
|
-
return
|
|
81
|
+
return Q(this, "disabled");
|
|
85
82
|
}
|
|
86
83
|
get nextSibling() {
|
|
87
84
|
const t = this.parent;
|
|
@@ -254,7 +251,7 @@ class st {
|
|
|
254
251
|
constructor(t) {
|
|
255
252
|
this.currentNode = null, this.currentNodeKey = null;
|
|
256
253
|
for (const o in t)
|
|
257
|
-
|
|
254
|
+
ye(t, o) && (this[o] = t[o]);
|
|
258
255
|
this.nodesMap = {};
|
|
259
256
|
}
|
|
260
257
|
initialize() {
|
|
@@ -288,7 +285,7 @@ class st {
|
|
|
288
285
|
getNode(t) {
|
|
289
286
|
if (t instanceof $)
|
|
290
287
|
return t;
|
|
291
|
-
const o =
|
|
288
|
+
const o = Re(t) ? be(this.key, t) : t;
|
|
292
289
|
return this.nodesMap[o] || null;
|
|
293
290
|
}
|
|
294
291
|
insertBefore(t, o) {
|
|
@@ -354,7 +351,7 @@ class st {
|
|
|
354
351
|
_getAllNodes() {
|
|
355
352
|
const t = [], o = this.nodesMap;
|
|
356
353
|
for (const d in o)
|
|
357
|
-
|
|
354
|
+
ye(o, d) && t.push(o[d]);
|
|
358
355
|
return t;
|
|
359
356
|
}
|
|
360
357
|
updateChildren(t, o) {
|
|
@@ -457,8 +454,8 @@ const at = H({
|
|
|
457
454
|
const t = U("tree"), o = V("NodeInstance"), d = V("RootTree");
|
|
458
455
|
return () => {
|
|
459
456
|
const n = e.node, { data: r, store: l } = n;
|
|
460
|
-
return e.renderContent ? e.renderContent(
|
|
461
|
-
|
|
457
|
+
return e.renderContent ? e.renderContent(X, { _self: o, node: n, data: r, store: l }) : xe(d.ctx.slots, "default", { node: n, data: r }, () => [
|
|
458
|
+
X("span", { class: t.be("node", "label") }, [n.label])
|
|
462
459
|
]);
|
|
463
460
|
};
|
|
464
461
|
}
|
|
@@ -471,7 +468,7 @@ function Me(e) {
|
|
|
471
468
|
},
|
|
472
469
|
children: []
|
|
473
470
|
};
|
|
474
|
-
return t && t.children.push(o),
|
|
471
|
+
return t && t.children.push(o), Z("TreeNodeMap", o), {
|
|
475
472
|
broadcastExpanded: (d) => {
|
|
476
473
|
if (e.accordion)
|
|
477
474
|
for (const n of o.children)
|
|
@@ -488,7 +485,7 @@ function lt({ props: e, ctx: t, el$: o, dropIndicator$: d, store: n }) {
|
|
|
488
485
|
allowDrop: !0,
|
|
489
486
|
dropType: null
|
|
490
487
|
});
|
|
491
|
-
return
|
|
488
|
+
return Z(Ie, {
|
|
492
489
|
treeNodeDragStart: ({ event: u, treeNode: a }) => {
|
|
493
490
|
if (typeof e.allowDrag == "function" && !e.allowDrag(a.node))
|
|
494
491
|
return u.preventDefault(), !1;
|
|
@@ -505,16 +502,16 @@ function lt({ props: e, ctx: t, el$: o, dropIndicator$: d, store: n }) {
|
|
|
505
502
|
const y = l.value.draggingNode;
|
|
506
503
|
if (!y || !s)
|
|
507
504
|
return;
|
|
508
|
-
let C = !0, k = !0, m = !0,
|
|
509
|
-
typeof e.allowDrop == "function" && (C = e.allowDrop(y.node, s.node, "prev"),
|
|
505
|
+
let C = !0, k = !0, m = !0, S = !0;
|
|
506
|
+
typeof e.allowDrop == "function" && (C = e.allowDrop(y.node, s.node, "prev"), S = k = e.allowDrop(y.node, s.node, "inner"), m = e.allowDrop(y.node, s.node, "next")), u.dataTransfer.dropEffect = k || C || m ? "move" : "none", (C || k || m) && (f == null ? void 0 : f.node.id) !== s.node.id && (f && t.emit("node-drag-leave", y.node, f.node, u), t.emit("node-drag-enter", y.node, s.node, u)), C || k || m ? l.value.dropNode = s : l.value.dropNode = null, s.node.nextSibling === y.node && (m = !1), s.node.previousSibling === y.node && (C = !1), s.node.contains(y.node, !1) && (k = !1), (y.node === s.node || y.node.contains(s.node)) && (C = !1, k = !1, m = !1);
|
|
510
507
|
const v = s.$el.querySelector(`.${r.be("node", "content")}`).getBoundingClientRect(), O = o.value.getBoundingClientRect();
|
|
511
|
-
let
|
|
512
|
-
const D = C ? k ? 0.25 : m ? 0.45 : 1 : -1,
|
|
513
|
-
let
|
|
508
|
+
let E;
|
|
509
|
+
const D = C ? k ? 0.25 : m ? 0.45 : 1 : -1, G = m ? k ? 0.75 : C ? 0.55 : 0 : 1;
|
|
510
|
+
let z = -9999;
|
|
514
511
|
const p = u.clientY - v.top;
|
|
515
|
-
p < v.height * D ?
|
|
516
|
-
const b = s.$el.querySelector(`.${r.be("node", "expand-icon")}`).getBoundingClientRect(),
|
|
517
|
-
|
|
512
|
+
p < v.height * D ? E = "before" : p > v.height * G ? E = "after" : k ? E = "inner" : E = "none";
|
|
513
|
+
const b = s.$el.querySelector(`.${r.be("node", "expand-icon")}`).getBoundingClientRect(), K = d.value;
|
|
514
|
+
E === "before" ? z = b.top - O.top : E === "after" && (z = b.bottom - O.top), K.style.top = `${z}px`, K.style.left = `${b.right - O.left}px`, E === "inner" ? He(s.$el, r.is("drop-inner")) : ce(s.$el, r.is("drop-inner")), l.value.showDropIndicator = E === "before" || E === "after", l.value.allowDrop = l.value.showDropIndicator || S, l.value.dropType = E, t.emit("node-drag-over", y.node, s.node, u);
|
|
518
515
|
},
|
|
519
516
|
treeNodeDragEnd: (u) => {
|
|
520
517
|
const { draggingNode: a, dropType: s, dropNode: f } = l.value;
|
|
@@ -531,11 +528,11 @@ function lt({ props: e, ctx: t, el$: o, dropIndicator$: d, store: n }) {
|
|
|
531
528
|
const ct = H({
|
|
532
529
|
name: "ElTreeNode",
|
|
533
530
|
components: {
|
|
534
|
-
ElCollapseTransition:
|
|
535
|
-
ElCheckbox:
|
|
531
|
+
ElCollapseTransition: dt,
|
|
532
|
+
ElCheckbox: Ue,
|
|
536
533
|
NodeContent: it,
|
|
537
|
-
ElIcon:
|
|
538
|
-
Loading:
|
|
534
|
+
ElIcon: We,
|
|
535
|
+
Loading: Ye
|
|
539
536
|
},
|
|
540
537
|
props: {
|
|
541
538
|
node: {
|
|
@@ -557,49 +554,49 @@ const ct = H({
|
|
|
557
554
|
emits: ["node-expand"],
|
|
558
555
|
setup(e, t) {
|
|
559
556
|
const o = U("tree"), { broadcastExpanded: d } = Me(e), n = V("RootTree"), r = w(!1), l = w(!1), c = w(null), i = w(null), g = w(null), u = V(Ie), a = me();
|
|
560
|
-
|
|
557
|
+
Z("NodeInstance", a), n || Je("Tree", "Can not find node's tree."), e.node.expanded && (r.value = !0, l.value = !0);
|
|
561
558
|
const s = n.props.props.children || "children";
|
|
562
|
-
|
|
559
|
+
x(() => {
|
|
563
560
|
const p = e.node.data[s];
|
|
564
561
|
return p && [...p];
|
|
565
562
|
}, () => {
|
|
566
563
|
e.node.updateChildren();
|
|
567
|
-
}),
|
|
564
|
+
}), x(() => e.node.indeterminate, (p) => {
|
|
568
565
|
C(e.node.checked, p);
|
|
569
|
-
}),
|
|
566
|
+
}), x(() => e.node.checked, (p) => {
|
|
570
567
|
C(p, e.node.indeterminate);
|
|
571
|
-
}),
|
|
568
|
+
}), x(() => e.node.expanded, (p) => {
|
|
572
569
|
R(() => r.value = p), p && (l.value = !0);
|
|
573
570
|
});
|
|
574
571
|
const f = (p) => be(n.props.nodeKey, p.data), y = (p) => {
|
|
575
572
|
const b = e.props.class;
|
|
576
573
|
if (!b)
|
|
577
574
|
return {};
|
|
578
|
-
let
|
|
575
|
+
let K;
|
|
579
576
|
if (Le(b)) {
|
|
580
577
|
const { data: ae } = p;
|
|
581
|
-
|
|
578
|
+
K = b(ae, p);
|
|
582
579
|
} else
|
|
583
|
-
|
|
584
|
-
return
|
|
580
|
+
K = b;
|
|
581
|
+
return Ze(K) ? { [K]: !0 } : K;
|
|
585
582
|
}, C = (p, b) => {
|
|
586
583
|
(c.value !== p || i.value !== b) && n.ctx.emit("check-change", e.node.data, p, b), c.value = p, i.value = b;
|
|
587
584
|
}, k = (p) => {
|
|
588
|
-
ge(n.store, n.ctx.emit, () => n.store.value.setCurrentNode(e.node)), n.currentNode.value = e.node, n.props.expandOnClickNode &&
|
|
585
|
+
ge(n.store, n.ctx.emit, () => n.store.value.setCurrentNode(e.node)), n.currentNode.value = e.node, n.props.expandOnClickNode && S(), n.props.checkOnClickNode && !e.node.disabled && v(null, {
|
|
589
586
|
target: { checked: !e.node.checked }
|
|
590
587
|
}), n.ctx.emit("node-click", e.node.data, e.node, a, p);
|
|
591
588
|
}, m = (p) => {
|
|
592
589
|
n.instance.vnode.props.onNodeContextmenu && (p.stopPropagation(), p.preventDefault()), n.ctx.emit("node-contextmenu", p, e.node.data, e.node, a);
|
|
593
|
-
},
|
|
590
|
+
}, S = () => {
|
|
594
591
|
e.node.isLeaf || (r.value ? (n.ctx.emit("node-collapse", e.node.data, e.node, a), e.node.collapse()) : (e.node.expand(), t.emit("node-expand", e.node.data, e.node, a)));
|
|
595
592
|
}, v = (p, b) => {
|
|
596
593
|
e.node.setChecked(b.target.checked, !n.props.checkStrictly), R(() => {
|
|
597
|
-
const
|
|
594
|
+
const K = n.store.value;
|
|
598
595
|
n.ctx.emit("check", e.node.data, {
|
|
599
|
-
checkedNodes:
|
|
600
|
-
checkedKeys:
|
|
601
|
-
halfCheckedNodes:
|
|
602
|
-
halfCheckedKeys:
|
|
596
|
+
checkedNodes: K.getCheckedNodes(),
|
|
597
|
+
checkedKeys: K.getCheckedKeys(),
|
|
598
|
+
halfCheckedNodes: K.getHalfCheckedNodes(),
|
|
599
|
+
halfCheckedKeys: K.getHalfCheckedKeys()
|
|
603
600
|
});
|
|
604
601
|
});
|
|
605
602
|
};
|
|
@@ -616,10 +613,10 @@ const ct = H({
|
|
|
616
613
|
handleSelectChange: C,
|
|
617
614
|
handleClick: k,
|
|
618
615
|
handleContextMenu: m,
|
|
619
|
-
handleExpandIconClick:
|
|
616
|
+
handleExpandIconClick: S,
|
|
620
617
|
handleCheckChange: v,
|
|
621
|
-
handleChildNodeExpand: (p, b,
|
|
622
|
-
d(b), n.ctx.emit("node-expand", p, b,
|
|
618
|
+
handleChildNodeExpand: (p, b, K) => {
|
|
619
|
+
d(b), n.ctx.emit("node-expand", p, b, K);
|
|
623
620
|
},
|
|
624
621
|
handleDragStart: (p) => {
|
|
625
622
|
n.props.draggable && u.treeNodeDragStart({ event: p, treeNode: e });
|
|
@@ -636,7 +633,7 @@ const ct = H({
|
|
|
636
633
|
handleDragEnd: (p) => {
|
|
637
634
|
n.props.draggable && u.treeNodeDragEnd(p);
|
|
638
635
|
},
|
|
639
|
-
CaretRight:
|
|
636
|
+
CaretRight: Xe
|
|
640
637
|
};
|
|
641
638
|
}
|
|
642
639
|
}), ht = ["aria-expanded", "aria-disabled", "aria-checked", "draggable", "data-key"], ut = ["aria-expanded"];
|
|
@@ -686,7 +683,7 @@ function ft(e, t, o, d, n, r) {
|
|
|
686
683
|
(A(), P(je(e.tree.props.icon || e.CaretRight)))
|
|
687
684
|
]),
|
|
688
685
|
_: 1
|
|
689
|
-
}, 8, ["class", "onClick"])) :
|
|
686
|
+
}, 8, ["class", "onClick"])) : J("v-if", !0),
|
|
690
687
|
e.showCheckbox ? (A(), P(c, {
|
|
691
688
|
key: 1,
|
|
692
689
|
"model-value": e.node.checked,
|
|
@@ -695,7 +692,7 @@ function ft(e, t, o, d, n, r) {
|
|
|
695
692
|
onClick: t[0] || (t[0] = L(() => {
|
|
696
693
|
}, ["stop"])),
|
|
697
694
|
onChange: e.handleCheckChange
|
|
698
|
-
}, null, 8, ["model-value", "indeterminate", "disabled", "onChange"])) :
|
|
695
|
+
}, null, 8, ["model-value", "indeterminate", "disabled", "onChange"])) : J("v-if", !0),
|
|
699
696
|
e.node.loading ? (A(), P(l, {
|
|
700
697
|
key: 2,
|
|
701
698
|
class: T([e.ns.be("node", "loading-icon"), e.ns.is("loading")])
|
|
@@ -704,7 +701,7 @@ function ft(e, t, o, d, n, r) {
|
|
|
704
701
|
le(i)
|
|
705
702
|
]),
|
|
706
703
|
_: 1
|
|
707
|
-
}, 8, ["class"])) :
|
|
704
|
+
}, 8, ["class"])) : J("v-if", !0),
|
|
708
705
|
le(g, {
|
|
709
706
|
node: e.node,
|
|
710
707
|
"render-content": e.renderContent
|
|
@@ -718,7 +715,7 @@ function ft(e, t, o, d, n, r) {
|
|
|
718
715
|
role: "group",
|
|
719
716
|
"aria-expanded": e.expanded
|
|
720
717
|
}, [
|
|
721
|
-
(A(!0), j(
|
|
718
|
+
(A(!0), j(Se, null, Ae(e.node.childNodes, (s) => (A(), P(u, {
|
|
722
719
|
key: e.getNodeKey(s),
|
|
723
720
|
"render-content": e.renderContent,
|
|
724
721
|
"render-after-expand": e.renderAfterExpand,
|
|
@@ -730,7 +727,7 @@ function ft(e, t, o, d, n, r) {
|
|
|
730
727
|
}, null, 8, ["render-content", "render-after-expand", "show-checkbox", "node", "accordion", "props", "onNodeExpand"]))), 128))
|
|
731
728
|
], 10, ut)), [
|
|
732
729
|
[fe, e.expanded]
|
|
733
|
-
]) :
|
|
730
|
+
]) : J("v-if", !0)
|
|
734
731
|
]),
|
|
735
732
|
_: 1
|
|
736
733
|
})
|
|
@@ -740,16 +737,16 @@ function ft(e, t, o, d, n, r) {
|
|
|
740
737
|
}
|
|
741
738
|
var yt = /* @__PURE__ */ se(ct, [["render", ft], ["__file", "tree-node.vue"]]);
|
|
742
739
|
function pt({ el$: e }, t) {
|
|
743
|
-
const o = U("tree"), d =
|
|
740
|
+
const o = U("tree"), d = Ee([]), n = Ee([]);
|
|
744
741
|
Oe(() => {
|
|
745
742
|
l();
|
|
746
743
|
}), Fe(() => {
|
|
747
744
|
d.value = Array.from(e.value.querySelectorAll("[role=treeitem]")), n.value = Array.from(e.value.querySelectorAll("input[type=checkbox]"));
|
|
748
|
-
}),
|
|
745
|
+
}), x(n, (c) => {
|
|
749
746
|
c.forEach((i) => {
|
|
750
747
|
i.setAttribute("tabindex", "-1");
|
|
751
748
|
});
|
|
752
|
-
}),
|
|
749
|
+
}), Ge(e, "keydown", (c) => {
|
|
753
750
|
const i = c.target;
|
|
754
751
|
if (!i.className.includes(o.b("node")))
|
|
755
752
|
return;
|
|
@@ -862,7 +859,7 @@ const gt = H({
|
|
|
862
859
|
default: 18
|
|
863
860
|
},
|
|
864
861
|
icon: {
|
|
865
|
-
type:
|
|
862
|
+
type: Qe
|
|
866
863
|
}
|
|
867
864
|
},
|
|
868
865
|
emits: [
|
|
@@ -881,7 +878,7 @@ const gt = H({
|
|
|
881
878
|
"node-drag-over"
|
|
882
879
|
],
|
|
883
880
|
setup(e, t) {
|
|
884
|
-
const { t: o } =
|
|
881
|
+
const { t: o } = _e(), d = U("tree"), n = w(new st({
|
|
885
882
|
key: e.nodeKey,
|
|
886
883
|
data: e.data,
|
|
887
884
|
lazy: e.lazy,
|
|
@@ -909,15 +906,15 @@ const gt = H({
|
|
|
909
906
|
const { childNodes: h } = r.value;
|
|
910
907
|
return !h || h.length === 0 || h.every(({ visible: N }) => !N);
|
|
911
908
|
});
|
|
912
|
-
|
|
909
|
+
x(() => e.currentNodeKey, (h) => {
|
|
913
910
|
n.value.setCurrentNodeKey(h);
|
|
914
|
-
}),
|
|
911
|
+
}), x(() => e.defaultCheckedKeys, (h) => {
|
|
915
912
|
n.value.setDefaultCheckedKey(h);
|
|
916
|
-
}),
|
|
913
|
+
}), x(() => e.defaultExpandedKeys, (h) => {
|
|
917
914
|
n.value.setDefaultExpandedKeys(h);
|
|
918
|
-
}),
|
|
915
|
+
}), x(() => e.data, (h) => {
|
|
919
916
|
n.value.setData(h);
|
|
920
|
-
}, { deep: !0 }),
|
|
917
|
+
}, { deep: !0 }), x(() => e.checkStrictly, (h) => {
|
|
921
918
|
n.value.checkStrictly = h;
|
|
922
919
|
});
|
|
923
920
|
const s = (h) => {
|
|
@@ -930,15 +927,15 @@ const gt = H({
|
|
|
930
927
|
const N = n.value.getNode(h);
|
|
931
928
|
if (!N)
|
|
932
929
|
return [];
|
|
933
|
-
const
|
|
930
|
+
const q = [N.data];
|
|
934
931
|
let W = N.parent;
|
|
935
932
|
for (; W && W !== r.value; )
|
|
936
|
-
|
|
937
|
-
return
|
|
933
|
+
q.push(W.data), W = W.parent;
|
|
934
|
+
return q.reverse();
|
|
938
935
|
}, C = (h, N) => n.value.getCheckedNodes(h, N), k = (h) => n.value.getCheckedKeys(h), m = () => {
|
|
939
936
|
const h = n.value.getCurrentNode();
|
|
940
937
|
return h ? h.data : null;
|
|
941
|
-
},
|
|
938
|
+
}, S = () => {
|
|
942
939
|
if (!e.nodeKey)
|
|
943
940
|
throw new Error("[Tree] nodeKey is required in getCurrentKey");
|
|
944
941
|
const h = m();
|
|
@@ -951,9 +948,9 @@ const gt = H({
|
|
|
951
948
|
if (!e.nodeKey)
|
|
952
949
|
throw new Error("[Tree] nodeKey is required in setCheckedKeys");
|
|
953
950
|
n.value.setCheckedKeys(h, N);
|
|
954
|
-
},
|
|
955
|
-
n.value.setChecked(h, N,
|
|
956
|
-
}, D = () => n.value.getHalfCheckedNodes(),
|
|
951
|
+
}, E = (h, N, q) => {
|
|
952
|
+
n.value.setChecked(h, N, q);
|
|
953
|
+
}, D = () => n.value.getHalfCheckedNodes(), G = () => n.value.getHalfCheckedKeys(), z = (h, N = !0) => {
|
|
957
954
|
if (!e.nodeKey)
|
|
958
955
|
throw new Error("[Tree] nodeKey is required in setCurrentNode");
|
|
959
956
|
ge(n, t.emit, () => n.value.setUserCurrentNode(h, N));
|
|
@@ -961,7 +958,7 @@ const gt = H({
|
|
|
961
958
|
if (!e.nodeKey)
|
|
962
959
|
throw new Error("[Tree] nodeKey is required in setCurrentKey");
|
|
963
960
|
ge(n, t.emit, () => n.value.setCurrentNodeKey(h, N));
|
|
964
|
-
}, b = (h) => n.value.getNode(h),
|
|
961
|
+
}, b = (h) => n.value.getNode(h), K = (h) => {
|
|
965
962
|
n.value.remove(h);
|
|
966
963
|
}, ae = (h, N) => {
|
|
967
964
|
n.value.append(h, N);
|
|
@@ -969,21 +966,21 @@ const gt = H({
|
|
|
969
966
|
n.value.insertBefore(h, N);
|
|
970
967
|
}, $e = (h, N) => {
|
|
971
968
|
n.value.insertAfter(h, N);
|
|
972
|
-
},
|
|
973
|
-
g(N), t.emit("node-expand", h, N,
|
|
974
|
-
},
|
|
969
|
+
}, ze = (h, N, q) => {
|
|
970
|
+
g(N), t.emit("node-expand", h, N, q);
|
|
971
|
+
}, qe = (h, N) => {
|
|
975
972
|
if (!e.nodeKey)
|
|
976
973
|
throw new Error("[Tree] nodeKey is required in updateKeyChild");
|
|
977
974
|
n.value.updateChildren(h, N);
|
|
978
975
|
};
|
|
979
|
-
return
|
|
976
|
+
return Z("RootTree", {
|
|
980
977
|
ctx: t,
|
|
981
978
|
props: e,
|
|
982
979
|
store: n,
|
|
983
980
|
root: r,
|
|
984
981
|
currentNode: l,
|
|
985
982
|
instance: me()
|
|
986
|
-
}),
|
|
983
|
+
}), Z(et, void 0), {
|
|
987
984
|
ns: d,
|
|
988
985
|
store: n,
|
|
989
986
|
root: r,
|
|
@@ -998,22 +995,22 @@ const gt = H({
|
|
|
998
995
|
getCheckedNodes: C,
|
|
999
996
|
getCheckedKeys: k,
|
|
1000
997
|
getCurrentNode: m,
|
|
1001
|
-
getCurrentKey:
|
|
998
|
+
getCurrentKey: S,
|
|
1002
999
|
setCheckedNodes: v,
|
|
1003
1000
|
setCheckedKeys: O,
|
|
1004
|
-
setChecked:
|
|
1001
|
+
setChecked: E,
|
|
1005
1002
|
getHalfCheckedNodes: D,
|
|
1006
|
-
getHalfCheckedKeys:
|
|
1007
|
-
setCurrentNode:
|
|
1003
|
+
getHalfCheckedKeys: G,
|
|
1004
|
+
setCurrentNode: z,
|
|
1008
1005
|
setCurrentKey: p,
|
|
1009
1006
|
t: o,
|
|
1010
1007
|
getNode: b,
|
|
1011
|
-
remove:
|
|
1008
|
+
remove: K,
|
|
1012
1009
|
append: ae,
|
|
1013
1010
|
insertBefore: Be,
|
|
1014
1011
|
insertAfter: $e,
|
|
1015
|
-
handleNodeExpand:
|
|
1016
|
-
updateKeyChildren:
|
|
1012
|
+
handleNodeExpand: ze,
|
|
1013
|
+
updateKeyChildren: qe
|
|
1017
1014
|
};
|
|
1018
1015
|
}
|
|
1019
1016
|
});
|
|
@@ -1030,7 +1027,7 @@ function Nt(e, t, o, d, n, r) {
|
|
|
1030
1027
|
]),
|
|
1031
1028
|
role: "tree"
|
|
1032
1029
|
}, [
|
|
1033
|
-
(A(!0), j(
|
|
1030
|
+
(A(!0), j(Se, null, Ae(e.root.childNodes, (c) => (A(), P(l, {
|
|
1034
1031
|
key: e.getNodeKey(c),
|
|
1035
1032
|
node: c,
|
|
1036
1033
|
props: e.props,
|
|
@@ -1044,7 +1041,7 @@ function Nt(e, t, o, d, n, r) {
|
|
|
1044
1041
|
key: 0,
|
|
1045
1042
|
class: T(e.ns.e("empty-block"))
|
|
1046
1043
|
}, [
|
|
1047
|
-
|
|
1044
|
+
xe(e.$slots, "empty", {}, () => {
|
|
1048
1045
|
var c;
|
|
1049
1046
|
return [
|
|
1050
1047
|
ue("span", {
|
|
@@ -1052,7 +1049,7 @@ function Nt(e, t, o, d, n, r) {
|
|
|
1052
1049
|
}, Ve((c = e.emptyText) != null ? c : e.t("el.tree.emptyText")), 3)
|
|
1053
1050
|
];
|
|
1054
1051
|
})
|
|
1055
|
-
], 2)) :
|
|
1052
|
+
], 2)) : J("v-if", !0),
|
|
1056
1053
|
he(ue("div", {
|
|
1057
1054
|
ref: "dropIndicator$",
|
|
1058
1055
|
class: T(e.ns.e("drop-indicator"))
|
|
@@ -1071,13 +1068,13 @@ const Ce = ne, Ct = (e, { attrs: t, emit: o }, {
|
|
|
1071
1068
|
key: r
|
|
1072
1069
|
}) => {
|
|
1073
1070
|
const l = U("tree-select");
|
|
1074
|
-
return
|
|
1071
|
+
return x(() => e.data, () => {
|
|
1075
1072
|
e.filterable && R(() => {
|
|
1076
1073
|
var i, g;
|
|
1077
1074
|
(g = n.value) == null || g.filter((i = d.value) == null ? void 0 : i.states.inputValue);
|
|
1078
1075
|
});
|
|
1079
1076
|
}, { flush: "post" }), {
|
|
1080
|
-
...re(Te(e), Object.keys(
|
|
1077
|
+
...re(Te(e), Object.keys(pe.props)),
|
|
1081
1078
|
...t,
|
|
1082
1079
|
"onUpdate:modelValue": (i) => o(ee, i),
|
|
1083
1080
|
valueKey: r,
|
|
@@ -1109,7 +1106,7 @@ const Ce = ne, Ct = (e, { attrs: t, emit: o }, {
|
|
|
1109
1106
|
function ke(e) {
|
|
1110
1107
|
return e || e === 0;
|
|
1111
1108
|
}
|
|
1112
|
-
function
|
|
1109
|
+
function Ke(e) {
|
|
1113
1110
|
return Array.isArray(e) && e.length;
|
|
1114
1111
|
}
|
|
1115
1112
|
function Y(e) {
|
|
@@ -1122,7 +1119,7 @@ function oe(e, t, o, d, n) {
|
|
|
1122
1119
|
return d ? d(l, r, e, n) : l;
|
|
1123
1120
|
{
|
|
1124
1121
|
const c = o(l);
|
|
1125
|
-
if (
|
|
1122
|
+
if (Ke(c)) {
|
|
1126
1123
|
const i = oe(c, t, o, d, l);
|
|
1127
1124
|
if (i)
|
|
1128
1125
|
return i;
|
|
@@ -1135,7 +1132,7 @@ function ve(e, t, o, d) {
|
|
|
1135
1132
|
const r = e[n];
|
|
1136
1133
|
t(r, n, e, d);
|
|
1137
1134
|
const l = o(r);
|
|
1138
|
-
|
|
1135
|
+
Ke(l) && ve(l, t, o, r);
|
|
1139
1136
|
}
|
|
1140
1137
|
}
|
|
1141
1138
|
const vt = (e, { attrs: t, slots: o, emit: d }, {
|
|
@@ -1143,10 +1140,10 @@ const vt = (e, { attrs: t, slots: o, emit: d }, {
|
|
|
1143
1140
|
tree: r,
|
|
1144
1141
|
key: l
|
|
1145
1142
|
}) => {
|
|
1146
|
-
|
|
1143
|
+
x(() => e.modelValue, () => {
|
|
1147
1144
|
e.showCheckbox && R(() => {
|
|
1148
1145
|
const a = r.value;
|
|
1149
|
-
a && !
|
|
1146
|
+
a && !tt(a.getCheckedKeys(), Y(e.modelValue)) && a.setCheckedKeys(Y(e.modelValue));
|
|
1150
1147
|
});
|
|
1151
1148
|
}, {
|
|
1152
1149
|
immediate: !0,
|
|
@@ -1187,14 +1184,14 @@ const vt = (e, { attrs: t, slots: o, emit: d }, {
|
|
|
1187
1184
|
label: i("label", f),
|
|
1188
1185
|
disabled: i("disabled", f)
|
|
1189
1186
|
}, e.renderContent ? () => e.renderContent(a, { node: s, data: f, store: y }) : o.default ? () => o.default({ node: s, data: f, store: y }) : void 0),
|
|
1190
|
-
filterNodeMethod: (a, s, f) => e.filterNodeMethod ? e.filterNodeMethod(a, s, f) : a ? new RegExp(
|
|
1187
|
+
filterNodeMethod: (a, s, f) => e.filterNodeMethod ? e.filterNodeMethod(a, s, f) : a ? new RegExp(nt(a), "i").test(i("label", s) || "") : !0,
|
|
1191
1188
|
onNodeClick: (a, s, f) => {
|
|
1192
1189
|
var y, C, k, m;
|
|
1193
1190
|
if ((y = t.onNodeClick) == null || y.call(t, a, s, f), !(e.showCheckbox && e.checkOnClickNode)) {
|
|
1194
1191
|
if (!e.showCheckbox && (e.checkStrictly || s.isLeaf)) {
|
|
1195
1192
|
if (!i("disabled", a)) {
|
|
1196
|
-
const
|
|
1197
|
-
(k = n.value) == null || k.handleOptionSelect(
|
|
1193
|
+
const S = (C = n.value) == null ? void 0 : C.states.options.get(i("value", a));
|
|
1194
|
+
(k = n.value) == null || k.handleOptionSelect(S);
|
|
1198
1195
|
}
|
|
1199
1196
|
} else
|
|
1200
1197
|
e.expandOnClickNode && f.proxy.handleExpandIconClick();
|
|
@@ -1207,14 +1204,14 @@ const vt = (e, { attrs: t, slots: o, emit: d }, {
|
|
|
1207
1204
|
return;
|
|
1208
1205
|
const y = i("value", a), C = {};
|
|
1209
1206
|
ve([r.value.store.root], (v) => C[v.key] = v, (v) => v.childNodes);
|
|
1210
|
-
const k = s.checkedKeys, m = e.multiple ? Y(e.modelValue).filter((v) => !(v in C) && !k.includes(v)) : [],
|
|
1207
|
+
const k = s.checkedKeys, m = e.multiple ? Y(e.modelValue).filter((v) => !(v in C) && !k.includes(v)) : [], S = m.concat(k);
|
|
1211
1208
|
if (e.checkStrictly)
|
|
1212
|
-
d(ee, e.multiple ?
|
|
1209
|
+
d(ee, e.multiple ? S : S.includes(y) ? y : void 0);
|
|
1213
1210
|
else if (e.multiple)
|
|
1214
1211
|
d(ee, m.concat(r.value.getCheckedKeys(!0)));
|
|
1215
1212
|
else {
|
|
1216
|
-
const v = oe([a], (D) => !
|
|
1217
|
-
d(ee, O === e.modelValue ||
|
|
1213
|
+
const v = oe([a], (D) => !Ke(i("children", D)) && !i("disabled", D), (D) => i("children", D)), O = v ? i("value", v) : void 0, E = ke(e.modelValue) && !!oe([a], (D) => i("value", D) === e.modelValue, (D) => i("children", D));
|
|
1214
|
+
d(ee, O === e.modelValue || E ? void 0 : O);
|
|
1218
1215
|
}
|
|
1219
1216
|
R(() => {
|
|
1220
1217
|
var v;
|
|
@@ -1238,8 +1235,8 @@ var mt = H({
|
|
|
1238
1235
|
}
|
|
1239
1236
|
},
|
|
1240
1237
|
setup(e) {
|
|
1241
|
-
const t = V(
|
|
1242
|
-
return
|
|
1238
|
+
const t = V(ot);
|
|
1239
|
+
return x(() => e.data, () => {
|
|
1243
1240
|
var o;
|
|
1244
1241
|
e.data.forEach((n) => {
|
|
1245
1242
|
t.states.cachedOptions.has(n.value) || t.states.cachedOptions.set(n.value, n);
|
|
@@ -1254,7 +1251,7 @@ const bt = H({
|
|
|
1254
1251
|
name: "ElTreeSelect",
|
|
1255
1252
|
inheritAttrs: !1,
|
|
1256
1253
|
props: {
|
|
1257
|
-
...
|
|
1254
|
+
...pe.props,
|
|
1258
1255
|
...Ce.props,
|
|
1259
1256
|
cacheData: {
|
|
1260
1257
|
type: Array,
|
|
@@ -1291,14 +1288,14 @@ const bt = H({
|
|
|
1291
1288
|
]),
|
|
1292
1289
|
...re(n.value, ["focus", "blur"])
|
|
1293
1290
|
});
|
|
1294
|
-
}), () =>
|
|
1291
|
+
}), () => X(pe, _({
|
|
1295
1292
|
...c,
|
|
1296
1293
|
ref: (a) => n.value = a
|
|
1297
1294
|
}), {
|
|
1298
1295
|
...o,
|
|
1299
1296
|
default: () => [
|
|
1300
|
-
|
|
1301
|
-
|
|
1297
|
+
X(mt, { data: i.value }),
|
|
1298
|
+
X(Ce, _({
|
|
1302
1299
|
...g,
|
|
1303
1300
|
ref: (a) => r.value = a
|
|
1304
1301
|
}))
|
|
@@ -1310,7 +1307,7 @@ var de = /* @__PURE__ */ se(bt, [["__file", "tree-select.vue"]]);
|
|
|
1310
1307
|
de.install = (e) => {
|
|
1311
1308
|
e.component(de.name, de);
|
|
1312
1309
|
};
|
|
1313
|
-
const
|
|
1310
|
+
const Kt = de, xt = Kt;
|
|
1314
1311
|
export {
|
|
1315
|
-
|
|
1312
|
+
xt as E
|
|
1316
1313
|
};
|