@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.
- package/package.json +5 -6
- package/packages/business-components/currency-page/index.d.ts +1 -3
- package/packages/business-components/currency-page/index.js +35 -40
- package/packages/business-components/currency-page/index.js.gz +0 -0
- package/packages/business-components/currency-page/src/index.vue.d.ts +1 -3
- package/packages/business-components/currency-page/src/type.d.ts +0 -6
- package/packages/business-components/currency-page/style.css +1 -1
- package/packages/components/edit-table/index.d.ts +15 -15
- package/packages/components/edit-table/src/index.vue.d.ts +4 -4
- package/packages/components/image-upload/index.d.ts +0 -1
- package/packages/components/image-upload/index.js +114 -767
- package/packages/components/image-upload/index.js.gz +0 -0
- package/packages/components/image-upload/src/Index.vue.d.ts +0 -1
- package/packages/components/image-upload/src/type.d.ts +0 -3
- package/packages/components/image-upload/style.css +1 -1
- package/packages/components/image-upload/style.css.gz +0 -0
- package/packages/components/image-viewer/index.d.ts +0 -1
- package/packages/components/image-viewer/index.js +434 -1086
- package/packages/components/image-viewer/index.js.gz +0 -0
- package/packages/components/image-viewer/src/Index.vue.d.ts +0 -1
- package/packages/components/image-viewer/src/type.d.ts +0 -3
- package/packages/components/image-viewer/style.css +1 -1
- package/packages/components/image-viewer/style.css.gz +0 -0
- package/packages/components/menu-header/index.d.ts +0 -6
- package/packages/components/menu-header/index.js +31 -26
- package/packages/components/menu-header/index.js.gz +0 -0
- package/packages/components/menu-header/src/Index.vue.d.ts +0 -2
- package/packages/components/menu-header/src/type.d.ts +1 -6
- package/packages/components/menu-header/style.css +1 -1
- package/packages/components/menu-header/style.css.gz +0 -0
- package/packages/components/select-list/index.d.ts +10 -10
- package/packages/components/select-list/src/Index.vue.d.ts +8 -8
- package/packages/components/tree-table/index.js +263 -291
- package/packages/components/tree-table/index.js.gz +0 -0
- package/packages/components/tree-table/src/type.d.ts +1 -1
- package/packages/components/tree-table/style.css +1 -1
- package/packages/components/tree-table/style.css.gz +0 -0
- package/packages/components/image-upload/src/hooks/use-compress-image.d.ts +0 -1
- package/packages/components/image-viewer/src/hooks/use-compress-image.d.ts +0 -1
- package/packages/components/tree-table/src/hooks/use-five.d.ts +0 -4
- 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
|
|
3
|
-
import { withInstall as
|
|
4
|
-
import { setThemeRule as
|
|
5
|
-
import { DasTree as
|
|
6
|
-
import { DasVirtualTree as
|
|
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
|
|
9
|
-
import { DasEmpty as
|
|
10
|
-
import { DasSpin as
|
|
11
|
-
import { treeFind as
|
|
12
|
-
const
|
|
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 (
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
n && n(
|
|
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 = (
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
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
|
|
26
|
-
n && n(k.value[
|
|
27
|
-
} }),
|
|
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 (
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
|
|
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 = (
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
n && n(
|
|
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
|
|
41
|
-
n && n(k.value[
|
|
42
|
-
} }),
|
|
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 (
|
|
45
|
-
var
|
|
46
|
-
|
|
47
|
-
|
|
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 = (
|
|
50
|
-
var
|
|
51
|
-
|
|
52
|
-
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
|
|
56
|
-
n && n(
|
|
55
|
+
const i = Ce(k.value, (u) => u[d.nodeKey] === T);
|
|
56
|
+
n && n(i);
|
|
57
57
|
}
|
|
58
|
-
} }),
|
|
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
|
-
},
|
|
88
|
-
class: /* @__PURE__ */
|
|
89
|
-
},
|
|
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
|
-
},
|
|
93
|
-
...
|
|
94
|
-
props: /* @__PURE__ */
|
|
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__ */
|
|
121
|
-
setup(
|
|
122
|
-
const
|
|
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
|
|
125
|
-
}),
|
|
126
|
-
if (
|
|
127
|
-
if (typeof
|
|
128
|
-
if (
|
|
129
|
-
if (
|
|
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
|
|
105
|
+
return t.height;
|
|
132
106
|
}
|
|
133
|
-
}),
|
|
134
|
-
const e = { ...
|
|
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:
|
|
136
|
-
}),
|
|
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 =
|
|
139
|
-
}),
|
|
140
|
-
var
|
|
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 (
|
|
143
|
-
}), n = (e,
|
|
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 =
|
|
146
|
-
}),
|
|
147
|
-
get: () =>
|
|
148
|
-
set: (e) =>
|
|
149
|
-
}),
|
|
150
|
-
const
|
|
151
|
-
return Array.isArray(e) && e.forEach((
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
}),
|
|
155
|
-
}, Z = () =>
|
|
156
|
-
|
|
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
|
|
159
|
-
let
|
|
160
|
-
|
|
161
|
-
for (let
|
|
162
|
-
let
|
|
163
|
-
|
|
164
|
-
n(
|
|
165
|
-
}),
|
|
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:
|
|
168
|
-
|
|
141
|
+
}, { linkCheck: se } = we(
|
|
142
|
+
t,
|
|
143
|
+
y,
|
|
169
144
|
g,
|
|
170
|
-
b,
|
|
171
145
|
n,
|
|
172
|
-
|
|
173
|
-
|
|
146
|
+
u,
|
|
147
|
+
b,
|
|
174
148
|
m
|
|
175
|
-
), { linkCheck:
|
|
176
|
-
|
|
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
|
-
|
|
181
|
-
|
|
154
|
+
u,
|
|
155
|
+
b,
|
|
182
156
|
m
|
|
183
|
-
),
|
|
184
|
-
first:
|
|
185
|
-
two:
|
|
186
|
-
three:
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
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 (
|
|
198
|
-
if (
|
|
199
|
-
z(e,
|
|
169
|
+
if (a === 1) {
|
|
170
|
+
if (t.allCheckboxDisabled[a - 1]) return;
|
|
171
|
+
z(e, a - 1);
|
|
200
172
|
}
|
|
201
|
-
} else if (
|
|
202
|
-
if (
|
|
203
|
-
z(e,
|
|
173
|
+
} else if (a === 0) {
|
|
174
|
+
if (t.allCheckboxDisabled[a + 1]) return;
|
|
175
|
+
z(e, a + 1);
|
|
204
176
|
}
|
|
205
177
|
}
|
|
206
|
-
},
|
|
178
|
+
}, re = I(() => {
|
|
207
179
|
let e = [];
|
|
208
180
|
if (!m.value || !m.value.length) return e;
|
|
209
|
-
const
|
|
210
|
-
return e =
|
|
211
|
-
(
|
|
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 =
|
|
214
|
-
var
|
|
185
|
+
}), q = I(() => {
|
|
186
|
+
var a;
|
|
215
187
|
let e = !1;
|
|
216
|
-
return (!m.value || !m.value.length) && (e = !0), k.value && !((
|
|
217
|
-
}),
|
|
218
|
-
const
|
|
219
|
-
var
|
|
220
|
-
if ((
|
|
221
|
-
setTimeout(() =>
|
|
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
|
-
|
|
195
|
+
a();
|
|
224
196
|
});
|
|
225
|
-
let
|
|
226
|
-
const
|
|
227
|
-
var e,
|
|
228
|
-
|
|
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
|
-
|
|
202
|
+
le(
|
|
231
203
|
() => m.value,
|
|
232
204
|
() => {
|
|
233
|
-
oe(),
|
|
205
|
+
oe(), x();
|
|
234
206
|
},
|
|
235
207
|
{ immediate: !0, deep: !0 }
|
|
236
|
-
),
|
|
237
|
-
const O = (e,
|
|
238
|
-
|
|
239
|
-
const
|
|
240
|
-
|
|
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:
|
|
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:
|
|
252
|
-
}), (e,
|
|
223
|
+
linkAllCheck: _
|
|
224
|
+
}), (e, a) => (K(), V(
|
|
253
225
|
"div",
|
|
254
226
|
{
|
|
255
227
|
ref_key: "dasTreeTableRef",
|
|
256
|
-
ref:
|
|
257
|
-
class:
|
|
258
|
-
style: j({ height:
|
|
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
|
-
|
|
262
|
-
|
|
233
|
+
$("div", pe, [
|
|
234
|
+
$(
|
|
263
235
|
"div",
|
|
264
|
-
|
|
265
|
-
|
|
236
|
+
Le,
|
|
237
|
+
A(e.title),
|
|
266
238
|
1
|
|
267
239
|
/* TEXT */
|
|
268
240
|
),
|
|
269
|
-
e.$slots.headerLeft ?
|
|
270
|
-
(
|
|
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(
|
|
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
|
-
|
|
281
|
-
e.isView ? (
|
|
252
|
+
L(e.$slots, e.checkboxLabels[l - 1] + "Header", {}, () => [
|
|
253
|
+
e.isView ? (K(), V(
|
|
282
254
|
"span",
|
|
283
|
-
|
|
284
|
-
|
|
255
|
+
Ie,
|
|
256
|
+
A(e.allCheckboxNames[l - 1] ?? ""),
|
|
285
257
|
1
|
|
286
258
|
/* TEXT */
|
|
287
|
-
)) : (
|
|
259
|
+
)) : (K(), Q(N(X), {
|
|
288
260
|
key: 1,
|
|
289
|
-
modelValue: h.value[
|
|
290
|
-
"onUpdate:modelValue": (
|
|
261
|
+
modelValue: h.value[l - 1],
|
|
262
|
+
"onUpdate:modelValue": (s) => h.value[l - 1] = s,
|
|
291
263
|
checkboxType: "default",
|
|
292
|
-
indeterminate:
|
|
293
|
-
disabled: e.allCheckboxDisabled[
|
|
264
|
+
indeterminate: o.value[l - 1],
|
|
265
|
+
disabled: e.allCheckboxDisabled[l - 1] || !m.value || !m.value.length,
|
|
294
266
|
isView: e.isView,
|
|
295
|
-
onChange: (
|
|
296
|
-
z(
|
|
267
|
+
onChange: (s) => {
|
|
268
|
+
z(s, l - 1);
|
|
297
269
|
}
|
|
298
270
|
}, {
|
|
299
|
-
default:
|
|
271
|
+
default: F(() => [
|
|
300
272
|
S(
|
|
301
|
-
|
|
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 ?
|
|
289
|
+
e.$slots.headerRight ? L(e.$slots, "headerRight", { key: 1 }, void 0, !0) : w("v-if", !0)
|
|
318
290
|
]),
|
|
319
|
-
|
|
320
|
-
e.virtual ? M((
|
|
291
|
+
$("div", Ve, [
|
|
292
|
+
e.virtual ? M((K(), Q(N(ye), {
|
|
321
293
|
key: 0,
|
|
322
294
|
ref_key: "$treeTableBody",
|
|
323
|
-
ref:
|
|
295
|
+
ref: c,
|
|
324
296
|
nodeKey: e.nodeKey,
|
|
325
297
|
data: m.value,
|
|
326
|
-
props:
|
|
298
|
+
props: g.value,
|
|
327
299
|
"expand-on-click-node": !1,
|
|
328
300
|
"default-expand-all": e.defaultExpandAll,
|
|
329
301
|
overlayZIndex: "auto",
|
|
330
|
-
height:
|
|
302
|
+
height: v.value,
|
|
331
303
|
style: { width: "100%" }
|
|
332
304
|
}, {
|
|
333
|
-
default:
|
|
334
|
-
M((
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
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:
|
|
340
|
-
data:
|
|
311
|
+
node: s,
|
|
312
|
+
data: l
|
|
341
313
|
}, () => [
|
|
342
|
-
|
|
343
|
-
], !0) :
|
|
344
|
-
|
|
345
|
-
node:
|
|
346
|
-
data:
|
|
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
|
-
|
|
320
|
+
$(
|
|
349
321
|
"span",
|
|
350
|
-
|
|
351
|
-
|
|
322
|
+
De,
|
|
323
|
+
A(l[e.fistLabel]),
|
|
352
324
|
1
|
|
353
325
|
/* TEXT */
|
|
354
326
|
)
|
|
355
327
|
], !0)
|
|
356
328
|
]),
|
|
357
|
-
e.$slots.bodyLeft ?
|
|
329
|
+
e.$slots.bodyLeft ? L(e.$slots, "bodyLeft", {
|
|
358
330
|
key: 0,
|
|
359
|
-
node:
|
|
360
|
-
data:
|
|
361
|
-
}, void 0, !0) :
|
|
362
|
-
|
|
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(
|
|
337
|
+
J(D.value, (f) => (K(), V(
|
|
366
338
|
"div",
|
|
367
339
|
{
|
|
368
340
|
class: "check-item",
|
|
369
|
-
style: j({ width: e.checkboxWidth[
|
|
341
|
+
style: j({ width: e.checkboxWidth[f - 1] })
|
|
370
342
|
},
|
|
371
343
|
[
|
|
372
|
-
W(
|
|
373
|
-
modelValue:
|
|
374
|
-
"onUpdate:modelValue": (
|
|
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(
|
|
378
|
-
onChange: (
|
|
379
|
-
O(
|
|
349
|
+
disabled: n(l, f - 1),
|
|
350
|
+
onChange: (C) => {
|
|
351
|
+
O(C, l, f - 1);
|
|
380
352
|
}
|
|
381
353
|
}, {
|
|
382
|
-
default:
|
|
354
|
+
default: F(() => [
|
|
383
355
|
S(
|
|
384
|
-
|
|
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 ?
|
|
371
|
+
e.$slots.bodyRight ? L(e.$slots, "bodyRight", {
|
|
400
372
|
key: 2,
|
|
401
|
-
node:
|
|
402
|
-
data:
|
|
403
|
-
}, void 0, !0) :
|
|
373
|
+
node: s,
|
|
374
|
+
data: l
|
|
375
|
+
}, void 0, !0) : w("v-if", !0)
|
|
404
376
|
])
|
|
405
377
|
])), [
|
|
406
|
-
[
|
|
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
|
-
]) :
|
|
414
|
-
e.virtual ?
|
|
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:
|
|
389
|
+
ref: c,
|
|
418
390
|
nodeKey: e.nodeKey,
|
|
419
391
|
data: m.value,
|
|
420
|
-
props:
|
|
392
|
+
props: g.value,
|
|
421
393
|
"expand-on-click-node": !1,
|
|
422
394
|
"default-expand-all": e.defaultExpandAll,
|
|
423
395
|
overlayZIndex: "auto",
|
|
424
|
-
height:
|
|
396
|
+
height: v.value,
|
|
425
397
|
style: { width: "100%" }
|
|
426
398
|
}, {
|
|
427
|
-
default:
|
|
428
|
-
M((
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
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:
|
|
434
|
-
data:
|
|
405
|
+
node: s,
|
|
406
|
+
data: l
|
|
435
407
|
}, () => [
|
|
436
|
-
|
|
437
|
-
], !0) :
|
|
438
|
-
|
|
439
|
-
node:
|
|
440
|
-
data:
|
|
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
|
-
|
|
414
|
+
$(
|
|
443
415
|
"span",
|
|
444
|
-
|
|
445
|
-
|
|
416
|
+
Fe,
|
|
417
|
+
A(l[e.fistLabel]),
|
|
446
418
|
1
|
|
447
419
|
/* TEXT */
|
|
448
420
|
)
|
|
449
421
|
], !0)
|
|
450
422
|
]),
|
|
451
|
-
e.$slots.bodyLeft ?
|
|
423
|
+
e.$slots.bodyLeft ? L(e.$slots, "bodyLeft", {
|
|
452
424
|
key: 0,
|
|
453
|
-
node:
|
|
454
|
-
data:
|
|
455
|
-
}, void 0, !0) :
|
|
456
|
-
|
|
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(
|
|
431
|
+
J(D.value, (f) => (K(), V(
|
|
460
432
|
"div",
|
|
461
433
|
{
|
|
462
434
|
class: "check-item",
|
|
463
|
-
style: j({ width: e.checkboxWidth[
|
|
435
|
+
style: j({ width: e.checkboxWidth[f - 1] })
|
|
464
436
|
},
|
|
465
437
|
[
|
|
466
|
-
W(
|
|
467
|
-
modelValue:
|
|
468
|
-
"onUpdate:modelValue": (
|
|
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(
|
|
472
|
-
onChange: (
|
|
473
|
-
O(
|
|
443
|
+
disabled: n(l, f - 1),
|
|
444
|
+
onChange: (C) => {
|
|
445
|
+
O(C, l, f - 1);
|
|
474
446
|
}
|
|
475
447
|
}, {
|
|
476
|
-
default:
|
|
448
|
+
default: F(() => [
|
|
477
449
|
S(
|
|
478
|
-
|
|
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 ?
|
|
465
|
+
e.$slots.bodyRight ? L(e.$slots, "bodyRight", {
|
|
494
466
|
key: 2,
|
|
495
|
-
node:
|
|
496
|
-
data:
|
|
497
|
-
}, void 0, !0) :
|
|
467
|
+
node: s,
|
|
468
|
+
data: l
|
|
469
|
+
}, void 0, !0) : w("v-if", !0)
|
|
498
470
|
])
|
|
499
471
|
])), [
|
|
500
|
-
[
|
|
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
|
-
|
|
480
|
+
w(" 空状态 "),
|
|
509
481
|
M(W(
|
|
510
|
-
|
|
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
|
-
|
|
519
|
-
M(W(
|
|
490
|
+
w(" 加载状态 "),
|
|
491
|
+
M(W(N(me), {
|
|
520
492
|
size: "small",
|
|
521
493
|
spinning: e.loading
|
|
522
494
|
}, {
|
|
523
|
-
default:
|
|
524
|
-
|
|
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
|
-
}),
|
|
544
|
-
const
|
|
545
|
-
for (const [
|
|
546
|
-
|
|
547
|
-
return
|
|
548
|
-
},
|
|
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
|
-
|
|
555
|
-
const
|
|
526
|
+
ke(ze);
|
|
527
|
+
const _e = ve(Ue), Pe = () => U(null), xe = { name: "tree-table 表格树" };
|
|
556
528
|
export {
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
529
|
+
_e as DasTreeTable,
|
|
530
|
+
Pe as DasTreeTableRef,
|
|
531
|
+
xe as default
|
|
560
532
|
};
|