@das-fed/ui 7.0.4-test.3 → 7.0.5-test.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.
Files changed (41) hide show
  1. package/package.json +5 -6
  2. package/packages/business-components/currency-page/index.d.ts +1 -3
  3. package/packages/business-components/currency-page/index.js +35 -40
  4. package/packages/business-components/currency-page/index.js.gz +0 -0
  5. package/packages/business-components/currency-page/src/index.vue.d.ts +1 -3
  6. package/packages/business-components/currency-page/src/type.d.ts +0 -6
  7. package/packages/business-components/currency-page/style.css +1 -1
  8. package/packages/components/edit-table/index.d.ts +15 -15
  9. package/packages/components/edit-table/src/index.vue.d.ts +4 -4
  10. package/packages/components/image-upload/index.d.ts +0 -1
  11. package/packages/components/image-upload/index.js +114 -767
  12. package/packages/components/image-upload/index.js.gz +0 -0
  13. package/packages/components/image-upload/src/Index.vue.d.ts +0 -1
  14. package/packages/components/image-upload/src/type.d.ts +0 -3
  15. package/packages/components/image-upload/style.css +1 -1
  16. package/packages/components/image-upload/style.css.gz +0 -0
  17. package/packages/components/image-viewer/index.d.ts +0 -1
  18. package/packages/components/image-viewer/index.js +434 -1086
  19. package/packages/components/image-viewer/index.js.gz +0 -0
  20. package/packages/components/image-viewer/src/Index.vue.d.ts +0 -1
  21. package/packages/components/image-viewer/src/type.d.ts +0 -3
  22. package/packages/components/image-viewer/style.css +1 -1
  23. package/packages/components/image-viewer/style.css.gz +0 -0
  24. package/packages/components/menu-header/index.d.ts +0 -6
  25. package/packages/components/menu-header/index.js +31 -26
  26. package/packages/components/menu-header/index.js.gz +0 -0
  27. package/packages/components/menu-header/src/Index.vue.d.ts +0 -2
  28. package/packages/components/menu-header/src/type.d.ts +1 -6
  29. package/packages/components/menu-header/style.css +1 -1
  30. package/packages/components/menu-header/style.css.gz +0 -0
  31. package/packages/components/select-list/index.d.ts +10 -10
  32. package/packages/components/select-list/src/Index.vue.d.ts +8 -8
  33. package/packages/components/tree-table/index.js +263 -291
  34. package/packages/components/tree-table/index.js.gz +0 -0
  35. package/packages/components/tree-table/src/type.d.ts +1 -1
  36. package/packages/components/tree-table/style.css +1 -1
  37. package/packages/components/tree-table/style.css.gz +0 -0
  38. package/packages/components/image-upload/src/hooks/use-compress-image.d.ts +0 -1
  39. package/packages/components/image-viewer/src/hooks/use-compress-image.d.ts +0 -1
  40. package/packages/components/tree-table/src/hooks/use-five.d.ts +0 -4
  41. package/packages/components/tree-table/src/hooks/use-four.d.ts +0 -4
@@ -1,97 +1,71 @@
1
1
  import '@das-fed/ui/packages/components/tree-table/style.css';
2
- import { defineComponent as ke, mergeModels as le, ref as U, useModel as ye, computed as V, watch as ae, createElementBlock as $, openBlock as L, normalizeStyle as j, normalizeClass as ne, createElementVNode as E, renderSlot as I, createCommentVNode as T, toDisplayString as R, Fragment as G, renderList as J, createBlock as Q, unref as A, withCtx as p, createTextVNode as S, withDirectives as M, createVNode as W, vShow as H } from "vue";
3
- import { withInstall as be } from "@das-fed/utils/with-install/index";
4
- import { setThemeRule as ge } from "@das-fed/web/packages/theme/index";
5
- import { DasTree as me } from "@das-fed/ui/packages/components/tree/index";
6
- import { DasVirtualTree as Ke } from "@das-fed/ui/packages/components/virtual-tree/index";
2
+ import { defineComponent as he, mergeModels as ee, ref as U, useModel as ce, computed as I, watch as le, createElementBlock as V, openBlock as K, normalizeStyle as j, normalizeClass as ie, createElementVNode as $, renderSlot as L, createCommentVNode as w, toDisplayString as A, Fragment as G, renderList as J, createBlock as Q, unref as N, withCtx as F, createTextVNode as S, withDirectives as M, createVNode as W, vShow as H } from "vue";
3
+ import { withInstall as ve } from "@das-fed/utils/with-install/index";
4
+ import { setThemeRule as ke } from "@das-fed/web/packages/theme/index";
5
+ import { DasTree as be } from "@das-fed/ui/packages/components/tree/index";
6
+ import { DasVirtualTree as ye } from "@das-fed/ui/packages/components/virtual-tree/index";
7
7
  import { DasCheckbox as X } from "@das-fed/ui/packages/components/checkbox/index";
8
- import { vOverlay as te } from "@das-fed/ui/packages/components/overlay/index";
9
- import { DasEmpty as Ce } from "@das-fed/ui/packages/components/empty/index";
10
- import { DasSpin as we } from "@das-fed/ui/packages/components/spin/index";
11
- import { treeFind as Y, flatTree as ie } from "@das-fed/utils/common-tools";
12
- const Te = (o, B, c, i, g, N, k) => ({ linkCheck: (K, r, b, f, C) => {
8
+ import { vOverlay as ae } from "@das-fed/ui/packages/components/overlay/index";
9
+ import { DasEmpty as ge } from "@das-fed/ui/packages/components/empty/index";
10
+ import { DasSpin as me } from "@das-fed/ui/packages/components/spin/index";
11
+ import { treeFind as Ce, flatTree as te } from "@das-fed/utils/common-tools";
12
+ const we = (d, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, p) => {
13
13
  let n = null;
14
- if (b ? n = (l) => {
15
- var s, v, h;
16
- l[(s = c.value) == null ? void 0 : s.children] && l[(v = c.value) == null ? void 0 : v.children].length && l[(h = c.value) == null ? void 0 : h.children].forEach((d) => {
17
- n && n(d), d[r + "-targetId"] == K && o.nodeKey && !i(l, C) && !g(l) && (f[l[o.nodeKey]].data[r] = !0, f[l[o.nodeKey]].data[r + "-targetId"] = K);
14
+ if (g ? n = (i) => {
15
+ var u, c, h;
16
+ i[(u = r.value) == null ? void 0 : u.children] && i[(c = r.value) == null ? void 0 : c.children].length && i[(h = r.value) == null ? void 0 : h.children].forEach((o) => {
17
+ n && n(o), o[v + "-targetId"] == T && d.nodeKey && !t(i, p) && !y(i) && (b[i[d.nodeKey]].data[v] = !0, b[i[d.nodeKey]].data[v + "-targetId"] = T);
18
18
  });
19
- } : n = (l) => {
20
- var s, v, h;
21
- l[(s = c.value) == null ? void 0 : s.children] && l[(v = c.value) == null ? void 0 : v.children].length && l[(h = c.value) == null ? void 0 : h.children].forEach((d) => {
22
- l[r + "-targetId"] == d[N.value] && o.nodeKey && !i(d, C) && !g(d) && (f[d[o.nodeKey]].data[r] = !1, f[d[o.nodeKey]].data[r + "-targetId"] = d[o.nodeKey]), n && n(d);
19
+ } : n = (i) => {
20
+ var u, c, h;
21
+ i[(u = r.value) == null ? void 0 : u.children] && i[(c = r.value) == null ? void 0 : c.children].length && i[(h = r.value) == null ? void 0 : h.children].forEach((o) => {
22
+ i[v + "-targetId"] == o[E.value] && d.nodeKey && !t(o, p) && !y(o) && (b[o[d.nodeKey]].data[v] = !1, b[o[d.nodeKey]].data[v + "-targetId"] = o[d.nodeKey]), n && n(o);
23
23
  });
24
24
  }, k.value && k.value.length)
25
- for (let l = 0; l < k.value.length; l++)
26
- n && n(k.value[l]);
27
- } }), Le = (o, B, c, i, g, N, k) => ({ linkCheck: (K, r, b, f, C) => {
25
+ for (let i = 0; i < k.value.length; i++)
26
+ n && n(k.value[i]);
27
+ } }), Ke = (d, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, p) => {
28
28
  let n = null;
29
- if (b ? n = (l) => {
30
- var s, v, h;
31
- l[(s = c.value) == null ? void 0 : s.children] && l[(v = c.value) == null ? void 0 : v.children].length && l[(h = c.value) == null ? void 0 : h.children].forEach((d) => {
32
- l[r + "-targetId"] == d[N.value] && o.nodeKey && (!i(d, C) && !g(d) && (f[d[o.nodeKey]].data[r] = !0), f[d[o.nodeKey]].data[r + "-targetId"] = d[o.nodeKey]), n && n(d);
29
+ if (g ? n = (i) => {
30
+ var u, c, h;
31
+ i[(u = r.value) == null ? void 0 : u.children] && i[(c = r.value) == null ? void 0 : c.children].length && i[(h = r.value) == null ? void 0 : h.children].forEach((o) => {
32
+ i[v + "-targetId"] == o[E.value] && d.nodeKey && (!t(o, p) && !y(o) && (b[o[d.nodeKey]].data[v] = !0), b[o[d.nodeKey]].data[v + "-targetId"] = o[d.nodeKey]), n && n(o);
33
33
  });
34
- } : n = (l) => {
35
- var s, v, h;
36
- l[(s = c.value) == null ? void 0 : s.children] && l[(v = c.value) == null ? void 0 : v.children].length && l[(h = c.value) == null ? void 0 : h.children].forEach((d) => {
37
- n && n(d), d[r + "-targetId"] == K && o.nodeKey && (!i(l, C) && !g(l) && (f[l[o.nodeKey]].data[r] = !1), f[l[o.nodeKey]].data[r + "-targetId"] = K);
34
+ } : n = (i) => {
35
+ var u, c, h;
36
+ i[(u = r.value) == null ? void 0 : u.children] && i[(c = r.value) == null ? void 0 : c.children].length && i[(h = r.value) == null ? void 0 : h.children].forEach((o) => {
37
+ n && n(o), o[v + "-targetId"] == T && d.nodeKey && (!t(i, p) && !y(i) && (b[i[d.nodeKey]].data[v] = !1), b[i[d.nodeKey]].data[v + "-targetId"] = T);
38
38
  });
39
39
  }, k.value && k.value.length)
40
- for (let l = 0; l < k.value.length; l++)
41
- n && n(k.value[l]);
42
- } }), Ie = (o, B, c, i, g, N, k) => ({ linkCheck: (K, r, b, f, C) => {
40
+ for (let i = 0; i < k.value.length; i++)
41
+ n && n(k.value[i]);
42
+ } }), Te = (d, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, p) => {
43
43
  let n = null;
44
- if (b ? n = (l) => {
45
- var s, v, h;
46
- l[(s = c.value) == null ? void 0 : s.children] && l[(v = c.value) == null ? void 0 : v.children].length && l[(h = c.value) == null ? void 0 : h.children].forEach((d) => {
47
- l[r + "-targetId"] == d[N.value] && o.nodeKey && (!i(d, C) && !g(d) && (f[d[o.nodeKey]].data[r] = !0), f[d[o.nodeKey]].data[r + "-targetId"] = d[o.nodeKey]), n && n(d);
44
+ if (g ? n = (i) => {
45
+ var u, c, h;
46
+ i[(u = r.value) == null ? void 0 : u.children] && i[(c = r.value) == null ? void 0 : c.children].length && i[(h = r.value) == null ? void 0 : h.children].forEach((o) => {
47
+ i[v + "-targetId"] == o[E.value] && d.nodeKey && (!t(o, p) && !y(o) && (b[o[d.nodeKey]].data[v] = !0), b[o[d.nodeKey]].data[v + "-targetId"] = o[d.nodeKey]), n && n(o);
48
48
  });
49
- } : n = (l) => {
50
- var s, v, h;
51
- l[o.nodeKey] === K ? delete f[l[o.nodeKey]].data[r + "-targetId"] : l[(s = c.value) == null ? void 0 : s.children] && l[(v = c.value) == null ? void 0 : v.children].length && l[(h = c.value) == null ? void 0 : h.children].forEach((d) => {
52
- d[o.nodeKey] == K ? o.nodeKey && delete f[d[o.nodeKey]].data[r + "-targetId"] : n && n(d);
49
+ } : n = (i) => {
50
+ var u, c, h;
51
+ i[d.nodeKey] === T ? delete b[i[d.nodeKey]].data[v + "-targetId"] : i[(u = r.value) == null ? void 0 : u.children] && i[(c = r.value) == null ? void 0 : c.children].length && i[(h = r.value) == null ? void 0 : h.children].forEach((o) => {
52
+ o[d.nodeKey] == T ? d.nodeKey && delete b[o[d.nodeKey]].data[v + "-targetId"] : n && n(o);
53
53
  });
54
54
  }, k.value && k.value.length) {
55
- const l = Y(k.value, (s) => s[o.nodeKey] === K);
56
- n && n(l);
55
+ const i = Ce(k.value, (u) => u[d.nodeKey] === T);
56
+ n && n(i);
57
57
  }
58
- } }), Ve = (o, B, c, i, g, N, k) => ({ linkCheck: (K, r, b, f, C) => {
59
- let n = null;
60
- if (b ? n = (l) => {
61
- var s, v, h;
62
- l[(s = c.value) == null ? void 0 : s.children] && l[(v = c.value) == null ? void 0 : v.children].length && l[(h = c.value) == null ? void 0 : h.children].forEach((d) => {
63
- o.nodeKey && (f[d[o.nodeKey]].data[r] = !0, f[d[o.nodeKey]].data[r + "-targetId"] = d[o.nodeKey]), n == null || n(d);
64
- });
65
- } : n = (l) => {
66
- var s, v, h;
67
- l[(s = c.value) == null ? void 0 : s.children] && l[(v = c.value) == null ? void 0 : v.children].length && l[(h = c.value) == null ? void 0 : h.children].forEach((d) => {
68
- o.nodeKey && (f[d[o.nodeKey]].data[r] = !1, delete f[d[o.nodeKey]].data[r + "-targetId"]), n == null || n(d);
69
- });
70
- }, k.value && k.value.length) {
71
- const l = Y(k.value, (s) => s[o.nodeKey] === K);
72
- n && n(l);
73
- }
74
- } }), $e = (o, B, c, i, g, N, k) => ({ linkCheck: (K, r, b, f, C) => {
75
- let n = null;
76
- if (b ? n = (l) => {
77
- o.nodeKey && (!i(l, C) && !g(l) && (f[l[o.nodeKey]].data[r] = !0), f[l[o.nodeKey]].data[r + "-targetId"] = l[o.nodeKey]);
78
- } : n = (l) => {
79
- o.nodeKey && (delete f[l[o.nodeKey]].data[r + "-targetId"], f[l[o.nodeKey]].data[r] = !1);
80
- }, k.value && k.value.length) {
81
- const l = Y(k.value, (s) => s[o.nodeKey] === K);
82
- n && l && n(l);
83
- }
84
- } }), Ee = { class: "table-header" }, Ne = { class: "title table-label" }, Fe = {
58
+ } }), pe = { class: "table-header" }, Le = { class: "title table-label" }, Ie = {
85
59
  key: 0,
86
60
  class: "table-label"
87
- }, Ae = {
88
- class: /* @__PURE__ */ ne(["table-body", "das-tree-box"])
89
- }, Be = { class: "tree-node" }, Re = { class: "tree-node" }, De = { class: "first-column" }, pe = { class: "title" }, Me = { class: "tree-node" }, Oe = { class: "tree-node" }, Se = { class: "first-column" }, Ue = { class: "title" }, ze = {
61
+ }, Ve = {
62
+ class: /* @__PURE__ */ ie(["table-body", "das-tree-box"])
63
+ }, $e = { class: "tree-node" }, Ne = { class: "tree-node" }, Ee = { class: "first-column" }, De = { class: "title" }, Ae = { class: "tree-node" }, Be = { class: "tree-node" }, Re = { class: "first-column" }, Fe = { class: "title" }, Me = {
90
64
  name: "DasTreeTable",
91
65
  inheritAttrs: !1
92
- }, je = /* @__PURE__ */ ke({
93
- ...ze,
94
- props: /* @__PURE__ */ le({
66
+ }, Oe = /* @__PURE__ */ he({
67
+ ...Me,
68
+ props: /* @__PURE__ */ ee({
95
69
  virtual: { type: Boolean, default: !0 },
96
70
  linkageType: { default: "first" },
97
71
  keyword: {},
@@ -117,130 +91,128 @@ const Te = (o, B, c, i, g, N, k) => ({ linkCheck: (K, r, b, f, C) => {
117
91
  keyword: { type: String, default: "" },
118
92
  keywordModifiers: {}
119
93
  }),
120
- emits: /* @__PURE__ */ le(["update:data", "update:keyword", "all-check", "item-check"], ["update:keyword"]),
121
- setup(o, { expose: B, emit: c }) {
122
- const i = o, g = c, N = U(), k = ye(o, "keyword"), F = V(() => {
94
+ emits: /* @__PURE__ */ ee(["update:data", "update:keyword", "all-check", "item-check"], ["update:keyword"]),
95
+ setup(d, { expose: B, emit: r }) {
96
+ const t = d, y = r, E = U(), k = ce(d, "keyword"), D = I(() => {
123
97
  var e;
124
- return i.checkNum ?? ((e = i.checkboxLabels) == null ? void 0 : e.length) ?? 0;
125
- }), K = V(() => i != null && i.height ? i.height + "px" : "100%"), r = V(() => {
126
- if (i != null && i.height) {
127
- if (typeof i.height == "string") {
128
- if (i.height.includes("%")) return;
129
- if (i.height.includes("px")) return Number(i.height.replace("px", ""));
98
+ return t.checkNum ?? ((e = t.checkboxLabels) == null ? void 0 : e.length) ?? 0;
99
+ }), T = I(() => t != null && t.height ? t.height + "px" : "100%"), v = I(() => {
100
+ if (t != null && t.height) {
101
+ if (typeof t.height == "string") {
102
+ if (t.height.includes("%")) return;
103
+ if (t.height.includes("px")) return Number(t.height.replace("px", ""));
130
104
  }
131
- return i.height;
105
+ return t.height;
132
106
  }
133
- }), b = V(() => {
134
- const e = { ...i.props };
135
- return e != null && e.disabled && delete e.disabled, e != null && e.hidden && delete e.hidden, e != null && e.parentId && delete e.parentId, { children: "children", disabled: "disabled", isLeaf: "leaf", ...e, label: i.fistLabel };
136
- }), f = V(() => {
107
+ }), g = I(() => {
108
+ const e = { ...t.props };
109
+ return e != null && e.disabled && delete e.disabled, e != null && e.hidden && delete e.hidden, e != null && e.parentId && delete e.parentId, { children: "children", disabled: "disabled", isLeaf: "leaf", ...e, label: t.fistLabel };
110
+ }), b = I(() => {
137
111
  var e;
138
- return ((e = i.props) == null ? void 0 : e.parentId) ?? "parentId";
139
- }), C = V(() => {
140
- var t, a, u, y, w, D;
112
+ return ((e = t.props) == null ? void 0 : e.parentId) ?? "parentId";
113
+ }), p = I(() => {
114
+ var a, l, s, f, C, R;
141
115
  let e = [];
142
- return (t = i.props) != null && t.disabled && ((a = i.props) != null && a.disabled.length) ? ((u = i.props) != null && u.disabled[0] ? e[0] = (y = i.props) == null ? void 0 : y.disabled[0] : e[0] = "disabled1", (w = i.props) != null && w.disabled[1] ? e[1] = (D = i.props) == null ? void 0 : D.disabled[1] : e[1] = "disabled2") : e = ["disabled1", "disabled2"], e;
143
- }), n = (e, t) => typeof C.value[t] == "function" ? C.value[t](e, t) : e[C.value[t]], l = V(() => {
116
+ return (a = t.props) != null && a.disabled && ((l = t.props) != null && l.disabled.length) ? ((s = t.props) != null && s.disabled[0] ? e[0] = (f = t.props) == null ? void 0 : f.disabled[0] : e[0] = "disabled1", (C = t.props) != null && C.disabled[1] ? e[1] = (R = t.props) == null ? void 0 : R.disabled[1] : e[1] = "disabled2") : e = ["disabled1", "disabled2"], e;
117
+ }), n = (e, a) => typeof p.value[a] == "function" ? p.value[a](e, a) : e[p.value[a]], i = I(() => {
144
118
  var e;
145
- return ((e = i.props) == null ? void 0 : e.hidden) ?? "hidden";
146
- }), s = (e) => typeof l.value == "function" ? l.value(e) : e[l.value], v = U(), h = U([!1, !1]), d = U([!1, !1]), m = V({
147
- get: () => i.data,
148
- set: (e) => g("update:data", e)
149
- }), _ = (e) => {
150
- const t = {};
151
- return Array.isArray(e) && e.forEach((a) => {
152
- const u = { data: a };
153
- t[a[i.nodeKey]] = u, Array.isArray(a[b.value.children]) && Object.assign(t, _(a[b.value.children]));
154
- }), t;
155
- }, Z = () => _(m.value), P = (e, t, a) => {
156
- i.allCheckboxDisabled[a] || (e > 0 && t > 0 ? (h.value[a] = !1, d.value[a] = !0) : e == 0 && t >= 0 ? (h.value[a] = !1, d.value[a] = !1) : (h.value[a] = !0, d.value[a] = !1));
119
+ return ((e = t.props) == null ? void 0 : e.hidden) ?? "hidden";
120
+ }), u = (e) => typeof i.value == "function" ? i.value(e) : e[i.value], c = U(), h = U([!1, !1]), o = U([!1, !1]), m = I({
121
+ get: () => t.data,
122
+ set: (e) => y("update:data", e)
123
+ }), Y = (e) => {
124
+ const a = {};
125
+ return Array.isArray(e) && e.forEach((l) => {
126
+ const s = { data: l };
127
+ a[l[t.nodeKey]] = s, Array.isArray(l[g.value.children]) && Object.assign(a, Y(l[g.value.children]));
128
+ }), a;
129
+ }, Z = () => Y(m.value), _ = (e, a, l) => {
130
+ t.allCheckboxDisabled[l] || (e > 0 && a > 0 ? (h.value[l] = !1, o.value[l] = !0) : e == 0 && a >= 0 ? (h.value[l] = !1, o.value[l] = !1) : (h.value[l] = !0, o.value[l] = !1));
157
131
  }, oe = (e) => {
158
- const t = b.value.children;
159
- let a = [];
160
- a = ie(m.value, t);
161
- for (let u = 0; u < F.value; u++) {
162
- let y = 0, w = 0;
163
- a.forEach((D) => {
164
- n(D, u) || s(D) || (D[i.checkboxLabels[u]] ? y++ : w++);
165
- }), P(y, w, u);
132
+ const a = g.value.children;
133
+ let l = [];
134
+ l = te(m.value, a);
135
+ for (let s = 0; s < D.value; s++) {
136
+ let f = 0, C = 0;
137
+ l.forEach((R) => {
138
+ n(R, s) || u(R) || (R[t.checkboxLabels[s]] ? f++ : C++);
139
+ }), _(f, C, s);
166
140
  }
167
- }, { linkCheck: de } = Te(
168
- i,
141
+ }, { linkCheck: se } = we(
142
+ t,
143
+ y,
169
144
  g,
170
- b,
171
145
  n,
172
- s,
173
- f,
146
+ u,
147
+ b,
174
148
  m
175
- ), { linkCheck: se } = Le(i, g, b, n, s, f, m), { linkCheck: ue } = Ie(
176
- i,
149
+ ), { linkCheck: ne } = Ke(t, y, g, n, u, b, m), { linkCheck: de } = Te(
150
+ t,
151
+ y,
177
152
  g,
178
- b,
179
153
  n,
180
- s,
181
- f,
154
+ u,
155
+ b,
182
156
  m
183
- ), { linkCheck: ce } = Ve(i, g, b, n, s, f, m), { linkCheck: re } = $e(i, g, b, n, s, f, m), fe = (e, t, a, u, y) => i.linkageType === "custom" ? void 0 : {
184
- first: de,
185
- two: se,
186
- three: ue,
187
- four: ce,
188
- five: re
189
- }[i.linkageType](e, t, a, u, y), z = (e, t) => {
190
- g("all-check", e, t), h.value[t] = e, d.value[t] = !1;
191
- const a = Z();
192
- if (a)
193
- for (let u in a)
194
- !n(a[u].data, t) && !s(a[u].data) && (a[u].data[i.checkboxLabels[t]] = e, delete a[u].data[i.checkboxLabels[t] + "-targetId"]);
195
- if (i.twoLinkFirstCheck) {
157
+ ), ue = (e, a, l, s, f) => t.linkageType === "custom" ? void 0 : {
158
+ first: se,
159
+ two: ne,
160
+ three: de
161
+ }[t.linkageType](e, a, l, s, f), z = (e, a) => {
162
+ y("all-check", e, a), h.value[a] = e, o.value[a] = !1;
163
+ const l = Z();
164
+ if (l)
165
+ for (let s in l)
166
+ !n(l[s].data, a) && !u(l[s].data) && (l[s].data[t.checkboxLabels[a]] = e, delete l[s].data[t.checkboxLabels[a] + "-targetId"]);
167
+ if (t.twoLinkFirstCheck) {
196
168
  if (e) {
197
- if (t === 1) {
198
- if (i.allCheckboxDisabled[t - 1]) return;
199
- z(e, t - 1);
169
+ if (a === 1) {
170
+ if (t.allCheckboxDisabled[a - 1]) return;
171
+ z(e, a - 1);
200
172
  }
201
- } else if (t === 0) {
202
- if (i.allCheckboxDisabled[t + 1]) return;
203
- z(e, t + 1);
173
+ } else if (a === 0) {
174
+ if (t.allCheckboxDisabled[a + 1]) return;
175
+ z(e, a + 1);
204
176
  }
205
177
  }
206
- }, he = V(() => {
178
+ }, re = I(() => {
207
179
  let e = [];
208
180
  if (!m.value || !m.value.length) return e;
209
- const t = b.value.children;
210
- return e = ie(m.value, t).filter(
211
- (u) => u[b.value.label].toLowerCase().includes(k.value.toLowerCase())
181
+ const a = g.value.children;
182
+ return e = te(m.value, a).filter(
183
+ (s) => s[g.value.label].toLowerCase().includes(k.value.toLowerCase())
212
184
  ), e;
213
- }), q = V(() => {
214
- var t;
185
+ }), q = I(() => {
186
+ var a;
215
187
  let e = !1;
216
- return (!m.value || !m.value.length) && (e = !0), k.value && !((t = he.value) != null && t.length) && (e = !0), e;
217
- }), ve = () => new Promise((e) => {
218
- const t = () => {
219
- var a;
220
- if ((a = v.value) != null && a.treeRef) return e(!0);
221
- setTimeout(() => t(), 50);
188
+ return (!m.value || !m.value.length) && (e = !0), k.value && !((a = re.value) != null && a.length) && (e = !0), e;
189
+ }), fe = () => new Promise((e) => {
190
+ const a = () => {
191
+ var l;
192
+ if ((l = c.value) != null && l.treeRef) return e(!0);
193
+ setTimeout(() => a(), 50);
222
194
  };
223
- t();
195
+ a();
224
196
  });
225
- let x = "";
226
- const ee = async () => {
227
- var e, t;
228
- x != k.value && (await ve(), (t = (e = v.value) == null ? void 0 : e.treeRef) == null || t.filter(k.value), x = k.value);
197
+ let P = "";
198
+ const x = async () => {
199
+ var e, a;
200
+ P != k.value && (await fe(), (a = (e = c.value) == null ? void 0 : e.treeRef) == null || a.filter(k.value), P = k.value);
229
201
  };
230
- ae(
202
+ le(
231
203
  () => m.value,
232
204
  () => {
233
- oe(), ee();
205
+ oe(), x();
234
206
  },
235
207
  { immediate: !0, deep: !0 }
236
- ), ae(() => k.value, ee);
237
- const O = (e, t, a) => {
238
- g("item-check", e, t, a);
239
- const u = Z(), y = i.checkboxLabels[a];
240
- u && (u[t[i.nodeKey]].data[y + "-targetId"] = t[i.nodeKey], u[t[i.nodeKey]].data[y] = e), fe(t[i.nodeKey], y, e, u, a), i.twoLinkFirstCheck && (e ? a === 1 && !n(t, a - 1) && !s(t) && O(e, t, a - 1) : a === 0 && !n(t, a + 1) && !s(t) && O(e, t, a + 1));
208
+ ), le(() => k.value, x);
209
+ const O = (e, a, l) => {
210
+ y("item-check", e, a, l);
211
+ const s = Z(), f = t.checkboxLabels[l];
212
+ s && (s[a[t.nodeKey]].data[f + "-targetId"] = a[t.nodeKey], s[a[t.nodeKey]].data[f] = e), ue(a[t.nodeKey], f, e, s, l), t.twoLinkFirstCheck && (e ? l === 1 && !n(a, l - 1) && !u(a) && O(e, a, l - 1) : l === 0 && !n(a, l + 1) && !u(a) && O(e, a, l + 1));
241
213
  };
242
214
  return B({
243
- $treeTableBody: v,
215
+ $treeTableBody: c,
244
216
  /** 获取树的节点数据 */
245
217
  getTreeNodesMap: Z,
246
218
  /** 手动全选/取消全选;参数val,index */
@@ -248,57 +220,57 @@ const Te = (o, B, c, i, g, N, k) => ({ linkCheck: (K, r, b, f, C) => {
248
220
  /** 手动选中/取消选中;参数val,data,index */
249
221
  setCheck: O,
250
222
  /** 手动联动全选;参数trueNum,falseNum,index */
251
- linkAllCheck: P
252
- }), (e, t) => (L(), $(
223
+ linkAllCheck: _
224
+ }), (e, a) => (K(), V(
253
225
  "div",
254
226
  {
255
227
  ref_key: "dasTreeTableRef",
256
- ref: N,
257
- class: ne(["das-ui-tree-table", e.border ? "is-border" : ""]),
258
- style: j({ height: K.value })
228
+ ref: E,
229
+ class: ie(["das-ui-tree-table", e.border ? "is-border" : ""]),
230
+ style: j({ height: T.value })
259
231
  },
260
232
  [
261
- E("div", Ee, [
262
- E(
233
+ $("div", pe, [
234
+ $(
263
235
  "div",
264
- Ne,
265
- R(e.title),
236
+ Le,
237
+ A(e.title),
266
238
  1
267
239
  /* TEXT */
268
240
  ),
269
- e.$slots.headerLeft ? I(e.$slots, "headerLeft", { key: 0 }, void 0, !0) : T("v-if", !0),
270
- (L(!0), $(
241
+ e.$slots.headerLeft ? L(e.$slots, "headerLeft", { key: 0 }, void 0, !0) : w("v-if", !0),
242
+ (K(!0), V(
271
243
  G,
272
244
  null,
273
- J(F.value, (a) => (L(), $(
245
+ J(D.value, (l) => (K(), V(
274
246
  "div",
275
247
  {
276
248
  class: "check-item",
277
249
  style: j({ width: e.checkboxWidth[0] })
278
250
  },
279
251
  [
280
- I(e.$slots, e.checkboxLabels[a - 1] + "Header", {}, () => [
281
- e.isView ? (L(), $(
252
+ L(e.$slots, e.checkboxLabels[l - 1] + "Header", {}, () => [
253
+ e.isView ? (K(), V(
282
254
  "span",
283
- Fe,
284
- R(e.allCheckboxNames[a - 1] ?? ""),
255
+ Ie,
256
+ A(e.allCheckboxNames[l - 1] ?? ""),
285
257
  1
286
258
  /* TEXT */
287
- )) : (L(), Q(A(X), {
259
+ )) : (K(), Q(N(X), {
288
260
  key: 1,
289
- modelValue: h.value[a - 1],
290
- "onUpdate:modelValue": (u) => h.value[a - 1] = u,
261
+ modelValue: h.value[l - 1],
262
+ "onUpdate:modelValue": (s) => h.value[l - 1] = s,
291
263
  checkboxType: "default",
292
- indeterminate: d.value[a - 1],
293
- disabled: e.allCheckboxDisabled[a - 1] || !m.value || !m.value.length,
264
+ indeterminate: o.value[l - 1],
265
+ disabled: e.allCheckboxDisabled[l - 1] || !m.value || !m.value.length,
294
266
  isView: e.isView,
295
- onChange: (u) => {
296
- z(u, a - 1);
267
+ onChange: (s) => {
268
+ z(s, l - 1);
297
269
  }
298
270
  }, {
299
- default: p(() => [
271
+ default: F(() => [
300
272
  S(
301
- R(e.allCheckboxNames[a - 1] ?? ""),
273
+ A(e.allCheckboxNames[l - 1] ?? ""),
302
274
  1
303
275
  /* TEXT */
304
276
  )
@@ -314,74 +286,74 @@ const Te = (o, B, c, i, g, N, k) => ({ linkCheck: (K, r, b, f, C) => {
314
286
  256
315
287
  /* UNKEYED_FRAGMENT */
316
288
  )),
317
- e.$slots.headerRight ? I(e.$slots, "headerRight", { key: 1 }, void 0, !0) : T("v-if", !0)
289
+ e.$slots.headerRight ? L(e.$slots, "headerRight", { key: 1 }, void 0, !0) : w("v-if", !0)
318
290
  ]),
319
- E("div", Ae, [
320
- e.virtual ? M((L(), Q(A(Ke), {
291
+ $("div", Ve, [
292
+ e.virtual ? M((K(), Q(N(ye), {
321
293
  key: 0,
322
294
  ref_key: "$treeTableBody",
323
- ref: v,
295
+ ref: c,
324
296
  nodeKey: e.nodeKey,
325
297
  data: m.value,
326
- props: b.value,
298
+ props: g.value,
327
299
  "expand-on-click-node": !1,
328
300
  "default-expand-all": e.defaultExpandAll,
329
301
  overlayZIndex: "auto",
330
- height: r.value,
302
+ height: v.value,
331
303
  style: { width: "100%" }
332
304
  }, {
333
- default: p(({ data: a, node: u }) => [
334
- M((L(), $("div", Be, [
335
- E("div", Re, [
336
- E("div", De, [
337
- e.$slots.icon ? I(e.$slots, "icon", {
305
+ default: F(({ data: l, node: s }) => [
306
+ M((K(), V("div", $e, [
307
+ $("div", Ne, [
308
+ $("div", Ee, [
309
+ e.$slots.icon ? L(e.$slots, "icon", {
338
310
  key: 0,
339
- node: u,
340
- data: a
311
+ node: s,
312
+ data: l
341
313
  }, () => [
342
- t[0] || (t[0] = S("icon"))
343
- ], !0) : T("v-if", !0),
344
- I(e.$slots, "title", {
345
- node: u,
346
- data: a
314
+ a[0] || (a[0] = S("icon"))
315
+ ], !0) : w("v-if", !0),
316
+ L(e.$slots, "title", {
317
+ node: s,
318
+ data: l
347
319
  }, () => [
348
- E(
320
+ $(
349
321
  "span",
350
- pe,
351
- R(a[e.fistLabel]),
322
+ De,
323
+ A(l[e.fistLabel]),
352
324
  1
353
325
  /* TEXT */
354
326
  )
355
327
  ], !0)
356
328
  ]),
357
- e.$slots.bodyLeft ? I(e.$slots, "bodyLeft", {
329
+ e.$slots.bodyLeft ? L(e.$slots, "bodyLeft", {
358
330
  key: 0,
359
- node: u,
360
- data: a
361
- }, void 0, !0) : T("v-if", !0),
362
- s(a) ? T("v-if", !0) : (L(!0), $(
331
+ node: s,
332
+ data: l
333
+ }, void 0, !0) : w("v-if", !0),
334
+ u(l) ? w("v-if", !0) : (K(!0), V(
363
335
  G,
364
336
  { key: 1 },
365
- J(F.value, (y) => (L(), $(
337
+ J(D.value, (f) => (K(), V(
366
338
  "div",
367
339
  {
368
340
  class: "check-item",
369
- style: j({ width: e.checkboxWidth[y - 1] })
341
+ style: j({ width: e.checkboxWidth[f - 1] })
370
342
  },
371
343
  [
372
- W(A(X), {
373
- modelValue: a[e.checkboxLabels[y - 1]],
374
- "onUpdate:modelValue": (w) => a[e.checkboxLabels[y - 1]] = w,
344
+ W(N(X), {
345
+ modelValue: l[e.checkboxLabels[f - 1]],
346
+ "onUpdate:modelValue": (C) => l[e.checkboxLabels[f - 1]] = C,
375
347
  checkboxType: "default",
376
348
  isView: e.isView,
377
- disabled: n(a, y - 1),
378
- onChange: (w) => {
379
- O(w, a, y - 1);
349
+ disabled: n(l, f - 1),
350
+ onChange: (C) => {
351
+ O(C, l, f - 1);
380
352
  }
381
353
  }, {
382
- default: p(() => [
354
+ default: F(() => [
383
355
  S(
384
- R(e.checkboxNames[y - 1] ?? ""),
356
+ A(e.checkboxNames[f - 1] ?? ""),
385
357
  1
386
358
  /* TEXT */
387
359
  )
@@ -396,86 +368,86 @@ const Te = (o, B, c, i, g, N, k) => ({ linkCheck: (K, r, b, f, C) => {
396
368
  256
397
369
  /* UNKEYED_FRAGMENT */
398
370
  )),
399
- e.$slots.bodyRight ? I(e.$slots, "bodyRight", {
371
+ e.$slots.bodyRight ? L(e.$slots, "bodyRight", {
400
372
  key: 2,
401
- node: u,
402
- data: a
403
- }, void 0, !0) : T("v-if", !0)
373
+ node: s,
374
+ data: l
375
+ }, void 0, !0) : w("v-if", !0)
404
376
  ])
405
377
  ])), [
406
- [A(te), { x: !1, "z-index": "auto" }]
378
+ [N(ae), { x: !1, "z-index": "auto" }]
407
379
  ])
408
380
  ]),
409
381
  _: 3
410
382
  /* FORWARDED */
411
383
  }, 8, ["nodeKey", "data", "props", "default-expand-all", "height"])), [
412
384
  [H, !q.value && !e.loading]
413
- ]) : T("v-if", !0),
414
- e.virtual ? T("v-if", !0) : M((L(), Q(A(me), {
385
+ ]) : w("v-if", !0),
386
+ e.virtual ? w("v-if", !0) : M((K(), Q(N(be), {
415
387
  key: 1,
416
388
  ref_key: "$treeTableBody",
417
- ref: v,
389
+ ref: c,
418
390
  nodeKey: e.nodeKey,
419
391
  data: m.value,
420
- props: b.value,
392
+ props: g.value,
421
393
  "expand-on-click-node": !1,
422
394
  "default-expand-all": e.defaultExpandAll,
423
395
  overlayZIndex: "auto",
424
- height: r.value,
396
+ height: v.value,
425
397
  style: { width: "100%" }
426
398
  }, {
427
- default: p(({ data: a, node: u }) => [
428
- M((L(), $("div", Me, [
429
- E("div", Oe, [
430
- E("div", Se, [
431
- e.$slots.icon ? I(e.$slots, "icon", {
399
+ default: F(({ data: l, node: s }) => [
400
+ M((K(), V("div", Ae, [
401
+ $("div", Be, [
402
+ $("div", Re, [
403
+ e.$slots.icon ? L(e.$slots, "icon", {
432
404
  key: 0,
433
- node: u,
434
- data: a
405
+ node: s,
406
+ data: l
435
407
  }, () => [
436
- t[1] || (t[1] = S("icon"))
437
- ], !0) : T("v-if", !0),
438
- I(e.$slots, "title", {
439
- node: u,
440
- data: a
408
+ a[1] || (a[1] = S("icon"))
409
+ ], !0) : w("v-if", !0),
410
+ L(e.$slots, "title", {
411
+ node: s,
412
+ data: l
441
413
  }, () => [
442
- E(
414
+ $(
443
415
  "span",
444
- Ue,
445
- R(a[e.fistLabel]),
416
+ Fe,
417
+ A(l[e.fistLabel]),
446
418
  1
447
419
  /* TEXT */
448
420
  )
449
421
  ], !0)
450
422
  ]),
451
- e.$slots.bodyLeft ? I(e.$slots, "bodyLeft", {
423
+ e.$slots.bodyLeft ? L(e.$slots, "bodyLeft", {
452
424
  key: 0,
453
- node: u,
454
- data: a
455
- }, void 0, !0) : T("v-if", !0),
456
- s(a) ? T("v-if", !0) : (L(!0), $(
425
+ node: s,
426
+ data: l
427
+ }, void 0, !0) : w("v-if", !0),
428
+ u(l) ? w("v-if", !0) : (K(!0), V(
457
429
  G,
458
430
  { key: 1 },
459
- J(F.value, (y) => (L(), $(
431
+ J(D.value, (f) => (K(), V(
460
432
  "div",
461
433
  {
462
434
  class: "check-item",
463
- style: j({ width: e.checkboxWidth[y - 1] })
435
+ style: j({ width: e.checkboxWidth[f - 1] })
464
436
  },
465
437
  [
466
- W(A(X), {
467
- modelValue: a[e.checkboxLabels[y - 1]],
468
- "onUpdate:modelValue": (w) => a[e.checkboxLabels[y - 1]] = w,
438
+ W(N(X), {
439
+ modelValue: l[e.checkboxLabels[f - 1]],
440
+ "onUpdate:modelValue": (C) => l[e.checkboxLabels[f - 1]] = C,
469
441
  checkboxType: "default",
470
442
  isView: e.isView,
471
- disabled: n(a, y - 1),
472
- onChange: (w) => {
473
- O(w, a, y - 1);
443
+ disabled: n(l, f - 1),
444
+ onChange: (C) => {
445
+ O(C, l, f - 1);
474
446
  }
475
447
  }, {
476
- default: p(() => [
448
+ default: F(() => [
477
449
  S(
478
- R(e.checkboxNames[y - 1] ?? ""),
450
+ A(e.checkboxNames[f - 1] ?? ""),
479
451
  1
480
452
  /* TEXT */
481
453
  )
@@ -490,14 +462,14 @@ const Te = (o, B, c, i, g, N, k) => ({ linkCheck: (K, r, b, f, C) => {
490
462
  256
491
463
  /* UNKEYED_FRAGMENT */
492
464
  )),
493
- e.$slots.bodyRight ? I(e.$slots, "bodyRight", {
465
+ e.$slots.bodyRight ? L(e.$slots, "bodyRight", {
494
466
  key: 2,
495
- node: u,
496
- data: a
497
- }, void 0, !0) : T("v-if", !0)
467
+ node: s,
468
+ data: l
469
+ }, void 0, !0) : w("v-if", !0)
498
470
  ])
499
471
  ])), [
500
- [A(te), { x: !1, "z-index": "auto" }]
472
+ [N(ae), { x: !1, "z-index": "auto" }]
501
473
  ])
502
474
  ]),
503
475
  _: 3
@@ -505,9 +477,9 @@ const Te = (o, B, c, i, g, N, k) => ({ linkCheck: (K, r, b, f, C) => {
505
477
  }, 8, ["nodeKey", "data", "props", "default-expand-all", "height"])), [
506
478
  [H, !q.value && !e.loading]
507
479
  ]),
508
- T(" 空状态 "),
480
+ w(" 空状态 "),
509
481
  M(W(
510
- A(Ce),
482
+ N(ge),
511
483
  null,
512
484
  null,
513
485
  512
@@ -515,13 +487,13 @@ const Te = (o, B, c, i, g, N, k) => ({ linkCheck: (K, r, b, f, C) => {
515
487
  ), [
516
488
  [H, q.value && !e.loading]
517
489
  ]),
518
- T(" 加载状态 "),
519
- M(W(A(we), {
490
+ w(" 加载状态 "),
491
+ M(W(N(me), {
520
492
  size: "small",
521
493
  spinning: e.loading
522
494
  }, {
523
- default: p(() => t[2] || (t[2] = [
524
- E(
495
+ default: F(() => a[2] || (a[2] = [
496
+ $(
525
497
  "div",
526
498
  { style: { width: "100%", height: "100%" } },
527
499
  null,
@@ -540,21 +512,21 @@ const Te = (o, B, c, i, g, N, k) => ({ linkCheck: (K, r, b, f, C) => {
540
512
  /* CLASS, STYLE */
541
513
  ));
542
514
  }
543
- }), We = (o, B) => {
544
- const c = o.__vccOpts || o;
545
- for (const [i, g] of B)
546
- c[i] = g;
547
- return c;
548
- }, He = /* @__PURE__ */ We(je, [["__scopeId", "data-v-56fc5c0d"]]), Ze = {
515
+ }), Se = (d, B) => {
516
+ const r = d.__vccOpts || d;
517
+ for (const [t, y] of B)
518
+ r[t] = y;
519
+ return r;
520
+ }, Ue = /* @__PURE__ */ Se(Oe, [["__scopeId", "data-v-5e8ac73d"]]), ze = {
549
521
  "--das-ui-tree-table-highlight-color": "#5582f3",
550
522
  "--das-ui-tree-table-header-color": "#212121",
551
523
  "--das-ui-tree-table-header-bg-color": "#F2F2F2",
552
524
  "--das-ui-tree-table-border-color": "#D9D9D9"
553
525
  };
554
- ge(Ze);
555
- const ll = be(He), al = () => U(null), tl = { name: "tree-table 表格树" };
526
+ ke(ze);
527
+ const _e = ve(Ue), Pe = () => U(null), xe = { name: "tree-table 表格树" };
556
528
  export {
557
- ll as DasTreeTable,
558
- al as DasTreeTableRef,
559
- tl as default
529
+ _e as DasTreeTable,
530
+ Pe as DasTreeTableRef,
531
+ xe as default
560
532
  };