@das-fed/upf-ui 6.4.0-dev.183 → 6.4.0-dev.185
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/front-end/i18n/front-end-page/dasui_en-US.js +4 -4
- package/front-end/i18n/front-end-page/dasui_zh-CN.js +4 -4
- package/front-end/i18n/front-end-page/dasui_zh-MO.js +4 -4
- package/package.json +5 -5
- package/packages/components/tree-select/index.js +180 -177
- package/packages/components/tree-select/index.js.gz +0 -0
- package/packages/components/tree-select/src/type.d.ts +3 -0
- package/packages/components/tree-v2/index.d.ts +2 -0
- package/packages/components/tree-v2/index.js +1498 -1457
- package/packages/components/tree-v2/index.js.gz +0 -0
- package/packages/components/tree-v2/src/type.d.ts +3 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@das-fed/upf-ui/packages/components/tree-select/style.css';
|
|
2
|
-
import { ref as P, computed as
|
|
2
|
+
import { ref as P, computed as y, watch as ve, nextTick as K, unref as l, onMounted as Ne, onBeforeUnmount as Pe, defineComponent as Ve, useAttrs as xe, withDirectives as he, openBlock as H, createElementBlock as ue, normalizeClass as Oe, normalizeStyle as me, createVNode as de, withCtx as j, withModifiers as fe, mergeProps as ce, isRef as U, createTextVNode as Be, toDisplayString as Re, createElementVNode as Me, createBlock as be, createSlots as ye, renderSlot as O } from "vue";
|
|
3
3
|
import { withInstall as Ee } from "@das-fed/upf-utils/with-install/index";
|
|
4
4
|
import { ElPopover as We } from "element-plus";
|
|
5
5
|
import "element-plus/es/components/popover/style/css";
|
|
@@ -21,8 +21,8 @@ function Ke(e) {
|
|
|
21
21
|
var i = typeof e;
|
|
22
22
|
return e != null && (i == "object" || i == "function");
|
|
23
23
|
}
|
|
24
|
-
var $e = Ke, _e = typeof _ == "object" && _ && _.Object === Object && _, et = _e, tt = et,
|
|
25
|
-
return
|
|
24
|
+
var $e = Ke, _e = typeof _ == "object" && _ && _.Object === Object && _, et = _e, tt = et, at = typeof self == "object" && self && self.Object === Object && self, lt = tt || at || Function("return this")(), Le = lt, rt = Le, nt = function() {
|
|
25
|
+
return rt.Date.now();
|
|
26
26
|
}, ot = nt, it = /\s/;
|
|
27
27
|
function st(e) {
|
|
28
28
|
for (var i = e.length; i-- && it.test(e.charAt(i)); )
|
|
@@ -33,18 +33,18 @@ var ut = st, dt = ut, ft = /^\s+/;
|
|
|
33
33
|
function ct(e) {
|
|
34
34
|
return e && e.slice(0, dt(e) + 1).replace(ft, "");
|
|
35
35
|
}
|
|
36
|
-
var pt = ct, vt = Le, ht = vt.Symbol, De = ht, ge = De, je = Object.prototype, mt = je.hasOwnProperty,
|
|
37
|
-
function
|
|
36
|
+
var pt = ct, vt = Le, ht = vt.Symbol, De = ht, ge = De, je = Object.prototype, mt = je.hasOwnProperty, bt = je.toString, q = ge ? ge.toStringTag : void 0;
|
|
37
|
+
function yt(e) {
|
|
38
38
|
var i = mt.call(e, q), c = e[q];
|
|
39
39
|
try {
|
|
40
40
|
e[q] = void 0;
|
|
41
|
-
var
|
|
41
|
+
var d = !0;
|
|
42
42
|
} catch {
|
|
43
43
|
}
|
|
44
|
-
var g =
|
|
45
|
-
return
|
|
44
|
+
var g = bt.call(e);
|
|
45
|
+
return d && (i ? e[q] = c : delete e[q]), g;
|
|
46
46
|
}
|
|
47
|
-
var gt =
|
|
47
|
+
var gt = yt, kt = Object.prototype, St = kt.toString;
|
|
48
48
|
function Tt(e) {
|
|
49
49
|
return St.call(e);
|
|
50
50
|
}
|
|
@@ -78,16 +78,16 @@ function At(e) {
|
|
|
78
78
|
}
|
|
79
79
|
var Ht = At, Ut = $e, pe = ot, we = Ht, qt = "Expected a function", Xt = Math.max, Jt = Math.min;
|
|
80
80
|
function Qt(e, i, c) {
|
|
81
|
-
var
|
|
81
|
+
var d, g, $, k, m, p, N = 0, w = !1, S = !1, B = !0;
|
|
82
82
|
if (typeof e != "function")
|
|
83
83
|
throw new TypeError(qt);
|
|
84
84
|
i = we(i) || 0, Ut(c) && (w = !!c.leading, S = "maxWait" in c, $ = S ? Xt(we(c.maxWait) || 0, i) : $, B = "trailing" in c ? !!c.trailing : B);
|
|
85
|
-
function
|
|
86
|
-
var L =
|
|
87
|
-
return
|
|
85
|
+
function b(s) {
|
|
86
|
+
var L = d, R = g;
|
|
87
|
+
return d = g = void 0, N = s, k = e.apply(R, L), k;
|
|
88
88
|
}
|
|
89
89
|
function T(s) {
|
|
90
|
-
return N = s, m = setTimeout(V, i), w ?
|
|
90
|
+
return N = s, m = setTimeout(V, i), w ? b(s) : k;
|
|
91
91
|
}
|
|
92
92
|
function E(s) {
|
|
93
93
|
var L = s - p, R = s - N, I = i - L;
|
|
@@ -104,93 +104,93 @@ function Qt(e, i, c) {
|
|
|
104
104
|
m = setTimeout(V, E(s));
|
|
105
105
|
}
|
|
106
106
|
function G(s) {
|
|
107
|
-
return m = void 0, B &&
|
|
107
|
+
return m = void 0, B && d ? b(s) : (d = g = void 0, k);
|
|
108
108
|
}
|
|
109
109
|
function M() {
|
|
110
|
-
m !== void 0 && clearTimeout(m), N = 0,
|
|
110
|
+
m !== void 0 && clearTimeout(m), N = 0, d = p = g = m = void 0;
|
|
111
111
|
}
|
|
112
112
|
function D() {
|
|
113
113
|
return m === void 0 ? k : G(pe());
|
|
114
114
|
}
|
|
115
115
|
function v() {
|
|
116
116
|
var s = pe(), L = u(s);
|
|
117
|
-
if (
|
|
117
|
+
if (d = arguments, g = this, p = s, L) {
|
|
118
118
|
if (m === void 0)
|
|
119
119
|
return T(p);
|
|
120
120
|
if (S)
|
|
121
|
-
return clearTimeout(m), m = setTimeout(V, i),
|
|
121
|
+
return clearTimeout(m), m = setTimeout(V, i), b(p);
|
|
122
122
|
}
|
|
123
123
|
return m === void 0 && (m = setTimeout(V, i)), k;
|
|
124
124
|
}
|
|
125
125
|
return v.cancel = M, v.flush = D, v;
|
|
126
126
|
}
|
|
127
127
|
var Yt = Qt;
|
|
128
|
-
const Zt = /* @__PURE__ */ Ze(Yt), Kt = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|%)$/.test(e), ee = (e) => typeof e == "string" && Kt(e) ? e : e + "px", _t = (e, i, c,
|
|
129
|
-
const k = P(null), m = P(null), p = Ae(), N = P(), w = P(!1), S = P(""), B = P(""),
|
|
128
|
+
const Zt = /* @__PURE__ */ Ze(Yt), Kt = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|%)$/.test(e), ee = (e) => typeof e == "string" && Kt(e) ? e : e + "px", _t = (e, i, c, d, g, $) => {
|
|
129
|
+
const k = P(null), m = P(null), p = Ae(), N = P(), w = P(!1), S = P(""), B = P(""), b = y(() => e.mode === "multiple" || e.mode === "tags"), T = y(() => ({ label: "name", children: "children", pathName: "pathName", disabled: "disabled", ...d.props ?? {} })), E = Fe.value === "zh-CN" ? "," : ", ", u = y({
|
|
130
130
|
get: () => e.modelValue ? e.modelValue : void 0,
|
|
131
131
|
set: (t) => {
|
|
132
132
|
i("update:modelValue", t);
|
|
133
133
|
}
|
|
134
|
-
}), V =
|
|
134
|
+
}), V = y({
|
|
135
135
|
get: () => e.keyword || "",
|
|
136
136
|
set: (t) => {
|
|
137
137
|
i("update:keyword", t);
|
|
138
138
|
}
|
|
139
|
-
}), G =
|
|
139
|
+
}), G = y({
|
|
140
140
|
get: () => e.path,
|
|
141
141
|
set: (t) => {
|
|
142
142
|
i("update:path", t);
|
|
143
143
|
}
|
|
144
144
|
}), M = (t, n, o = []) => {
|
|
145
|
-
for (let
|
|
146
|
-
const C = t[
|
|
145
|
+
for (let r = 0; r < t.length; r++) {
|
|
146
|
+
const C = t[r], x = C[T.value.label];
|
|
147
147
|
if (o.push(x), x === n) return o.join("/");
|
|
148
148
|
if (C.children && C.children.length > 0) {
|
|
149
|
-
const
|
|
150
|
-
if (
|
|
149
|
+
const a = M(C[T.value.children], n, o);
|
|
150
|
+
if (a) return a;
|
|
151
151
|
}
|
|
152
152
|
o.pop();
|
|
153
153
|
}
|
|
154
154
|
return null;
|
|
155
|
-
}, D =
|
|
155
|
+
}, D = y(() => {
|
|
156
156
|
var o;
|
|
157
157
|
let t = [], n = [];
|
|
158
|
-
return g.value ? n = ((o = p.value) == null ? void 0 : o.lazyData) || [] : e.data && (n = Je(e.data, T.value.children) || []), n.length && (t = n.map((
|
|
159
|
-
...
|
|
160
|
-
[T.value.pathName]:
|
|
158
|
+
return g.value ? n = ((o = p.value) == null ? void 0 : o.lazyData) || [] : e.data && (n = Je(e.data, T.value.children) || []), n.length && (t = n.map((r) => ({
|
|
159
|
+
...r,
|
|
160
|
+
[T.value.pathName]: r[T.value.pathName] ? r[T.value.pathName] : g.value ? r[T.value.label] : M(e.data, r[T.value.label])
|
|
161
161
|
}))), t;
|
|
162
162
|
}), v = P(""), s = P(!0), L = () => {
|
|
163
163
|
var t, n;
|
|
164
164
|
if (!e.showTextStrict || !g.value || e.parentLinkChildrenStrictly) return !0;
|
|
165
165
|
if (D.value.length === 0) return !1;
|
|
166
|
-
if (
|
|
166
|
+
if (b.value) {
|
|
167
167
|
if (!u.value || !((t = u.value) != null && t.length)) return !0;
|
|
168
|
-
const o = D.value.map((
|
|
169
|
-
return (n = u.value) == null ? void 0 : n.some((
|
|
168
|
+
const o = D.value.map((r) => r[c.value]);
|
|
169
|
+
return (n = u.value) == null ? void 0 : n.some((r) => o.includes(r));
|
|
170
170
|
} else
|
|
171
|
-
return u.value ? !!D.value.find((
|
|
171
|
+
return u.value ? !!D.value.find((r) => r[c.value] === u.value) : !0;
|
|
172
172
|
};
|
|
173
173
|
ve(
|
|
174
174
|
() => [D.value, u.value],
|
|
175
175
|
([t, n]) => {
|
|
176
176
|
if (s.value = !L(), !s.value)
|
|
177
|
-
if (
|
|
177
|
+
if (b.value)
|
|
178
178
|
if (!n || !(n != null && n.length))
|
|
179
179
|
v.value = "";
|
|
180
180
|
else {
|
|
181
|
-
const o = t == null ? void 0 : t.filter((
|
|
182
|
-
o != null && o.length ? v.value = o.map((
|
|
181
|
+
const o = t == null ? void 0 : t.filter((r) => n.includes(r[c.value]));
|
|
182
|
+
o != null && o.length ? v.value = o.map((r) => e.showFullPath ? r[T.value.pathName] : r[T.value.label]).join(E) : v.value = "";
|
|
183
183
|
}
|
|
184
184
|
else if (!n)
|
|
185
185
|
v.value = "";
|
|
186
186
|
else {
|
|
187
|
-
const o = t == null ? void 0 : t.find((
|
|
187
|
+
const o = t == null ? void 0 : t.find((r) => r[c.value] === n);
|
|
188
188
|
o ? v.value = e.showFullPath ? o[T.value.pathName] : o[T.value.label] : v.value = "";
|
|
189
189
|
}
|
|
190
190
|
},
|
|
191
191
|
{ immediate: !0 }
|
|
192
192
|
);
|
|
193
|
-
const R =
|
|
193
|
+
const R = y(() => ({
|
|
194
194
|
height: e.poppverHeight ? ee(e.poppverHeight) : void 0,
|
|
195
195
|
maxHeight: e.poppverMaxHeight ? ee(e.poppverMaxHeight) : void 0
|
|
196
196
|
})), I = () => {
|
|
@@ -204,35 +204,35 @@ const Zt = /* @__PURE__ */ Ze(Yt), Kt = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
204
204
|
var n, o;
|
|
205
205
|
await K();
|
|
206
206
|
let t = [];
|
|
207
|
-
|
|
207
|
+
b.value || (u.value || u.value === 0) && (g.value && await ((n = p.value) == null ? void 0 : n.lazyDataNextTick(u.value)), t = D.value.filter((r) => r[c.value] === u.value)), b.value && (u.value || u.value.length) && (g.value && await ((o = p.value) == null ? void 0 : o.lazyDataNextTick(u.value)), t = D.value.filter((r) => u.value.includes(r[c.value]))), i("change", u.value, t);
|
|
208
208
|
}, W = P(!1), te = async () => {
|
|
209
|
-
w.value = !1, u.value =
|
|
210
|
-
},
|
|
211
|
-
var n, o,
|
|
212
|
-
if (!W.value &&
|
|
209
|
+
w.value = !1, u.value = b.value ? [] : "", z(), W.value = !0;
|
|
210
|
+
}, ae = async (t) => {
|
|
211
|
+
var n, o, r, C, x, a;
|
|
212
|
+
if (!W.value && b.value) {
|
|
213
213
|
if (!g.value && !$.value) {
|
|
214
|
-
let
|
|
215
|
-
|
|
214
|
+
let f = (o = (n = p.value) == null ? void 0 : n.treeRef) == null ? void 0 : o.getNode(t);
|
|
215
|
+
f.checked = !1, (r = p.value) == null || r.childLinkParent(f, f.checked), (C = p.value) == null || C.parentLinkChild(f, f.checked);
|
|
216
216
|
}
|
|
217
217
|
if (g.value && e.parentLinkChildrenStrictly) {
|
|
218
|
-
let
|
|
219
|
-
if (
|
|
220
|
-
const h = await p.value.getGrandChildrenFn(
|
|
218
|
+
let f = D.value.find((h) => h[c.value] === t);
|
|
219
|
+
if (f && ((x = p.value) != null && x.getGrandChildrenFn)) {
|
|
220
|
+
const h = await p.value.getGrandChildrenFn(f);
|
|
221
221
|
if (h && h.length) {
|
|
222
222
|
const A = h.map((se) => se[c.value]);
|
|
223
|
-
u.value && ((
|
|
223
|
+
u.value && ((a = u.value) != null && a.length) && (u.value = u.value.filter((se) => !A.includes(se)));
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
z();
|
|
228
228
|
}
|
|
229
|
-
},
|
|
229
|
+
}, le = (t) => {
|
|
230
230
|
if (!e.filter) return;
|
|
231
231
|
const n = t && (t == null ? void 0 : t.trim());
|
|
232
232
|
V.value = n, w.value || (w.value = !0);
|
|
233
|
-
},
|
|
233
|
+
}, re = () => {
|
|
234
234
|
var t, n;
|
|
235
|
-
|
|
235
|
+
b.value || (w.value = !1, e.filter && ((n = (t = m.value) == null ? void 0 : t.$select) == null || n.focus()));
|
|
236
236
|
}, Q = () => k != null && k.value && k.value.offsetWidth ? k.value.offsetWidth + "px" : "100%", Y = () => {
|
|
237
237
|
K(() => {
|
|
238
238
|
S.value = e.width ? ee(e.width) : Q(), B.value = e.poppverWidth ? ee(e.poppverWidth) : Q();
|
|
@@ -246,18 +246,18 @@ const Zt = /* @__PURE__ */ Ze(Yt), Kt = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
246
246
|
ve(
|
|
247
247
|
() => w.value,
|
|
248
248
|
(t) => {
|
|
249
|
-
var o,
|
|
249
|
+
var o, r;
|
|
250
250
|
const n = (o = k.value) == null ? void 0 : o.querySelector(".ant-select-arrow>.das-icon");
|
|
251
|
-
t ? n.style.transform = "rotate(180deg)" : n.style.transform = "", (
|
|
252
|
-
var C, x,
|
|
253
|
-
(
|
|
251
|
+
t ? n.style.transform = "rotate(180deg)" : n.style.transform = "", (r = m.value) == null || r.toChangeMaxCount(t), K(() => {
|
|
252
|
+
var C, x, a;
|
|
253
|
+
(a = (x = (C = l(N)) == null ? void 0 : C.popperRef) == null ? void 0 : x.popperInstanceRef) == null || a.update();
|
|
254
254
|
});
|
|
255
255
|
}
|
|
256
256
|
);
|
|
257
257
|
const F = P(null), oe = () => new Promise((t) => {
|
|
258
258
|
const n = () => {
|
|
259
|
-
var
|
|
260
|
-
const o = (
|
|
259
|
+
var r;
|
|
260
|
+
const o = (r = k.value) == null ? void 0 : r.querySelector(".ant-select-selector");
|
|
261
261
|
if (o) return t(o);
|
|
262
262
|
setTimeout(() => n(), 50);
|
|
263
263
|
};
|
|
@@ -270,8 +270,8 @@ const Zt = /* @__PURE__ */ Ze(Yt), Kt = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
270
270
|
const t = await oe();
|
|
271
271
|
t && (F.value = Xe((n) => {
|
|
272
272
|
K(() => {
|
|
273
|
-
var o,
|
|
274
|
-
(C = (
|
|
273
|
+
var o, r, C;
|
|
274
|
+
(C = (r = (o = l(N)) == null ? void 0 : o.popperRef) == null ? void 0 : r.popperInstanceRef) == null || C.update(), Y();
|
|
275
275
|
});
|
|
276
276
|
}, t));
|
|
277
277
|
}), Pe(() => {
|
|
@@ -294,9 +294,9 @@ const Zt = /* @__PURE__ */ Ze(Yt), Kt = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
294
294
|
poppverShow: I,
|
|
295
295
|
poppverHide: X,
|
|
296
296
|
treeChange: z,
|
|
297
|
-
nodeChange:
|
|
298
|
-
deselect:
|
|
299
|
-
selectSearch:
|
|
297
|
+
nodeChange: re,
|
|
298
|
+
deselect: ae,
|
|
299
|
+
selectSearch: le,
|
|
300
300
|
selectClear: te,
|
|
301
301
|
popoverVisible: w,
|
|
302
302
|
selectMouseDown: J,
|
|
@@ -305,16 +305,16 @@ const Zt = /* @__PURE__ */ Ze(Yt), Kt = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
305
305
|
blur: Z,
|
|
306
306
|
checkselectOptionsData: L,
|
|
307
307
|
textHide: s,
|
|
308
|
-
showCheckbox:
|
|
308
|
+
showCheckbox: b
|
|
309
309
|
};
|
|
310
|
-
},
|
|
310
|
+
}, ea = {
|
|
311
311
|
key: 1,
|
|
312
312
|
class: "das-tree-select__selct-text-content"
|
|
313
|
-
},
|
|
313
|
+
}, ta = {
|
|
314
314
|
name: "DasTreeSelect",
|
|
315
315
|
inheritAttrs: !1
|
|
316
|
-
},
|
|
317
|
-
...
|
|
316
|
+
}, aa = /* @__PURE__ */ Ve({
|
|
317
|
+
...ta,
|
|
318
318
|
props: {
|
|
319
319
|
data: { default: () => [] },
|
|
320
320
|
mode: { default: void 0 },
|
|
@@ -340,6 +340,7 @@ const Zt = /* @__PURE__ */ Ze(Yt), Kt = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
340
340
|
checkStrictly: { type: Boolean, default: void 0 },
|
|
341
341
|
path: {},
|
|
342
342
|
load: {},
|
|
343
|
+
batchLoad: {},
|
|
343
344
|
search: {},
|
|
344
345
|
parentLinkChildrenStrictly: { type: Boolean },
|
|
345
346
|
getGrandChildren: {},
|
|
@@ -349,12 +350,12 @@ const Zt = /* @__PURE__ */ Ze(Yt), Kt = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
349
350
|
},
|
|
350
351
|
emits: ["update:modelValue", "update:path", "update:keyword", "change", "focus", "blur", "visible-change"],
|
|
351
352
|
setup(e, { expose: i, emit: c }) {
|
|
352
|
-
const
|
|
353
|
+
const d = e, g = c, $ = xe(), k = y(() => d.placeholder || Ge("请选择")), m = y(() => $.nodeKey ?? $["node-key"] ?? "id"), p = y(() => d.load ?? void 0), N = y(() => d.search ?? void 0), w = y(() => d.getGrandChildren ?? void 0), S = y(() => $.lazy ?? !!p.value), B = y(() => S.value ? !1 : d.defaultExpandAll), b = y(() => d.selectAttrs ? d.selectAttrs : {}), T = y(() => !!(d.disabled || d.isView)), E = y(() => d.parentLinkChildrenStrictly || d.childLinkParentStrictly ? !0 : !!(d.checkStrictly ?? S.value)), u = {
|
|
353
354
|
fn: () => {
|
|
354
355
|
F.value = !1;
|
|
355
356
|
}
|
|
356
|
-
}, V = (
|
|
357
|
-
|
|
357
|
+
}, V = (a) => {
|
|
358
|
+
a.key === "Enter" && a.stopPropagation();
|
|
358
359
|
}, {
|
|
359
360
|
dasTreeSelectRef: G,
|
|
360
361
|
$tree: M,
|
|
@@ -369,9 +370,9 @@ const Zt = /* @__PURE__ */ Ze(Yt), Kt = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
369
370
|
treePath: z,
|
|
370
371
|
treeProps: W,
|
|
371
372
|
selectOptions: te,
|
|
372
|
-
currentLabel:
|
|
373
|
-
popoverRef:
|
|
374
|
-
deselect:
|
|
373
|
+
currentLabel: ae,
|
|
374
|
+
popoverRef: le,
|
|
375
|
+
deselect: re,
|
|
375
376
|
poppverShow: Q,
|
|
376
377
|
poppverHide: Y,
|
|
377
378
|
selectSearch: ne,
|
|
@@ -382,9 +383,9 @@ const Zt = /* @__PURE__ */ Ze(Yt), Kt = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
382
383
|
focus: t,
|
|
383
384
|
blur: n,
|
|
384
385
|
textHide: o,
|
|
385
|
-
checkselectOptionsData:
|
|
386
|
+
checkselectOptionsData: r,
|
|
386
387
|
showCheckbox: C
|
|
387
|
-
} = _t(
|
|
388
|
+
} = _t(d, g, m, $, S, E), x = y(() => b.value.isTooltip ? b.value.isTooltip && r() : b.value["is-tooltip"] ? b.value["is-tooltip"] && r() : r());
|
|
388
389
|
return i({
|
|
389
390
|
/** das-select */
|
|
390
391
|
$select: D,
|
|
@@ -392,236 +393,238 @@ const Zt = /* @__PURE__ */ Ze(Yt), Kt = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
392
393
|
$tree: M,
|
|
393
394
|
/** 设置默认值,当默认值为动态设置时使用(兼容老版本) */
|
|
394
395
|
resetDefaultVal: oe
|
|
395
|
-
}), (
|
|
396
|
+
}), (a, f) => he((H(), ue("div", {
|
|
396
397
|
ref_key: "dasTreeSelectRef",
|
|
397
398
|
ref: G,
|
|
398
|
-
class: Oe({ "das-ui-tree-select": !0, "is-lazy": S.value, "text-hide":
|
|
399
|
-
style: me({ width:
|
|
399
|
+
class: Oe({ "das-ui-tree-select": !0, "is-lazy": S.value, "text-hide": l(o), "show-select": a.showSelectDom }),
|
|
400
|
+
style: me({ width: l(L) })
|
|
400
401
|
}, [
|
|
401
|
-
de(
|
|
402
|
+
de(l(We), {
|
|
402
403
|
ref_key: "popoverRef",
|
|
403
|
-
ref:
|
|
404
|
-
visible:
|
|
404
|
+
ref: le,
|
|
405
|
+
visible: l(F),
|
|
405
406
|
"popper-class": "das-tree-select-popper",
|
|
406
407
|
placement: "bottom-start",
|
|
407
408
|
"show-arrow": !1,
|
|
408
|
-
width:
|
|
409
|
+
width: l(I),
|
|
409
410
|
disabled: T.value,
|
|
410
411
|
"fallback-placements": ["bottom", "top", "right", "left"],
|
|
411
|
-
onShow:
|
|
412
|
-
onHide:
|
|
412
|
+
onShow: l(Q),
|
|
413
|
+
onHide: l(Y)
|
|
413
414
|
}, {
|
|
414
415
|
reference: j(() => [
|
|
415
|
-
|
|
416
|
+
a.showSelectDom ? (H(), ue("div", {
|
|
416
417
|
key: 0,
|
|
417
418
|
class: "das-tree-select__select-content",
|
|
418
|
-
onMousedown:
|
|
419
|
+
onMousedown: f[1] || (f[1] = fe(
|
|
419
420
|
//@ts-ignore
|
|
420
|
-
(...h) =>
|
|
421
|
+
(...h) => l(Z) && l(Z)(...h),
|
|
421
422
|
["stop"]
|
|
422
423
|
))
|
|
423
424
|
}, [
|
|
424
|
-
de(
|
|
425
|
+
de(l(Ie), ce({
|
|
425
426
|
ref_key: "$select",
|
|
426
427
|
ref: D,
|
|
427
|
-
class: { "is-active":
|
|
428
|
+
class: { "is-active": l(F) },
|
|
428
429
|
dropdownClassName: "das-tree-select-dropdown",
|
|
429
|
-
modelValue:
|
|
430
|
-
"onUpdate:modelValue":
|
|
431
|
-
},
|
|
432
|
-
searchValue:
|
|
433
|
-
options:
|
|
434
|
-
disabled:
|
|
435
|
-
isView:
|
|
436
|
-
size:
|
|
437
|
-
mode:
|
|
438
|
-
borderType:
|
|
430
|
+
modelValue: l(v),
|
|
431
|
+
"onUpdate:modelValue": f[0] || (f[0] = (h) => U(v) ? v.value = h : null)
|
|
432
|
+
}, b.value, {
|
|
433
|
+
searchValue: l(s),
|
|
434
|
+
options: l(te),
|
|
435
|
+
disabled: a.disabled,
|
|
436
|
+
isView: a.isView,
|
|
437
|
+
size: a.size,
|
|
438
|
+
mode: a.mode,
|
|
439
|
+
borderType: a.borderType,
|
|
439
440
|
placeholder: k.value,
|
|
440
|
-
"show-search":
|
|
441
|
-
filterOption:
|
|
442
|
-
width:
|
|
441
|
+
"show-search": a.filter,
|
|
442
|
+
filterOption: a.filter,
|
|
443
|
+
width: l(L),
|
|
443
444
|
fieldNames: {
|
|
444
445
|
value: m.value,
|
|
445
|
-
label:
|
|
446
|
+
label: a.showFullPath ? l(W).pathName : l(W).label
|
|
446
447
|
},
|
|
447
448
|
isTooltip: x.value,
|
|
448
|
-
errorMode:
|
|
449
|
-
error:
|
|
450
|
-
errorLabel:
|
|
449
|
+
errorMode: a.errorMode,
|
|
450
|
+
error: a.error,
|
|
451
|
+
errorLabel: a.errorLabel,
|
|
451
452
|
autoClearSearchValue: !1,
|
|
452
453
|
isExterControlCount: "",
|
|
453
|
-
onDeselect:
|
|
454
|
-
onSearch:
|
|
454
|
+
onDeselect: l(re),
|
|
455
|
+
onSearch: l(ne),
|
|
455
456
|
onInputKeyDown: V,
|
|
456
|
-
onFocus:
|
|
457
|
-
onBlur:
|
|
458
|
-
onClear:
|
|
457
|
+
onFocus: l(t),
|
|
458
|
+
onBlur: l(n),
|
|
459
|
+
onClear: l(ie)
|
|
459
460
|
}), {
|
|
460
461
|
suffixIcon: j(() => [
|
|
461
|
-
de(
|
|
462
|
+
de(l(Ue), {
|
|
462
463
|
size: "medium",
|
|
463
464
|
style: { transition: "transform 0.5s" },
|
|
464
|
-
iconColor:
|
|
465
|
+
iconColor: l(F) ? "#5582F3" : "currentColor"
|
|
465
466
|
}, null, 8, ["iconColor"])
|
|
466
467
|
]),
|
|
467
468
|
_: 1
|
|
468
469
|
}, 16, ["class", "modelValue", "searchValue", "options", "disabled", "isView", "size", "mode", "borderType", "placeholder", "show-search", "filterOption", "width", "fieldNames", "isTooltip", "errorMode", "error", "errorLabel", "onDeselect", "onSearch", "onFocus", "onBlur", "onClear"])
|
|
469
|
-
], 32)) : he((H(), ue("div",
|
|
470
|
-
Be(Re(
|
|
470
|
+
], 32)) : he((H(), ue("div", ea, [
|
|
471
|
+
Be(Re(l(ae)), 1)
|
|
471
472
|
])), [
|
|
472
|
-
[
|
|
473
|
+
[l(qe)]
|
|
473
474
|
])
|
|
474
475
|
]),
|
|
475
476
|
default: j(() => [
|
|
476
477
|
Me("div", {
|
|
477
478
|
class: "das-tree-select__tree-content",
|
|
478
|
-
style: me(
|
|
479
|
-
onClick:
|
|
479
|
+
style: me(l(R)),
|
|
480
|
+
onClick: f[6] || (f[6] = fe(() => {
|
|
480
481
|
}, ["stop"])),
|
|
481
|
-
onMousedown:
|
|
482
|
+
onMousedown: f[7] || (f[7] = fe(() => {
|
|
482
483
|
}, ["stop"]))
|
|
483
484
|
}, [
|
|
484
|
-
|
|
485
|
+
a.virtual ? (H(), be(l(ze), ce({
|
|
485
486
|
key: 1,
|
|
486
487
|
ref_key: "$tree",
|
|
487
488
|
ref: M
|
|
488
|
-
},
|
|
489
|
-
data:
|
|
490
|
-
modelValue:
|
|
491
|
-
"onUpdate:modelValue":
|
|
492
|
-
"filter-value":
|
|
493
|
-
"onUpdate:filterValue":
|
|
494
|
-
"show-checkbox":
|
|
495
|
-
"is-filter":
|
|
489
|
+
}, l($), {
|
|
490
|
+
data: a.data,
|
|
491
|
+
modelValue: l(v),
|
|
492
|
+
"onUpdate:modelValue": f[4] || (f[4] = (h) => U(v) ? v.value = h : null),
|
|
493
|
+
"filter-value": l(s),
|
|
494
|
+
"onUpdate:filterValue": f[5] || (f[5] = (h) => U(s) ? s.value = h : null),
|
|
495
|
+
"show-checkbox": l(C),
|
|
496
|
+
"is-filter": a.filter,
|
|
496
497
|
"show-filter-input": !1,
|
|
497
498
|
"filter-mode": "input",
|
|
498
499
|
lazy: S.value,
|
|
499
500
|
load: p.value,
|
|
501
|
+
"batch-load": d.batchLoad,
|
|
500
502
|
search: N.value,
|
|
501
|
-
path:
|
|
503
|
+
path: l(z),
|
|
502
504
|
"default-expand-all": B.value,
|
|
503
505
|
"check-strictly": S.value ? !0 : E.value,
|
|
504
|
-
parentLinkChildrenStrictly:
|
|
506
|
+
parentLinkChildrenStrictly: a.parentLinkChildrenStrictly,
|
|
505
507
|
getGrandChildren: w.value,
|
|
506
|
-
childLinkParentStrictly:
|
|
507
|
-
onChange:
|
|
508
|
-
onNodeChange:
|
|
509
|
-
}),
|
|
508
|
+
childLinkParentStrictly: a.childLinkParentStrictly,
|
|
509
|
+
onChange: l(X),
|
|
510
|
+
onNodeChange: l(J)
|
|
511
|
+
}), ye({
|
|
510
512
|
default: j(({ node: h, data: A }) => [
|
|
511
|
-
O(
|
|
513
|
+
O(a.$slots, "default", {
|
|
512
514
|
node: h,
|
|
513
515
|
data: A
|
|
514
516
|
})
|
|
515
517
|
]),
|
|
516
518
|
_: 2
|
|
517
519
|
}, [
|
|
518
|
-
|
|
520
|
+
a.$slots.prefix ? {
|
|
519
521
|
name: "prefix",
|
|
520
522
|
fn: j(() => [
|
|
521
|
-
O(
|
|
523
|
+
O(a.$slots, "prefix")
|
|
522
524
|
]),
|
|
523
525
|
key: "0"
|
|
524
526
|
} : void 0,
|
|
525
|
-
|
|
527
|
+
a.$slots.suffix ? {
|
|
526
528
|
name: "suffix",
|
|
527
529
|
fn: j(() => [
|
|
528
|
-
O(
|
|
530
|
+
O(a.$slots, "suffix")
|
|
529
531
|
]),
|
|
530
532
|
key: "1"
|
|
531
533
|
} : void 0,
|
|
532
|
-
|
|
534
|
+
a.$slots.prepend ? {
|
|
533
535
|
name: "prepend",
|
|
534
536
|
fn: j(() => [
|
|
535
|
-
O(
|
|
537
|
+
O(a.$slots, "prepend")
|
|
536
538
|
]),
|
|
537
539
|
key: "2"
|
|
538
540
|
} : void 0,
|
|
539
|
-
|
|
541
|
+
a.$slots.append ? {
|
|
540
542
|
name: "append",
|
|
541
543
|
fn: j(() => [
|
|
542
|
-
O(
|
|
544
|
+
O(a.$slots, "append")
|
|
543
545
|
]),
|
|
544
546
|
key: "3"
|
|
545
547
|
} : void 0
|
|
546
|
-
]), 1040, ["data", "modelValue", "filter-value", "show-checkbox", "is-filter", "lazy", "load", "search", "path", "default-expand-all", "check-strictly", "parentLinkChildrenStrictly", "getGrandChildren", "childLinkParentStrictly", "onChange", "onNodeChange"])) : (H(),
|
|
548
|
+
]), 1040, ["data", "modelValue", "filter-value", "show-checkbox", "is-filter", "lazy", "load", "batch-load", "search", "path", "default-expand-all", "check-strictly", "parentLinkChildrenStrictly", "getGrandChildren", "childLinkParentStrictly", "onChange", "onNodeChange"])) : (H(), be(l(He), ce({
|
|
547
549
|
key: 0,
|
|
548
550
|
ref_key: "$tree",
|
|
549
551
|
ref: M
|
|
550
|
-
},
|
|
551
|
-
data:
|
|
552
|
-
modelValue:
|
|
553
|
-
"onUpdate:modelValue":
|
|
554
|
-
"filter-value":
|
|
555
|
-
"onUpdate:filterValue":
|
|
556
|
-
"show-checkbox":
|
|
557
|
-
"is-filter":
|
|
552
|
+
}, l($), {
|
|
553
|
+
data: a.data,
|
|
554
|
+
modelValue: l(v),
|
|
555
|
+
"onUpdate:modelValue": f[2] || (f[2] = (h) => U(v) ? v.value = h : null),
|
|
556
|
+
"filter-value": l(s),
|
|
557
|
+
"onUpdate:filterValue": f[3] || (f[3] = (h) => U(s) ? s.value = h : null),
|
|
558
|
+
"show-checkbox": l(C),
|
|
559
|
+
"is-filter": a.filter,
|
|
558
560
|
"show-filter-input": !1,
|
|
559
561
|
"filter-mode": "input",
|
|
560
562
|
lazy: S.value,
|
|
561
563
|
load: p.value,
|
|
564
|
+
"batch-load": d.batchLoad,
|
|
562
565
|
search: N.value,
|
|
563
|
-
path:
|
|
566
|
+
path: l(z),
|
|
564
567
|
"default-expand-all": B.value,
|
|
565
568
|
"check-strictly": S.value ? !0 : E.value,
|
|
566
|
-
parentLinkChildrenStrictly:
|
|
569
|
+
parentLinkChildrenStrictly: a.parentLinkChildrenStrictly,
|
|
567
570
|
getGrandChildren: w.value,
|
|
568
|
-
childLinkParentStrictly:
|
|
569
|
-
onChange:
|
|
570
|
-
onNodeChange:
|
|
571
|
-
}),
|
|
571
|
+
childLinkParentStrictly: a.childLinkParentStrictly,
|
|
572
|
+
onChange: l(X),
|
|
573
|
+
onNodeChange: l(J)
|
|
574
|
+
}), ye({
|
|
572
575
|
default: j(({ node: h, data: A }) => [
|
|
573
|
-
O(
|
|
576
|
+
O(a.$slots, "default", {
|
|
574
577
|
node: h,
|
|
575
578
|
data: A
|
|
576
579
|
})
|
|
577
580
|
]),
|
|
578
581
|
_: 2
|
|
579
582
|
}, [
|
|
580
|
-
|
|
583
|
+
a.$slots.prefix ? {
|
|
581
584
|
name: "prefix",
|
|
582
585
|
fn: j(() => [
|
|
583
|
-
O(
|
|
586
|
+
O(a.$slots, "prefix")
|
|
584
587
|
]),
|
|
585
588
|
key: "0"
|
|
586
589
|
} : void 0,
|
|
587
|
-
|
|
590
|
+
a.$slots.suffix ? {
|
|
588
591
|
name: "suffix",
|
|
589
592
|
fn: j(() => [
|
|
590
|
-
O(
|
|
593
|
+
O(a.$slots, "suffix")
|
|
591
594
|
]),
|
|
592
595
|
key: "1"
|
|
593
596
|
} : void 0,
|
|
594
|
-
|
|
597
|
+
a.$slots.prepend ? {
|
|
595
598
|
name: "prepend",
|
|
596
599
|
fn: j(() => [
|
|
597
|
-
O(
|
|
600
|
+
O(a.$slots, "prepend")
|
|
598
601
|
]),
|
|
599
602
|
key: "2"
|
|
600
603
|
} : void 0,
|
|
601
|
-
|
|
604
|
+
a.$slots.append ? {
|
|
602
605
|
name: "append",
|
|
603
606
|
fn: j(() => [
|
|
604
|
-
O(
|
|
607
|
+
O(a.$slots, "append")
|
|
605
608
|
]),
|
|
606
609
|
key: "3"
|
|
607
610
|
} : void 0
|
|
608
|
-
]), 1040, ["data", "modelValue", "filter-value", "show-checkbox", "is-filter", "lazy", "load", "search", "path", "default-expand-all", "check-strictly", "parentLinkChildrenStrictly", "getGrandChildren", "childLinkParentStrictly", "onChange", "onNodeChange"]))
|
|
611
|
+
]), 1040, ["data", "modelValue", "filter-value", "show-checkbox", "is-filter", "lazy", "load", "batch-load", "search", "path", "default-expand-all", "check-strictly", "parentLinkChildrenStrictly", "getGrandChildren", "childLinkParentStrictly", "onChange", "onNodeChange"]))
|
|
609
612
|
], 36)
|
|
610
613
|
]),
|
|
611
614
|
_: 3
|
|
612
615
|
}, 8, ["visible", "width", "disabled", "onShow", "onHide"])
|
|
613
616
|
], 6)), [
|
|
614
|
-
[
|
|
617
|
+
[l(Qe), u]
|
|
615
618
|
]);
|
|
616
619
|
}
|
|
617
|
-
}),
|
|
620
|
+
}), la = {
|
|
618
621
|
"--das-ui-tree-select-keyword-input-active": "#5582F3",
|
|
619
622
|
"--das-ui-tree-select-search-no-data": "#999999"
|
|
620
623
|
};
|
|
621
|
-
Ye(
|
|
622
|
-
const
|
|
624
|
+
Ye(la);
|
|
625
|
+
const ya = Ee(aa), ga = () => P(null), ka = { title: "tree-select 树选择" };
|
|
623
626
|
export {
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
+
ya as DasTreeSelect,
|
|
628
|
+
ga as DasTreeSelectRef,
|
|
629
|
+
ka as default
|
|
627
630
|
};
|