@das-fed/ui 6.4.0-beta.21 → 6.4.0-beta.23
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/esm-map.json +6 -1
- package/package.json +5 -6
- package/packages/business-components/app-container/index.js +137 -133
- package/packages/business-components/app-container/index.js.gz +0 -0
- package/packages/business-components/area-phone-select/i18n/index.d.ts +7 -0
- package/packages/business-components/area-phone-select/index.d.ts +1368 -0
- package/packages/business-components/area-phone-select/index.js +269 -0
- package/packages/business-components/area-phone-select/index.js.gz +0 -0
- package/packages/business-components/area-phone-select/src/Index.vue.d.ts +15 -0
- package/packages/business-components/area-phone-select/src/apis.d.ts +2 -0
- package/packages/business-components/area-phone-select/src/area-popover/index.vue.d.ts +179 -0
- package/packages/business-components/area-phone-select/src/area-popover/type.d.ts +37 -0
- package/packages/business-components/area-phone-select/src/type.d.ts +26 -0
- package/packages/business-components/area-phone-select/src/utils.d.ts +12 -0
- package/packages/business-components/area-phone-select/style.css +1 -0
- package/packages/business-components/area-phone-select/style.css.gz +0 -0
- package/packages/business-components/device-panel/i18n/index.d.ts +1 -1
- package/packages/business-components/device-panel/index.js +13428 -13348
- package/packages/business-components/device-panel/index.js.gz +0 -0
- package/packages/business-components/device-panel/src/components/alarmDevicePanel/dataTrends/components/barChart.vue.d.ts +1 -1
- package/packages/business-components/device-panel/src/components/alarmDevicePanel/dataTrends/index.vue.d.ts +8 -2
- package/packages/business-components/device-panel/src/components/devicePanelModal/dataTrends/components/barChart.vue.d.ts +6 -2
- package/packages/business-components/device-panel/src/components/devicePanelModal/dataTrends/index.vue.d.ts +8 -2
- package/packages/business-components/device-panel/style.css +1 -1
- package/packages/business-components/device-panel/style.css.gz +0 -0
- package/packages/business-components/echarts/index.js +2 -2
- package/packages/business-components/echarts/index.js.gz +0 -0
- package/packages/business-components/echarts/style.css +1 -1
- package/packages/business-components/import-button/index.js +30 -30
- package/packages/business-components/import-button/index.js.gz +0 -0
- package/packages/business-components/import-button/style.css +1 -1
- package/packages/business-components/index.d.ts +1 -0
- package/packages/business-components/index.js +1 -0
- package/packages/business-components/payment/index.js +177 -1626
- package/packages/business-components/payment/index.js.gz +0 -0
- package/packages/business-components/payment/style.css +1 -1
- package/packages/business-components/payment/type.d.ts +3 -2
- package/packages/business-components/process-form/index.js +763 -793
- package/packages/business-components/process-form/index.js.gz +0 -0
- package/packages/business-components/process-form/style.css +1 -1
- package/packages/components/color-picker/index.js +62 -63
- package/packages/components/color-picker/index.js.gz +0 -0
- package/packages/components/color-picker/style.css +1 -1
- package/packages/components/color-picker/style.css.gz +0 -0
- package/packages/components/edit-table/index.js +580 -567
- package/packages/components/edit-table/index.js.gz +0 -0
- package/packages/components/edit-table/style.css +1 -1
- package/packages/components/edit-table/style.css.gz +0 -0
- package/packages/components/image-upload/index.js +87 -86
- package/packages/components/image-upload/index.js.gz +0 -0
- package/packages/components/image-viewer/index.js +213 -212
- package/packages/components/image-viewer/index.js.gz +0 -0
- package/packages/components/image-viewer/src/hooks/use-imageViewer.d.ts +1 -1
- package/packages/components/image-viewer/style.css +1 -1
- package/packages/components/image-viewer/style.css.gz +0 -0
- package/packages/components/pagination/index.js +1 -1
- package/packages/components/pagination/index.js.gz +0 -0
- package/packages/components/pagination/style.css +1 -1
- package/packages/components/pagination/style.css.gz +0 -0
- package/packages/components/popover/index.d.ts +160 -2
- package/packages/components/popover/index.js +29 -27
- package/packages/components/popover/index.js.gz +0 -0
- package/packages/components/search/index.js +1 -1
- package/packages/components/search/index.js.gz +0 -0
- package/packages/components/search/style.css +1 -1
- package/packages/components/search/style.css.gz +0 -0
- package/packages/components/search-form/index.js +734 -708
- package/packages/components/search-form/index.js.gz +0 -0
- package/packages/components/search-form/src/hooks/common.d.ts +1 -0
- package/packages/components/search-form/style.css +1 -1
- package/packages/components/search-form/style.css.gz +0 -0
- package/packages/components/text-tooltip/index.js +616 -616
- package/packages/components/text-tooltip/index.js.gz +0 -0
- package/packages/components/tree-select/index.js +81 -81
- package/packages/components/tree-select/index.js.gz +0 -0
- package/packages/components/tree-select/src/type.d.ts +0 -2
- package/packages/components/tree-table/index.js +68 -72
- package/packages/components/tree-table/index.js.gz +0 -0
- package/packages/components/tree-table/style.css +1 -1
- package/packages/components/tree-table/style.css.gz +0 -0
- package/packages/components/virtual-tree/index.js +40 -35
- package/packages/components/virtual-tree/index.js.gz +0 -0
- package/packages/components/virtual-tree/src/App.vue.d.ts +1 -0
|
@@ -1,15 +1,15 @@
|
|
|
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, openBlock as w, createElementBlock as V, normalizeClass as ie, normalizeStyle as j, createElementVNode as $, toDisplayString as A, renderSlot as L, createCommentVNode as p, 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 pe = (n, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
13
13
|
let d = null;
|
|
14
14
|
if (g ? d = (i) => {
|
|
15
15
|
var u, c, h;
|
|
@@ -24,7 +24,7 @@ const Ce = (n, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
|
24
24
|
}, k.value && k.value.length)
|
|
25
25
|
for (let i = 0; i < k.value.length; i++)
|
|
26
26
|
d && d(k.value[i]);
|
|
27
|
-
} }),
|
|
27
|
+
} }), we = (n, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
28
28
|
let d = null;
|
|
29
29
|
if (g ? d = (i) => {
|
|
30
30
|
var u, c, h;
|
|
@@ -39,7 +39,7 @@ const Ce = (n, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
|
39
39
|
}, k.value && k.value.length)
|
|
40
40
|
for (let i = 0; i < k.value.length; i++)
|
|
41
41
|
d && d(k.value[i]);
|
|
42
|
-
} }),
|
|
42
|
+
} }), Te = (n, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
43
43
|
let d = null;
|
|
44
44
|
if (g ? d = (i) => {
|
|
45
45
|
var u, c, h;
|
|
@@ -52,20 +52,20 @@ const Ce = (n, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
|
52
52
|
o[n.nodeKey] == T ? n.nodeKey && delete b[o[n.nodeKey]].data[v + "-targetId"] : d && d(o);
|
|
53
53
|
});
|
|
54
54
|
}, k.value && k.value.length) {
|
|
55
|
-
const i =
|
|
55
|
+
const i = Ce(k.value, (u) => u[n.nodeKey] === T);
|
|
56
56
|
d && d(i);
|
|
57
57
|
}
|
|
58
|
-
} }),
|
|
58
|
+
} }), Ke = { class: "table-header" }, Le = { class: "title table-label" }, Ie = {
|
|
59
59
|
key: 0,
|
|
60
60
|
class: "table-label"
|
|
61
|
-
},
|
|
62
|
-
class: /* @__PURE__ */
|
|
63
|
-
},
|
|
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 = {
|
|
64
64
|
name: "DasTreeTable",
|
|
65
65
|
inheritAttrs: !1
|
|
66
|
-
},
|
|
67
|
-
...
|
|
68
|
-
props: /* @__PURE__ */
|
|
66
|
+
}, Oe = /* @__PURE__ */ he({
|
|
67
|
+
...Me,
|
|
68
|
+
props: /* @__PURE__ */ ee({
|
|
69
69
|
virtual: { type: Boolean, default: !0 },
|
|
70
70
|
linkageType: { default: "first" },
|
|
71
71
|
keyword: {},
|
|
@@ -91,9 +91,9 @@ const Ce = (n, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
|
91
91
|
keyword: { type: String, default: "" },
|
|
92
92
|
keywordModifiers: {}
|
|
93
93
|
}),
|
|
94
|
-
emits: /* @__PURE__ */
|
|
94
|
+
emits: /* @__PURE__ */ ee(["update:data", "update:keyword", "all-check", "item-check"], ["update:keyword"]),
|
|
95
95
|
setup(n, { expose: B, emit: r }) {
|
|
96
|
-
const t = n, y = r, E = U(), k =
|
|
96
|
+
const t = n, y = r, E = U(), k = ce(n, "keyword"), D = I(() => {
|
|
97
97
|
var e;
|
|
98
98
|
return t.checkNum ?? ((e = t.checkboxLabels) == null ? void 0 : e.length) ?? 0;
|
|
99
99
|
}), T = I(() => t != null && t.height ? t.height + "px" : "100%"), v = I(() => {
|
|
@@ -128,17 +128,17 @@ const Ce = (n, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
|
128
128
|
}), a;
|
|
129
129
|
}, Z = () => Y(m.value), _ = (e, a, l) => {
|
|
130
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));
|
|
131
|
-
},
|
|
131
|
+
}, oe = (e) => {
|
|
132
132
|
const a = g.value.children;
|
|
133
133
|
let l = [];
|
|
134
|
-
l =
|
|
134
|
+
l = te(m.value, a);
|
|
135
135
|
for (let s = 0; s < D.value; s++) {
|
|
136
136
|
let f = 0, C = 0;
|
|
137
137
|
l.forEach((R) => {
|
|
138
138
|
d(R, s) || u(R) || (R[t.checkboxLabels[s]] ? f++ : C++);
|
|
139
139
|
}), _(f, C, s);
|
|
140
140
|
}
|
|
141
|
-
}, { linkCheck:
|
|
141
|
+
}, { linkCheck: se } = pe(
|
|
142
142
|
t,
|
|
143
143
|
y,
|
|
144
144
|
g,
|
|
@@ -146,7 +146,7 @@ const Ce = (n, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
|
146
146
|
u,
|
|
147
147
|
b,
|
|
148
148
|
m
|
|
149
|
-
), { linkCheck:
|
|
149
|
+
), { linkCheck: de } = we(t, y, g, d, u, b, m), { linkCheck: ne } = Te(
|
|
150
150
|
t,
|
|
151
151
|
y,
|
|
152
152
|
g,
|
|
@@ -154,10 +154,10 @@ const Ce = (n, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
|
154
154
|
u,
|
|
155
155
|
b,
|
|
156
156
|
m
|
|
157
|
-
),
|
|
158
|
-
first:
|
|
159
|
-
two:
|
|
160
|
-
three:
|
|
157
|
+
), ue = (e, a, l, s, f) => t.linkageType === "custom" ? void 0 : {
|
|
158
|
+
first: se,
|
|
159
|
+
two: de,
|
|
160
|
+
three: ne
|
|
161
161
|
}[t.linkageType](e, a, l, s, f), z = (e, a) => {
|
|
162
162
|
y("all-check", e, a), h.value[a] = e, o.value[a] = !1;
|
|
163
163
|
const l = Z();
|
|
@@ -175,45 +175,41 @@ const Ce = (n, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
|
175
175
|
z(e, a + 1);
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
-
},
|
|
178
|
+
}, re = I(() => {
|
|
179
179
|
let e = [];
|
|
180
180
|
if (!m.value || !m.value.length) return e;
|
|
181
181
|
const a = g.value.children;
|
|
182
|
-
return e =
|
|
182
|
+
return e = te(m.value, a).filter(
|
|
183
183
|
(s) => s[g.value.label].toLowerCase().includes(k.value.toLowerCase())
|
|
184
184
|
), e;
|
|
185
185
|
}), q = I(() => {
|
|
186
186
|
var a;
|
|
187
187
|
let e = !1;
|
|
188
|
-
return (!m.value || !m.value.length) && (e = !0), k.value && !((a =
|
|
189
|
-
}),
|
|
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
190
|
const a = () => {
|
|
191
191
|
var l;
|
|
192
192
|
if ((l = c.value) != null && l.treeRef) return e(!0);
|
|
193
193
|
setTimeout(() => a(), 50);
|
|
194
194
|
};
|
|
195
195
|
a();
|
|
196
|
-
})
|
|
196
|
+
});
|
|
197
|
+
let P = "";
|
|
198
|
+
const x = async () => {
|
|
197
199
|
var e, a;
|
|
198
|
-
await
|
|
200
|
+
P != k.value && (await fe(), (a = (e = c.value) == null ? void 0 : e.treeRef) == null || a.filter(k.value), P = k.value);
|
|
199
201
|
};
|
|
200
|
-
|
|
202
|
+
le(
|
|
201
203
|
() => m.value,
|
|
202
204
|
() => {
|
|
203
|
-
|
|
205
|
+
oe(), x();
|
|
204
206
|
},
|
|
205
207
|
{ immediate: !0, deep: !0 }
|
|
206
|
-
),
|
|
207
|
-
() => k.value,
|
|
208
|
-
() => {
|
|
209
|
-
P();
|
|
210
|
-
},
|
|
211
|
-
{ immediate: !0 }
|
|
212
|
-
);
|
|
208
|
+
), le(() => k.value, x);
|
|
213
209
|
const O = (e, a, l) => {
|
|
214
210
|
y("item-check", e, a, l);
|
|
215
211
|
const s = Z(), f = t.checkboxLabels[l];
|
|
216
|
-
s && (s[a[t.nodeKey]].data[f + "-targetId"] = a[t.nodeKey], s[a[t.nodeKey]].data[f] = e),
|
|
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 && !d(a, l - 1) && !u(a) && O(e, a, l - 1) : l === 0 && !d(a, l + 1) && !u(a) && O(e, a, l + 1));
|
|
217
213
|
};
|
|
218
214
|
return B({
|
|
219
215
|
$treeTableBody: c,
|
|
@@ -230,14 +226,14 @@ const Ce = (n, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
|
230
226
|
{
|
|
231
227
|
ref_key: "dasTreeTableRef",
|
|
232
228
|
ref: E,
|
|
233
|
-
class:
|
|
229
|
+
class: ie(["das-ui-tree-table", e.border ? "is-border" : ""]),
|
|
234
230
|
style: j({ height: T.value })
|
|
235
231
|
},
|
|
236
232
|
[
|
|
237
|
-
$("div",
|
|
233
|
+
$("div", Ke, [
|
|
238
234
|
$(
|
|
239
235
|
"div",
|
|
240
|
-
|
|
236
|
+
Le,
|
|
241
237
|
A(e.title),
|
|
242
238
|
1
|
|
243
239
|
/* TEXT */
|
|
@@ -256,7 +252,7 @@ const Ce = (n, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
|
256
252
|
L(e.$slots, e.checkboxLabels[l - 1] + "Header", {}, () => [
|
|
257
253
|
e.isView ? (w(), V(
|
|
258
254
|
"span",
|
|
259
|
-
|
|
255
|
+
Ie,
|
|
260
256
|
A(e.allCheckboxNames[l - 1] ?? ""),
|
|
261
257
|
1
|
|
262
258
|
/* TEXT */
|
|
@@ -292,8 +288,8 @@ const Ce = (n, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
|
292
288
|
)),
|
|
293
289
|
e.$slots.headerRight ? L(e.$slots, "headerRight", { key: 1 }, void 0, !0) : p("v-if", !0)
|
|
294
290
|
]),
|
|
295
|
-
$("div",
|
|
296
|
-
e.virtual ? M((w(), Q(N(
|
|
291
|
+
$("div", Ve, [
|
|
292
|
+
e.virtual ? M((w(), Q(N(ye), {
|
|
297
293
|
key: 0,
|
|
298
294
|
ref_key: "$treeTableBody",
|
|
299
295
|
ref: c,
|
|
@@ -307,9 +303,9 @@ const Ce = (n, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
|
307
303
|
style: { width: "100%" }
|
|
308
304
|
}, {
|
|
309
305
|
default: F(({ data: l, node: s }) => [
|
|
310
|
-
M((w(), V("div",
|
|
311
|
-
$("div",
|
|
312
|
-
$("div",
|
|
306
|
+
M((w(), V("div", $e, [
|
|
307
|
+
$("div", Ne, [
|
|
308
|
+
$("div", Ee, [
|
|
313
309
|
e.$slots.icon ? L(e.$slots, "icon", {
|
|
314
310
|
key: 0,
|
|
315
311
|
node: s,
|
|
@@ -323,7 +319,7 @@ const Ce = (n, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
|
323
319
|
}, () => [
|
|
324
320
|
$(
|
|
325
321
|
"span",
|
|
326
|
-
|
|
322
|
+
De,
|
|
327
323
|
A(l[e.fistLabel]),
|
|
328
324
|
1
|
|
329
325
|
/* TEXT */
|
|
@@ -379,7 +375,7 @@ const Ce = (n, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
|
379
375
|
}, void 0, !0) : p("v-if", !0)
|
|
380
376
|
])
|
|
381
377
|
])), [
|
|
382
|
-
[N(
|
|
378
|
+
[N(ae), { x: !1, "z-index": "auto" }]
|
|
383
379
|
])
|
|
384
380
|
]),
|
|
385
381
|
_: 3
|
|
@@ -387,7 +383,7 @@ const Ce = (n, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
|
387
383
|
}, 8, ["nodeKey", "data", "props", "default-expand-all", "height"])), [
|
|
388
384
|
[H, !q.value && !e.loading]
|
|
389
385
|
]) : p("v-if", !0),
|
|
390
|
-
e.virtual ? p("v-if", !0) : M((w(), Q(N(
|
|
386
|
+
e.virtual ? p("v-if", !0) : M((w(), Q(N(be), {
|
|
391
387
|
key: 1,
|
|
392
388
|
ref_key: "$treeTableBody",
|
|
393
389
|
ref: c,
|
|
@@ -401,9 +397,9 @@ const Ce = (n, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
|
401
397
|
style: { width: "100%" }
|
|
402
398
|
}, {
|
|
403
399
|
default: F(({ data: l, node: s }) => [
|
|
404
|
-
M((w(), V("div",
|
|
405
|
-
$("div",
|
|
406
|
-
$("div",
|
|
400
|
+
M((w(), V("div", Ae, [
|
|
401
|
+
$("div", Be, [
|
|
402
|
+
$("div", Re, [
|
|
407
403
|
e.$slots.icon ? L(e.$slots, "icon", {
|
|
408
404
|
key: 0,
|
|
409
405
|
node: s,
|
|
@@ -417,7 +413,7 @@ const Ce = (n, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
|
417
413
|
}, () => [
|
|
418
414
|
$(
|
|
419
415
|
"span",
|
|
420
|
-
|
|
416
|
+
Fe,
|
|
421
417
|
A(l[e.fistLabel]),
|
|
422
418
|
1
|
|
423
419
|
/* TEXT */
|
|
@@ -473,7 +469,7 @@ const Ce = (n, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
|
473
469
|
}, void 0, !0) : p("v-if", !0)
|
|
474
470
|
])
|
|
475
471
|
])), [
|
|
476
|
-
[N(
|
|
472
|
+
[N(ae), { x: !1, "z-index": "auto" }]
|
|
477
473
|
])
|
|
478
474
|
]),
|
|
479
475
|
_: 3
|
|
@@ -483,7 +479,7 @@ const Ce = (n, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
|
483
479
|
]),
|
|
484
480
|
p(" 空状态 "),
|
|
485
481
|
M(W(
|
|
486
|
-
N(
|
|
482
|
+
N(ge),
|
|
487
483
|
null,
|
|
488
484
|
null,
|
|
489
485
|
512
|
|
@@ -492,7 +488,7 @@ const Ce = (n, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
|
492
488
|
[H, q.value && !e.loading]
|
|
493
489
|
]),
|
|
494
490
|
p(" 加载状态 "),
|
|
495
|
-
M(W(N(
|
|
491
|
+
M(W(N(me), {
|
|
496
492
|
size: "small",
|
|
497
493
|
spinning: e.loading
|
|
498
494
|
}, {
|
|
@@ -516,21 +512,21 @@ const Ce = (n, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
|
516
512
|
/* CLASS, STYLE */
|
|
517
513
|
));
|
|
518
514
|
}
|
|
519
|
-
}),
|
|
515
|
+
}), Se = (n, B) => {
|
|
520
516
|
const r = n.__vccOpts || n;
|
|
521
517
|
for (const [t, y] of B)
|
|
522
518
|
r[t] = y;
|
|
523
519
|
return r;
|
|
524
|
-
},
|
|
520
|
+
}, Ue = /* @__PURE__ */ Se(Oe, [["__scopeId", "data-v-57c45da6"]]), ze = {
|
|
525
521
|
"--das-ui-tree-table-highlight-color": "#5582f3",
|
|
526
522
|
"--das-ui-tree-table-header-color": "#212121",
|
|
527
523
|
"--das-ui-tree-table-header-bg-color": "#F2F2F2",
|
|
528
524
|
"--das-ui-tree-table-border-color": "#D9D9D9"
|
|
529
525
|
};
|
|
530
|
-
|
|
531
|
-
const
|
|
526
|
+
ke(ze);
|
|
527
|
+
const _e = ve(Ue), Pe = () => U(null), xe = { name: "tree-table 表格树" };
|
|
532
528
|
export {
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
529
|
+
_e as DasTreeTable,
|
|
530
|
+
Pe as DasTreeTableRef,
|
|
531
|
+
xe as default
|
|
536
532
|
};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.das-ui-tree-table[data-v-
|
|
1
|
+
.das-ui-tree-table[data-v-57c45da6]{display:flex;flex-direction:column}.das-ui-tree-table.is-border[data-v-57c45da6]{border:1px solid var(--das-ui-tree-table-border-color)}.das-ui-tree-table .table-header[data-v-57c45da6]{height:32px;display:flex;align-items:center;background:var(--das-ui-tree-table-header-bg-color);border-bottom:1px solid var(--das-ui-tree-table-border-color);box-sizing:border-box}.das-ui-tree-table .table-header .title[data-v-57c45da6]{flex:1;min-width:0}.das-ui-tree-table .table-header .table-label[data-v-57c45da6]{font-size:12px;color:var(--das-ui-tree-table-header-color)}.das-ui-tree-table .table-body[data-v-57c45da6]{flex:1;min-height:0}.das-ui-tree-table .table-body .tree-node[data-v-57c45da6]{flex:1;min-width:0;display:flex;align-items:center}.das-ui-tree-table .table-body .tree-node .first-column[data-v-57c45da6]{flex:1;min-width:0}.das-ui-tree-table .table-body .tree-node .first-column .title.is-highlight[data-v-57c45da6]{color:var(--das-ui-tree-table-highlight-color)}.das-ui-tree-table .das-ui-tree[data-v-57c45da6] .el-tree-node.is-current:not([aria-disabled=true])>.el-tree-node__content{color:var(--das-ui-tree-node-active-font-color);background-color:var(--das-ui-tree-node-active-bg-color)}.das-ui-tree-table .das-ui-tree[data-v-57c45da6] .el-tree-node.is-current:not([aria-disabled=true])>.el-tree-node__content .el-tree-node__expand-icon:not(.is-leaf){color:var(--das-ui-tree-node-active-font-color)}.das-ui-tree-table .das-ui-tree[data-v-57c45da6] .el-tree-node .el-tree-node__content,.das-ui-tree-table .das-ui-tree[data-v-57c45da6] .el-tree-node .el-tree-node__content .el-tree-node__label{width:100%}
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@das-fed/ui/packages/components/virtual-tree/style.css';
|
|
2
|
-
import { defineComponent as
|
|
2
|
+
import { defineComponent as I, openBlock as r, createBlock as k, unref as h, ref as i, computed as c, watch as g, onMounted as O, onBeforeUnmount as F, createElementBlock as v, normalizeStyle as M, mergeProps as V, withCtx as x, renderSlot as T, createElementVNode as D, toDisplayString as $, Fragment as b, createCommentVNode as B, createSlots as H, createVNode as L, nextTick as J } from "vue";
|
|
3
3
|
import { withInstall as P } from "@das-fed/utils/with-install/index";
|
|
4
4
|
import { ElTreeV2 as W } from "element-plus";
|
|
5
5
|
import "element-plus/es/components/tree-v2/style/css";
|
|
@@ -8,11 +8,11 @@ import { DasTreeEmpty as q } from "@das-fed/ui/packages/components/tree/index";
|
|
|
8
8
|
import { DasSpin as G } from "@das-fed/ui/packages/components/spin/index";
|
|
9
9
|
import { DasIconCaretRight as Q } from "@das-fed/ui/packages/icons/caret-right/index";
|
|
10
10
|
import { SizeWatcher as X } from "@das-fed/utils/size-watcher";
|
|
11
|
-
import { flatTree as
|
|
12
|
-
const Y = /* @__PURE__ */
|
|
11
|
+
import { flatTree as _ } from "@das-fed/utils/common-tools";
|
|
12
|
+
const Y = /* @__PURE__ */ I({
|
|
13
13
|
__name: "expand-icon",
|
|
14
14
|
setup(s) {
|
|
15
|
-
return (f, o) => (r(),
|
|
15
|
+
return (f, o) => (r(), k(h(Q), {
|
|
16
16
|
class: "das-tree__expand-icon",
|
|
17
17
|
size: "medium"
|
|
18
18
|
}));
|
|
@@ -25,7 +25,7 @@ const Y = /* @__PURE__ */ B({
|
|
|
25
25
|
}, ee = /* @__PURE__ */ Z(Y, [["__scopeId", "data-v-d51f7d20"]]), te = { class: "tree-normal-node" }, ae = {
|
|
26
26
|
name: "DasVirtualTree",
|
|
27
27
|
inheritAttrs: !1
|
|
28
|
-
}, ne = /* @__PURE__ */
|
|
28
|
+
}, ne = /* @__PURE__ */ I({
|
|
29
29
|
...ae,
|
|
30
30
|
props: {
|
|
31
31
|
data: { default: () => [] },
|
|
@@ -34,33 +34,38 @@ const Y = /* @__PURE__ */ B({
|
|
|
34
34
|
showCheckbox: { type: Boolean },
|
|
35
35
|
height: {},
|
|
36
36
|
currentNodeKey: {},
|
|
37
|
-
defaultExpandAll: { type: Boolean },
|
|
37
|
+
defaultExpandAll: { type: Boolean, default: !1 },
|
|
38
38
|
expandOnClickNode: { type: Boolean, default: !1 },
|
|
39
39
|
props: {},
|
|
40
40
|
emptyText: { default: "" },
|
|
41
41
|
filterMethod: {}
|
|
42
42
|
},
|
|
43
43
|
setup(s, { expose: f }) {
|
|
44
|
-
const o = i(), d = i(), p = i(0), t = s,
|
|
44
|
+
const o = i(), d = i(), p = i(0), t = s, C = c(() => t.emptyText || U("暂无数据")), l = c(() => ({ value: t.nodeKey, label: "name", children: "children", disabled: "disabled", ...t.props })), S = c(() => t != null && t.height ? t.height + "px" : "100%"), w = c(() => t != null && t.height ? t.height : p.value), z = (e, n) => n[l.value.label].toLowerCase().includes(e.toLowerCase()), K = c(() => (t == null ? void 0 : t.filterMethod) ?? z), N = () => {
|
|
45
45
|
if (t.data && t.data.length) {
|
|
46
|
-
const n =
|
|
46
|
+
const n = _(t.data, l.value.children, !1).filter((a) => a[l.value.children] && a[l.value.children].length).map((a) => a[t.nodeKey]);
|
|
47
47
|
J(() => {
|
|
48
48
|
var a;
|
|
49
49
|
(a = d.value) == null || a.setExpandedKeys(n);
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
-
|
|
53
|
+
g(
|
|
54
|
+
() => t.defaultExpandAll,
|
|
55
|
+
(e) => {
|
|
56
|
+
e && N();
|
|
57
|
+
},
|
|
58
|
+
{ immediate: !0 }
|
|
59
|
+
), g(
|
|
54
60
|
() => t.data,
|
|
55
61
|
(e, n) => {
|
|
56
62
|
if (!t.defaultExpandAll) return;
|
|
57
|
-
const a = e && e.length ? e : [], u = n && n.length ? n : [], R =
|
|
58
|
-
u.length && JSON.stringify(R) === JSON.stringify(
|
|
59
|
-
}
|
|
60
|
-
{ immediate: !0 }
|
|
63
|
+
const a = e && e.length ? e : [], u = n && n.length ? n : [], R = _(a).map((y) => y[t.nodeKey]), A = _(u).map((y) => y[t.nodeKey]);
|
|
64
|
+
u.length && JSON.stringify(R) === JSON.stringify(A) || N();
|
|
65
|
+
}
|
|
61
66
|
);
|
|
62
67
|
const m = i(!1);
|
|
63
|
-
|
|
68
|
+
g(
|
|
64
69
|
() => t.data,
|
|
65
70
|
(e) => {
|
|
66
71
|
if (e && e.length) {
|
|
@@ -73,28 +78,28 @@ const Y = /* @__PURE__ */ B({
|
|
|
73
78
|
},
|
|
74
79
|
{ immediate: !0, deep: !0 }
|
|
75
80
|
);
|
|
76
|
-
const
|
|
77
|
-
return
|
|
78
|
-
|
|
81
|
+
const E = i();
|
|
82
|
+
return O(() => {
|
|
83
|
+
E.value = X(
|
|
79
84
|
(e) => {
|
|
80
85
|
p.value = e.height;
|
|
81
86
|
},
|
|
82
87
|
o.value.parentElement
|
|
83
88
|
);
|
|
84
89
|
}), F(() => {
|
|
85
|
-
|
|
90
|
+
E.value.disconnect();
|
|
86
91
|
}), f({
|
|
87
92
|
treeRef: d
|
|
88
|
-
}), (e, n) => (r(),
|
|
93
|
+
}), (e, n) => (r(), v(
|
|
89
94
|
"div",
|
|
90
95
|
{
|
|
91
96
|
ref_key: "cotainerRef",
|
|
92
97
|
ref: o,
|
|
93
98
|
class: "das-ui-tree das-ui-virtual-tree",
|
|
94
|
-
style: M({ height:
|
|
99
|
+
style: M({ height: S.value })
|
|
95
100
|
},
|
|
96
101
|
[
|
|
97
|
-
e.data && e.data.length ? (r(),
|
|
102
|
+
e.data && e.data.length ? (r(), k(h(W), V({
|
|
98
103
|
key: 0,
|
|
99
104
|
ref_key: "treeRef",
|
|
100
105
|
ref: d,
|
|
@@ -104,13 +109,13 @@ const Y = /* @__PURE__ */ B({
|
|
|
104
109
|
props: l.value,
|
|
105
110
|
"show-checkbox": !1,
|
|
106
111
|
"expand-on-click-node": e.expandOnClickNode,
|
|
107
|
-
height:
|
|
112
|
+
height: w.value,
|
|
108
113
|
"item-size": 32,
|
|
109
114
|
"default-expand-all": "",
|
|
110
|
-
"filter-method":
|
|
111
|
-
"empty-text":
|
|
115
|
+
"filter-method": K.value,
|
|
116
|
+
"empty-text": C.value
|
|
112
117
|
}, e.$attrs), {
|
|
113
|
-
default:
|
|
118
|
+
default: x(({ node: a, data: u }) => [
|
|
114
119
|
T(e.$slots, "default", {
|
|
115
120
|
node: a,
|
|
116
121
|
data: u
|
|
@@ -126,21 +131,21 @@ const Y = /* @__PURE__ */ B({
|
|
|
126
131
|
]),
|
|
127
132
|
_: 3
|
|
128
133
|
/* FORWARDED */
|
|
129
|
-
}, 16, ["data", "class", "props", "expand-on-click-node", "height", "filter-method", "empty-text"])) : (r(),
|
|
130
|
-
|
|
134
|
+
}, 16, ["data", "class", "props", "expand-on-click-node", "height", "filter-method", "empty-text"])) : (r(), v(
|
|
135
|
+
b,
|
|
131
136
|
{ key: 1 },
|
|
132
137
|
[
|
|
133
|
-
|
|
134
|
-
e.loading ? (r(),
|
|
135
|
-
|
|
138
|
+
B(" 空状态 "),
|
|
139
|
+
e.loading ? (r(), v(
|
|
140
|
+
b,
|
|
136
141
|
{ key: 1 },
|
|
137
142
|
[
|
|
138
|
-
|
|
143
|
+
B(" 加载状态 "),
|
|
139
144
|
L(h(G), {
|
|
140
145
|
size: "small",
|
|
141
146
|
spinning: e.loading
|
|
142
147
|
}, {
|
|
143
|
-
default:
|
|
148
|
+
default: x(() => n[0] || (n[0] = [
|
|
144
149
|
D(
|
|
145
150
|
"div",
|
|
146
151
|
{ style: { width: "100%", height: "100%" } },
|
|
@@ -155,16 +160,16 @@ const Y = /* @__PURE__ */ B({
|
|
|
155
160
|
],
|
|
156
161
|
2112
|
|
157
162
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
158
|
-
)) : (r(),
|
|
163
|
+
)) : (r(), k(h(q), {
|
|
159
164
|
key: 0,
|
|
160
|
-
"empty-text":
|
|
165
|
+
"empty-text": C.value
|
|
161
166
|
}, H({
|
|
162
167
|
_: 2
|
|
163
168
|
/* DYNAMIC */
|
|
164
169
|
}, [
|
|
165
170
|
e.$slots["empty-text"] ? {
|
|
166
171
|
name: "default",
|
|
167
|
-
fn:
|
|
172
|
+
fn: x(() => [
|
|
168
173
|
T(e.$slots, "empty-text")
|
|
169
174
|
]),
|
|
170
175
|
key: "0"
|
|
Binary file
|
|
@@ -3957,6 +3957,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<Pr
|
|
|
3957
3957
|
nodeKey: string;
|
|
3958
3958
|
expandOnClickNode: boolean;
|
|
3959
3959
|
emptyText: string;
|
|
3960
|
+
defaultExpandAll: boolean;
|
|
3960
3961
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
3961
3962
|
default?(_: {
|
|
3962
3963
|
node: any;
|