@das-fed/ui 6.4.0-dev.55.22 → 6.4.0-dev.55.24
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 -5
- package/packages/business-components/device-panel/index.js +28 -28
- package/packages/business-components/device-panel/index.js.gz +0 -0
- 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/import-button/index.js +1 -1
- package/packages/business-components/import-button/index.js.gz +0 -0
- package/packages/business-components/process-configuration/i18n/index.d.ts +5 -0
- package/packages/business-components/process-configuration/index.js +2 -1
- package/packages/business-components/process-configuration/index.js.gz +0 -0
- package/packages/business-components/process-configuration/src/hooks/useDeleteDialog.d.ts +2 -3
- package/packages/components/autocomplete/index.d.ts +13 -4
- package/packages/components/autocomplete/index.js +158 -139
- package/packages/components/autocomplete/index.js.gz +0 -0
- package/packages/components/autocomplete/src/index.vue.d.ts +2 -1
- package/packages/components/autocomplete/src/type.d.ts +4 -1
- package/packages/components/autocomplete/style.css +1 -1
- package/packages/components/autocomplete/style.css.gz +0 -0
- package/packages/components/edit-table/index.d.ts +9 -9
- package/packages/components/edit-table/index.js +2004 -1640
- package/packages/components/edit-table/index.js.gz +0 -0
- package/packages/components/edit-table/src/hooks/use-validator.d.ts +8 -3
- package/packages/components/edit-table/src/index.vue.d.ts +1 -1
- package/packages/components/edit-table/src/type.d.ts +13 -0
- package/packages/components/edit-table/src/utils.d.ts +11 -5
- package/packages/components/edit-table/style.css +1 -1
- package/packages/components/edit-table/style.css.gz +0 -0
- package/packages/components/input/index.js +42 -41
- package/packages/components/input/index.js.gz +0 -0
- package/packages/components/input/style.css +1 -1
- package/packages/components/input/style.css.gz +0 -0
- package/packages/components/map/index.js +164 -162
- package/packages/components/map/index.js.gz +0 -0
- package/packages/components/select/index.js +199 -199
- package/packages/components/select/index.js.gz +0 -0
- package/packages/components/select/style.css +1 -1
- package/packages/components/select/style.css.gz +0 -0
- package/packages/components/tree/index.js +1 -1
- package/packages/components/tree/index.js.gz +0 -0
- package/packages/components/tree-select/index.js +379 -345
- package/packages/components/tree-select/index.js.gz +0 -0
- package/packages/components/tree-select/src/App.vue.d.ts +1 -0
- package/packages/components/tree-select/src/hooks/use-tree-select.d.ts +2 -1
- package/packages/components/tree-select/src/type.d.ts +3 -0
- package/packages/components/tree-select/style.css +1 -1
- package/packages/components/tree-select/style.css.gz +0 -0
|
@@ -1,306 +1,330 @@
|
|
|
1
1
|
import '@das-fed/ui/packages/components/tree-select/style.css';
|
|
2
|
-
import { ref as
|
|
3
|
-
import { withInstall as
|
|
4
|
-
import { ElPopover as
|
|
2
|
+
import { ref as N, computed as m, watch as ie, nextTick as q, unref as o, onMounted as De, onUpdated as je, onBeforeUnmount as xe, defineComponent as Le, useAttrs as Ne, withDirectives as ve, openBlock as se, createElementBlock as ue, normalizeClass as Pe, normalizeStyle as pe, createCommentVNode as Oe, createVNode as X, withCtx as B, withModifiers as de, mergeProps as he, isRef as ce, createTextVNode as Ve, toDisplayString as Re, createElementVNode as Me, createSlots as Ee, renderSlot as G } from "vue";
|
|
3
|
+
import { withInstall as Be } from "@das-fed/utils/with-install/index";
|
|
4
|
+
import { ElPopover as We } from "element-plus";
|
|
5
5
|
import "element-plus/es/components/popover/style/css";
|
|
6
|
-
import { t as
|
|
7
|
-
import { DasSelect as
|
|
8
|
-
import { DasTreeRef as
|
|
9
|
-
import { DasIconXiala as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
import { t as Fe } from "@das-fed/web/packages/i18n/index";
|
|
7
|
+
import { DasSelect as Ie } from "@das-fed/ui/packages/components/select/index";
|
|
8
|
+
import { DasTreeRef as Ae, DasTree as Ge } from "@das-fed/ui/packages/components/tree/index";
|
|
9
|
+
import { DasIconXiala as He } from "@das-fed/ui/packages/icons/xiala/index";
|
|
10
|
+
import { vDasTooltip as ze } from "@das-fed/ui/packages/components/text-tooltip/index";
|
|
11
|
+
import { SizeWatcher as Ue } from "@das-fed/utils/size-watcher";
|
|
12
|
+
import { flatTree as _e } from "@das-fed/utils/common-tools";
|
|
13
|
+
import { vClickOutside as qe } from "@das-fed/utils/directive";
|
|
14
|
+
import { setThemeRule as Xe } from "@das-fed/web/packages/theme/index";
|
|
15
|
+
var J = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
16
|
+
function Je(e) {
|
|
16
17
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
17
18
|
}
|
|
18
|
-
function
|
|
19
|
-
var
|
|
20
|
-
return e != null && (
|
|
19
|
+
function Qe(e) {
|
|
20
|
+
var i = typeof e;
|
|
21
|
+
return e != null && (i == "object" || i == "function");
|
|
21
22
|
}
|
|
22
|
-
var
|
|
23
|
-
return
|
|
24
|
-
},
|
|
25
|
-
function
|
|
26
|
-
for (var
|
|
23
|
+
var Se = Qe, Ye = typeof J == "object" && J && J.Object === Object && J, Ze = Ye, Ke = Ze, et = typeof self == "object" && self && self.Object === Object && self, tt = Ke || et || Function("return this")(), we = tt, rt = we, lt = function() {
|
|
24
|
+
return rt.Date.now();
|
|
25
|
+
}, at = lt, ot = /\s/;
|
|
26
|
+
function nt(e) {
|
|
27
|
+
for (var i = e.length; i-- && ot.test(e.charAt(i)); )
|
|
27
28
|
;
|
|
28
|
-
return
|
|
29
|
+
return i;
|
|
29
30
|
}
|
|
30
|
-
var
|
|
31
|
-
function
|
|
32
|
-
return e && e.slice(0,
|
|
31
|
+
var it = nt, st = it, ut = /^\s+/;
|
|
32
|
+
function dt(e) {
|
|
33
|
+
return e && e.slice(0, st(e) + 1).replace(ut, "");
|
|
33
34
|
}
|
|
34
|
-
var
|
|
35
|
-
function
|
|
36
|
-
var
|
|
35
|
+
var ct = dt, ft = we, vt = ft.Symbol, Ce = vt, me = Ce, $e = Object.prototype, pt = $e.hasOwnProperty, ht = $e.toString, H = me ? me.toStringTag : void 0;
|
|
36
|
+
function mt(e) {
|
|
37
|
+
var i = pt.call(e, H), c = e[H];
|
|
37
38
|
try {
|
|
38
39
|
e[H] = void 0;
|
|
39
|
-
var
|
|
40
|
+
var d = !0;
|
|
40
41
|
} catch {
|
|
41
42
|
}
|
|
42
|
-
var
|
|
43
|
-
return
|
|
44
|
-
}
|
|
45
|
-
var pt = ft, vt = Object.prototype, ht = vt.toString;
|
|
46
|
-
function mt(e) {
|
|
47
|
-
return ht.call(e);
|
|
43
|
+
var b = ht.call(e);
|
|
44
|
+
return d && (i ? e[H] = c : delete e[H]), b;
|
|
48
45
|
}
|
|
49
|
-
var bt = mt,
|
|
46
|
+
var bt = mt, yt = Object.prototype, gt = yt.toString;
|
|
50
47
|
function kt(e) {
|
|
51
|
-
return
|
|
48
|
+
return gt.call(e);
|
|
52
49
|
}
|
|
53
|
-
var Tt = kt;
|
|
54
|
-
function
|
|
55
|
-
return e
|
|
50
|
+
var Tt = kt, be = Ce, St = bt, wt = Tt, Ct = "[object Null]", $t = "[object Undefined]", ye = be ? be.toStringTag : void 0;
|
|
51
|
+
function Dt(e) {
|
|
52
|
+
return e == null ? e === void 0 ? $t : Ct : ye && ye in Object(e) ? St(e) : wt(e);
|
|
56
53
|
}
|
|
57
|
-
var
|
|
54
|
+
var jt = Dt;
|
|
58
55
|
function xt(e) {
|
|
59
|
-
return
|
|
56
|
+
return e != null && typeof e == "object";
|
|
57
|
+
}
|
|
58
|
+
var Lt = xt, Nt = jt, Pt = Lt, Ot = "[object Symbol]";
|
|
59
|
+
function Vt(e) {
|
|
60
|
+
return typeof e == "symbol" || Pt(e) && Nt(e) == Ot;
|
|
60
61
|
}
|
|
61
|
-
var
|
|
62
|
-
function
|
|
62
|
+
var Rt = Vt, Mt = ct, ge = Se, Et = Rt, ke = NaN, Bt = /^[-+]0x[0-9a-f]+$/i, Wt = /^0b[01]+$/i, Ft = /^0o[0-7]+$/i, It = parseInt;
|
|
63
|
+
function At(e) {
|
|
63
64
|
if (typeof e == "number")
|
|
64
65
|
return e;
|
|
65
|
-
if (
|
|
66
|
-
return
|
|
67
|
-
if (
|
|
68
|
-
var
|
|
69
|
-
e =
|
|
66
|
+
if (Et(e))
|
|
67
|
+
return ke;
|
|
68
|
+
if (ge(e)) {
|
|
69
|
+
var i = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
70
|
+
e = ge(i) ? i + "" : i;
|
|
70
71
|
}
|
|
71
72
|
if (typeof e != "string")
|
|
72
73
|
return e === 0 ? e : +e;
|
|
73
|
-
e =
|
|
74
|
-
var
|
|
75
|
-
return
|
|
74
|
+
e = Mt(e);
|
|
75
|
+
var c = Wt.test(e);
|
|
76
|
+
return c || Ft.test(e) ? It(e.slice(2), c ? 2 : 8) : Bt.test(e) ? ke : +e;
|
|
76
77
|
}
|
|
77
|
-
var
|
|
78
|
-
function
|
|
79
|
-
var
|
|
78
|
+
var Gt = At, Ht = Se, fe = at, Te = Gt, zt = "Expected a function", Ut = Math.max, _t = Math.min;
|
|
79
|
+
function qt(e, i, c) {
|
|
80
|
+
var d, b, $, y, p, f, L = 0, C = !1, T = !1, V = !0;
|
|
80
81
|
if (typeof e != "function")
|
|
81
|
-
throw new TypeError(
|
|
82
|
-
|
|
83
|
-
function
|
|
84
|
-
var
|
|
85
|
-
return
|
|
82
|
+
throw new TypeError(zt);
|
|
83
|
+
i = Te(i) || 0, Ht(c) && (C = !!c.leading, T = "maxWait" in c, $ = T ? Ut(Te(c.maxWait) || 0, i) : $, V = "trailing" in c ? !!c.trailing : V);
|
|
84
|
+
function h(u) {
|
|
85
|
+
var x = d, O = b;
|
|
86
|
+
return d = b = void 0, L = u, y = e.apply(O, x), y;
|
|
86
87
|
}
|
|
87
|
-
function
|
|
88
|
-
return
|
|
88
|
+
function g(u) {
|
|
89
|
+
return L = u, p = setTimeout(M, i), C ? h(u) : y;
|
|
89
90
|
}
|
|
90
|
-
function
|
|
91
|
-
var
|
|
92
|
-
return
|
|
91
|
+
function s(u) {
|
|
92
|
+
var x = u - f, O = u - L, I = i - x;
|
|
93
|
+
return T ? _t(I, $ - O) : I;
|
|
93
94
|
}
|
|
94
|
-
function
|
|
95
|
-
var
|
|
96
|
-
return
|
|
95
|
+
function R(u) {
|
|
96
|
+
var x = u - f, O = u - L;
|
|
97
|
+
return f === void 0 || x >= i || x < 0 || T && O >= $;
|
|
97
98
|
}
|
|
98
|
-
function
|
|
99
|
-
var
|
|
100
|
-
if (
|
|
101
|
-
return
|
|
102
|
-
|
|
99
|
+
function M() {
|
|
100
|
+
var u = fe();
|
|
101
|
+
if (R(u))
|
|
102
|
+
return E(u);
|
|
103
|
+
p = setTimeout(M, s(u));
|
|
103
104
|
}
|
|
104
|
-
function
|
|
105
|
-
return
|
|
105
|
+
function E(u) {
|
|
106
|
+
return p = void 0, V && d ? h(u) : (d = b = void 0, y);
|
|
106
107
|
}
|
|
107
|
-
function
|
|
108
|
-
|
|
108
|
+
function D() {
|
|
109
|
+
p !== void 0 && clearTimeout(p), L = 0, d = f = b = p = void 0;
|
|
109
110
|
}
|
|
110
|
-
function
|
|
111
|
-
return
|
|
111
|
+
function k() {
|
|
112
|
+
return p === void 0 ? y : E(fe());
|
|
112
113
|
}
|
|
113
|
-
function
|
|
114
|
-
var
|
|
115
|
-
if (
|
|
116
|
-
if (
|
|
117
|
-
return
|
|
118
|
-
if (
|
|
119
|
-
return clearTimeout(
|
|
114
|
+
function j() {
|
|
115
|
+
var u = fe(), x = R(u);
|
|
116
|
+
if (d = arguments, b = this, f = u, x) {
|
|
117
|
+
if (p === void 0)
|
|
118
|
+
return g(f);
|
|
119
|
+
if (T)
|
|
120
|
+
return clearTimeout(p), p = setTimeout(M, i), h(f);
|
|
120
121
|
}
|
|
121
|
-
return
|
|
122
|
+
return p === void 0 && (p = setTimeout(M, i)), y;
|
|
122
123
|
}
|
|
123
|
-
return
|
|
124
|
+
return j.cancel = D, j.flush = k, j;
|
|
124
125
|
}
|
|
125
|
-
var
|
|
126
|
-
const
|
|
127
|
-
const
|
|
126
|
+
var Xt = qt;
|
|
127
|
+
const Jt = /* @__PURE__ */ Je(Xt), Qt = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|%)$/.test(e), Q = (e) => typeof e == "string" && Qt(e) ? e : e + "px", Yt = (e, i, c, d, b, $) => {
|
|
128
|
+
const y = N(null), p = N(null), f = Ae(), L = N(), C = N(!1), T = N(""), V = N(""), h = m(() => !!e.mode), g = m(() => ({ label: "name", children: "children", pathName: "pathName", disabled: "disabled", ...d.props ?? {} })), s = m({
|
|
128
129
|
get: () => e.modelValue ? e.modelValue : void 0,
|
|
129
130
|
set: (t) => {
|
|
130
|
-
|
|
131
|
+
i("update:modelValue", t);
|
|
131
132
|
}
|
|
132
|
-
}),
|
|
133
|
+
}), R = m({
|
|
133
134
|
get: () => e.keyword || "",
|
|
134
135
|
set: (t) => {
|
|
135
|
-
|
|
136
|
+
i("update:keyword", t);
|
|
136
137
|
}
|
|
137
|
-
}),
|
|
138
|
+
}), M = m({
|
|
138
139
|
get: () => e.path,
|
|
139
140
|
set: (t) => {
|
|
140
|
-
|
|
141
|
+
i("update:path", t);
|
|
141
142
|
}
|
|
142
|
-
}),
|
|
143
|
-
for (let
|
|
144
|
-
const
|
|
145
|
-
if (
|
|
146
|
-
if (
|
|
147
|
-
const
|
|
148
|
-
if (
|
|
143
|
+
}), E = (t, l, n = []) => {
|
|
144
|
+
for (let r = 0; r < t.length; r++) {
|
|
145
|
+
const S = t[r], P = S[g.value.label];
|
|
146
|
+
if (n.push(P), P === l) return n.join("/");
|
|
147
|
+
if (S.children && S.children.length > 0) {
|
|
148
|
+
const a = E(S[g.value.children], l, n);
|
|
149
|
+
if (a) return a;
|
|
149
150
|
}
|
|
150
|
-
|
|
151
|
+
n.pop();
|
|
151
152
|
}
|
|
152
153
|
return null;
|
|
153
|
-
},
|
|
154
|
-
var
|
|
155
|
-
let t = [],
|
|
156
|
-
return
|
|
157
|
-
...
|
|
158
|
-
[
|
|
154
|
+
}, D = m(() => {
|
|
155
|
+
var n;
|
|
156
|
+
let t = [], l = [];
|
|
157
|
+
return b.value ? l = ((n = f.value) == null ? void 0 : n.lazyData) || [] : e.data && (l = _e(e.data, g.value.children) || []), l.length && (t = l.map((r) => ({
|
|
158
|
+
...r,
|
|
159
|
+
[g.value.pathName]: r[g.value.pathName] ? r[g.value.pathName] : b.value ? r[g.value.label] : E(e.data, r[g.value.label])
|
|
159
160
|
}))), t;
|
|
160
|
-
}),
|
|
161
|
-
var t,
|
|
162
|
-
if (e.parentLinkChildrenStrictly || !
|
|
163
|
-
if (
|
|
164
|
-
if (
|
|
165
|
-
if (!
|
|
166
|
-
const
|
|
167
|
-
return (
|
|
161
|
+
}), k = N(""), j = N(!0), u = () => {
|
|
162
|
+
var t, l;
|
|
163
|
+
if (e.parentLinkChildrenStrictly || !b.value) return !0;
|
|
164
|
+
if (D.value.length === 0) return !1;
|
|
165
|
+
if (h.value) {
|
|
166
|
+
if (!s.value || !((t = s.value) != null && t.length)) return !0;
|
|
167
|
+
const n = D.value.map((r) => r[c.value]);
|
|
168
|
+
return (l = s.value) == null ? void 0 : l.every((r) => n.includes(r));
|
|
168
169
|
} else
|
|
169
|
-
return
|
|
170
|
+
return s.value ? !!D.value.find((r) => r[c.value] === s.value) : !0;
|
|
170
171
|
};
|
|
171
|
-
|
|
172
|
-
() =>
|
|
173
|
-
() => {
|
|
174
|
-
|
|
172
|
+
ie(
|
|
173
|
+
() => e.showSelectDom,
|
|
174
|
+
(t) => {
|
|
175
|
+
t || (C.value = !1);
|
|
176
|
+
}
|
|
177
|
+
), ie(
|
|
178
|
+
() => [D.value, s.value],
|
|
179
|
+
([t, l]) => {
|
|
180
|
+
if (j.value = !u(), !j.value)
|
|
181
|
+
if (h.value)
|
|
182
|
+
if (!l || !(l != null && l.length))
|
|
183
|
+
k.value = "";
|
|
184
|
+
else {
|
|
185
|
+
const n = t == null ? void 0 : t.filter((r) => l.includes(r[c.value]));
|
|
186
|
+
n != null && n.length ? k.value = n.map((r) => e.showFullPath ? r[g.value.pathName] : r[g.value.label]).join(",") : k.value = "";
|
|
187
|
+
}
|
|
188
|
+
else if (!l)
|
|
189
|
+
k.value = "";
|
|
190
|
+
else {
|
|
191
|
+
const n = t == null ? void 0 : t.find((r) => r[c.value] === l);
|
|
192
|
+
n ? k.value = e.showFullPath ? n[g.value.pathName] : n[g.value.label] : k.value = "";
|
|
193
|
+
}
|
|
175
194
|
},
|
|
176
195
|
{ immediate: !0 }
|
|
177
196
|
);
|
|
178
|
-
const
|
|
197
|
+
const x = m(() => ({
|
|
179
198
|
height: e.poppverHeight ? Q(e.poppverHeight) : void 0,
|
|
180
199
|
maxHeight: e.poppverMaxHeight ? Q(e.poppverMaxHeight) : void 0
|
|
181
200
|
})), O = () => {
|
|
182
|
-
|
|
183
|
-
},
|
|
201
|
+
i("visible-change", !0);
|
|
202
|
+
}, I = () => {
|
|
184
203
|
var t;
|
|
185
|
-
|
|
186
|
-
},
|
|
187
|
-
e.disabled || e.isView || (
|
|
204
|
+
R.value = "", (t = f.value) == null || t.searchClear(), i("visible-change", !1);
|
|
205
|
+
}, Y = Jt(() => {
|
|
206
|
+
e.disabled || e.isView || (C.value ? C.value = !1 : (document.body.click(), C.value = !0));
|
|
188
207
|
}, 200), A = async () => {
|
|
189
|
-
var
|
|
190
|
-
await
|
|
208
|
+
var l, n;
|
|
209
|
+
await q();
|
|
191
210
|
let t = [];
|
|
192
|
-
|
|
193
|
-
},
|
|
194
|
-
|
|
195
|
-
},
|
|
196
|
-
var
|
|
197
|
-
if (!
|
|
198
|
-
if (!
|
|
199
|
-
let
|
|
200
|
-
|
|
211
|
+
h.value || (s.value || s.value === 0) && (b.value && await ((l = f.value) == null ? void 0 : l.lazyDataNextTick(s.value)), t = D.value.filter((r) => r[c.value] === s.value)), h.value && (s.value || s.value.length) && (b.value && await ((n = f.value) == null ? void 0 : n.lazyDataNextTick(s.value)), t = D.value.filter((r) => s.value.includes(r[c.value]))), i("change", s.value, t);
|
|
212
|
+
}, W = N(!1), Z = async () => {
|
|
213
|
+
s.value = h.value ? [] : "", A(), W.value = !0;
|
|
214
|
+
}, K = async (t) => {
|
|
215
|
+
var l, n, r, S, P, a;
|
|
216
|
+
if (!W.value && h.value) {
|
|
217
|
+
if (!b.value && !$.value) {
|
|
218
|
+
let v = (n = (l = f.value) == null ? void 0 : l.treeRef) == null ? void 0 : n.getNode(t);
|
|
219
|
+
v.checked = !1, (r = f.value) == null || r.childLinkParent(v, v.checked), (S = f.value) == null || S.parentLinkChild(v, v.checked);
|
|
201
220
|
}
|
|
202
|
-
if (
|
|
203
|
-
let
|
|
204
|
-
if (
|
|
205
|
-
const
|
|
206
|
-
if (
|
|
207
|
-
const
|
|
208
|
-
|
|
221
|
+
if (b.value && e.parentLinkChildrenStrictly) {
|
|
222
|
+
let v = D.value.find((w) => w[c.value] === t);
|
|
223
|
+
if (v && ((P = f.value) != null && P.getGrandChildrenFn)) {
|
|
224
|
+
const w = await f.value.getGrandChildrenFn(v);
|
|
225
|
+
if (w && w.length) {
|
|
226
|
+
const oe = w.map((ne) => ne[c.value]);
|
|
227
|
+
s.value && ((a = s.value) != null && a.length) && (s.value = s.value.filter((ne) => !oe.includes(ne)));
|
|
209
228
|
}
|
|
210
229
|
}
|
|
211
230
|
}
|
|
212
231
|
A();
|
|
213
232
|
}
|
|
214
|
-
},
|
|
233
|
+
}, ee = (t) => {
|
|
215
234
|
if (!e.filter) return;
|
|
216
|
-
const
|
|
217
|
-
|
|
218
|
-
},
|
|
219
|
-
var t,
|
|
220
|
-
|
|
221
|
-
},
|
|
222
|
-
|
|
223
|
-
|
|
235
|
+
const l = t && (t == null ? void 0 : t.trim());
|
|
236
|
+
R.value = l, C.value || (C.value = !0);
|
|
237
|
+
}, te = () => {
|
|
238
|
+
var t, l;
|
|
239
|
+
h.value || (C.value = !1, e.filter && ((l = (t = p.value) == null ? void 0 : t.$select) == null || l.focus()));
|
|
240
|
+
}, z = () => y != null && y.value && y.value.offsetWidth ? y.value.offsetWidth + "px" : "100%", U = () => {
|
|
241
|
+
q(() => {
|
|
242
|
+
T.value = e.width ? Q(e.width) : z(), V.value = e.poppverWidth ? Q(e.poppverWidth) : z();
|
|
224
243
|
});
|
|
225
|
-
},
|
|
226
|
-
var
|
|
227
|
-
|
|
228
|
-
},
|
|
229
|
-
|
|
244
|
+
}, re = (t) => {
|
|
245
|
+
var l;
|
|
246
|
+
W.value && (W.value = !1), (l = p.value) == null || l.toChangeMaxCount(!0), i("focus", t);
|
|
247
|
+
}, _ = (t) => {
|
|
248
|
+
i("blur", t);
|
|
230
249
|
};
|
|
231
|
-
|
|
232
|
-
() =>
|
|
250
|
+
ie(
|
|
251
|
+
() => C.value,
|
|
233
252
|
(t) => {
|
|
234
|
-
var
|
|
235
|
-
const
|
|
236
|
-
t ?
|
|
237
|
-
var
|
|
238
|
-
(
|
|
253
|
+
var n, r;
|
|
254
|
+
const l = (n = y.value) == null ? void 0 : n.querySelector(".ant-select-arrow>.das-icon");
|
|
255
|
+
t ? l.style.transform = "rotate(180deg)" : l.style.transform = "", (r = p.value) == null || r.toChangeMaxCount(t), q(() => {
|
|
256
|
+
var S, P, a;
|
|
257
|
+
(a = (P = (S = o(L)) == null ? void 0 : S.popperRef) == null ? void 0 : P.popperInstanceRef) == null || a.update();
|
|
239
258
|
});
|
|
240
259
|
}
|
|
241
260
|
);
|
|
242
|
-
const
|
|
243
|
-
const
|
|
244
|
-
var
|
|
245
|
-
const
|
|
246
|
-
if (
|
|
247
|
-
setTimeout(() =>
|
|
261
|
+
const F = N(null), le = () => new Promise((t) => {
|
|
262
|
+
const l = () => {
|
|
263
|
+
var r;
|
|
264
|
+
const n = (r = y.value) == null ? void 0 : r.querySelector(".ant-select-selector");
|
|
265
|
+
if (n) return t(n);
|
|
266
|
+
setTimeout(() => l(), 50);
|
|
248
267
|
};
|
|
249
|
-
|
|
268
|
+
l();
|
|
250
269
|
}), ae = (t) => {
|
|
251
|
-
|
|
270
|
+
s.value = t;
|
|
252
271
|
};
|
|
253
|
-
return
|
|
254
|
-
|
|
255
|
-
const t = await
|
|
256
|
-
t && (
|
|
257
|
-
|
|
258
|
-
var
|
|
259
|
-
(
|
|
272
|
+
return De(async () => {
|
|
273
|
+
U();
|
|
274
|
+
const t = await le();
|
|
275
|
+
t && (F.value = Ue((l) => {
|
|
276
|
+
q(() => {
|
|
277
|
+
var n, r, S;
|
|
278
|
+
(S = (r = (n = o(L)) == null ? void 0 : n.popperRef) == null ? void 0 : r.popperInstanceRef) == null || S.update();
|
|
260
279
|
});
|
|
261
280
|
}, t));
|
|
262
|
-
}),
|
|
281
|
+
}), je(U), xe(() => {
|
|
263
282
|
var t;
|
|
264
|
-
(t =
|
|
283
|
+
(t = F.value) == null || t.disconnect();
|
|
265
284
|
}), {
|
|
266
|
-
innerValue:
|
|
267
|
-
popoverRef:
|
|
268
|
-
dasTreeSelectRef:
|
|
269
|
-
$tree:
|
|
270
|
-
$select:
|
|
271
|
-
innerKeyword:
|
|
272
|
-
realWidth:
|
|
273
|
-
realPoppverWidth:
|
|
274
|
-
poppverContentStyle:
|
|
275
|
-
treePath:
|
|
276
|
-
treeProps:
|
|
277
|
-
selectOptions:
|
|
285
|
+
innerValue: s,
|
|
286
|
+
popoverRef: L,
|
|
287
|
+
dasTreeSelectRef: y,
|
|
288
|
+
$tree: f,
|
|
289
|
+
$select: p,
|
|
290
|
+
innerKeyword: R,
|
|
291
|
+
realWidth: T,
|
|
292
|
+
realPoppverWidth: V,
|
|
293
|
+
poppverContentStyle: x,
|
|
294
|
+
treePath: M,
|
|
295
|
+
treeProps: g,
|
|
296
|
+
selectOptions: D,
|
|
297
|
+
currentLabel: k,
|
|
278
298
|
poppverShow: O,
|
|
279
|
-
poppverHide:
|
|
299
|
+
poppverHide: I,
|
|
280
300
|
treeChange: A,
|
|
281
|
-
nodeChange:
|
|
282
|
-
deselect:
|
|
283
|
-
selectSearch:
|
|
284
|
-
selectClear:
|
|
285
|
-
popoverVisible:
|
|
286
|
-
selectMouseDown:
|
|
301
|
+
nodeChange: te,
|
|
302
|
+
deselect: K,
|
|
303
|
+
selectSearch: ee,
|
|
304
|
+
selectClear: Z,
|
|
305
|
+
popoverVisible: C,
|
|
306
|
+
selectMouseDown: Y,
|
|
287
307
|
resetDefaultVal: ae,
|
|
288
|
-
focus:
|
|
289
|
-
blur:
|
|
290
|
-
checkselectOptionsData:
|
|
291
|
-
|
|
292
|
-
showCheckbox:
|
|
308
|
+
focus: re,
|
|
309
|
+
blur: _,
|
|
310
|
+
checkselectOptionsData: u,
|
|
311
|
+
textHide: j,
|
|
312
|
+
showCheckbox: h
|
|
293
313
|
};
|
|
294
|
-
},
|
|
314
|
+
}, Zt = {
|
|
315
|
+
key: 1,
|
|
316
|
+
class: "das-tree-select__selct-text-content"
|
|
317
|
+
}, Kt = {
|
|
295
318
|
name: "DasTreeSelect",
|
|
296
319
|
inheritAttrs: !1
|
|
297
|
-
},
|
|
298
|
-
...
|
|
320
|
+
}, er = /* @__PURE__ */ Le({
|
|
321
|
+
...Kt,
|
|
299
322
|
props: {
|
|
300
323
|
data: { default: () => [] },
|
|
301
324
|
mode: { default: void 0 },
|
|
302
325
|
modelValue: { default: void 0 },
|
|
303
326
|
showFullPath: { type: Boolean },
|
|
327
|
+
showSelectDom: { type: Boolean, default: !0 },
|
|
304
328
|
size: { default: "middle" },
|
|
305
329
|
borderType: { default: "underline" },
|
|
306
330
|
placeholder: { default: "" },
|
|
@@ -326,121 +350,123 @@ const Ut = /* @__PURE__ */ Ue(zt), qt = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
326
350
|
childLinkParentStrictly: { type: Boolean }
|
|
327
351
|
},
|
|
328
352
|
emits: ["update:modelValue", "update:path", "update:keyword", "change", "focus", "blur", "visible-change"],
|
|
329
|
-
setup(e, { expose:
|
|
330
|
-
const
|
|
331
|
-
|
|
353
|
+
setup(e, { expose: i, emit: c }) {
|
|
354
|
+
const d = e, b = c, $ = Ne(), y = m(() => d.placeholder || Fe("请选择")), p = m(() => $.nodeKey ?? $["node-key"] ?? "id"), f = m(() => d.load ?? void 0), L = m(() => d.search ?? void 0), C = m(() => d.getGrandChildren ?? void 0), T = m(() => $.lazy ?? !!f.value), V = m(() => T.value ? !1 : d.defaultExpandAll), h = m(() => d.selectAttrs ? d.selectAttrs : {}), g = m(() => !!(d.disabled || d.isView)), s = m(() => d.parentLinkChildrenStrictly || d.childLinkParentStrictly ? !0 : !!(d.checkStrictly ?? T.value)), R = (a) => {
|
|
355
|
+
a.key === "Enter" && a.stopPropagation();
|
|
332
356
|
}, {
|
|
333
|
-
dasTreeSelectRef:
|
|
334
|
-
$tree:
|
|
335
|
-
$select:
|
|
336
|
-
innerValue:
|
|
337
|
-
innerKeyword:
|
|
338
|
-
realWidth:
|
|
339
|
-
poppverContentStyle:
|
|
340
|
-
realPoppverWidth:
|
|
341
|
-
treeChange:
|
|
342
|
-
nodeChange:
|
|
343
|
-
treePath:
|
|
344
|
-
treeProps:
|
|
345
|
-
selectOptions:
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
357
|
+
dasTreeSelectRef: M,
|
|
358
|
+
$tree: E,
|
|
359
|
+
$select: D,
|
|
360
|
+
innerValue: k,
|
|
361
|
+
innerKeyword: j,
|
|
362
|
+
realWidth: u,
|
|
363
|
+
poppverContentStyle: x,
|
|
364
|
+
realPoppverWidth: O,
|
|
365
|
+
treeChange: I,
|
|
366
|
+
nodeChange: Y,
|
|
367
|
+
treePath: A,
|
|
368
|
+
treeProps: W,
|
|
369
|
+
selectOptions: Z,
|
|
370
|
+
currentLabel: K,
|
|
371
|
+
popoverRef: ee,
|
|
372
|
+
deselect: te,
|
|
373
|
+
poppverShow: z,
|
|
374
|
+
poppverHide: U,
|
|
375
|
+
selectSearch: re,
|
|
376
|
+
selectMouseDown: _,
|
|
377
|
+
popoverVisible: F,
|
|
378
|
+
resetDefaultVal: le,
|
|
354
379
|
selectClear: ae,
|
|
355
380
|
focus: t,
|
|
356
|
-
blur:
|
|
357
|
-
|
|
358
|
-
checkselectOptionsData:
|
|
359
|
-
showCheckbox:
|
|
360
|
-
} =
|
|
361
|
-
return
|
|
381
|
+
blur: l,
|
|
382
|
+
textHide: n,
|
|
383
|
+
checkselectOptionsData: r,
|
|
384
|
+
showCheckbox: S
|
|
385
|
+
} = Yt(d, b, p, $, T, s), P = m(() => h.value.isTooltip ? h.value.isTooltip && r() : h.value["is-tooltip"] ? h.value["is-tooltip"] && r() : r());
|
|
386
|
+
return i({
|
|
362
387
|
/** das-select */
|
|
363
|
-
$select:
|
|
388
|
+
$select: D,
|
|
364
389
|
/** das-tree */
|
|
365
|
-
$tree:
|
|
390
|
+
$tree: E,
|
|
366
391
|
/** 设置默认值,当默认值为动态设置时使用(兼容老版本) */
|
|
367
|
-
resetDefaultVal:
|
|
368
|
-
}), (
|
|
392
|
+
resetDefaultVal: le
|
|
393
|
+
}), (a, v) => ve((se(), ue(
|
|
369
394
|
"div",
|
|
370
395
|
{
|
|
371
396
|
ref_key: "dasTreeSelectRef",
|
|
372
|
-
ref:
|
|
373
|
-
class:
|
|
374
|
-
style:
|
|
397
|
+
ref: M,
|
|
398
|
+
class: Pe({ "das-ui-tree-select": !0, "is-lazy": T.value, "text-hide": o(n), "show-select": a.showSelectDom }),
|
|
399
|
+
style: pe({ width: o(u) })
|
|
375
400
|
},
|
|
376
401
|
[
|
|
377
|
-
|
|
378
|
-
|
|
402
|
+
Oe(` 在使用 2.x 版本的element-UI时,里面的Popover气泡卡片组件,有自带的自动适应位置的功能;在 element plus 中,直接使用,已经无法自适应气泡弹窗的位置了;需要自行配置:fallback-placements="['bottom', 'top', 'right', 'left']" `),
|
|
403
|
+
X(o(We), {
|
|
379
404
|
ref_key: "popoverRef",
|
|
380
|
-
ref:
|
|
381
|
-
visible:
|
|
405
|
+
ref: ee,
|
|
406
|
+
visible: o(F),
|
|
382
407
|
"popper-class": "das-tree-select-popper",
|
|
383
408
|
placement: "bottom-start",
|
|
384
409
|
"show-arrow": !1,
|
|
385
|
-
width:
|
|
386
|
-
disabled:
|
|
410
|
+
width: o(O),
|
|
411
|
+
disabled: g.value,
|
|
387
412
|
"fallback-placements": ["bottom", "top", "right", "left"],
|
|
388
|
-
onShow:
|
|
389
|
-
onHide:
|
|
413
|
+
onShow: o(z),
|
|
414
|
+
onHide: o(U)
|
|
390
415
|
}, {
|
|
391
|
-
reference:
|
|
392
|
-
|
|
416
|
+
reference: B(() => [
|
|
417
|
+
a.showSelectDom ? (se(), ue(
|
|
393
418
|
"div",
|
|
394
419
|
{
|
|
420
|
+
key: 0,
|
|
395
421
|
class: "das-tree-select__select-content",
|
|
396
|
-
onMousedown:
|
|
422
|
+
onMousedown: v[1] || (v[1] = de(
|
|
397
423
|
//@ts-ignore
|
|
398
|
-
(...
|
|
424
|
+
(...w) => o(_) && o(_)(...w),
|
|
399
425
|
["stop"]
|
|
400
426
|
))
|
|
401
427
|
},
|
|
402
428
|
[
|
|
403
|
-
|
|
429
|
+
X(o(Ie), he({
|
|
404
430
|
ref_key: "$select",
|
|
405
|
-
ref:
|
|
406
|
-
class: { "is-active":
|
|
431
|
+
ref: D,
|
|
432
|
+
class: { "is-active": o(F) },
|
|
407
433
|
dropdownClassName: "das-tree-select-dropdown",
|
|
408
|
-
modelValue:
|
|
409
|
-
"onUpdate:modelValue":
|
|
410
|
-
},
|
|
411
|
-
searchValue:
|
|
412
|
-
options:
|
|
413
|
-
disabled:
|
|
414
|
-
isView:
|
|
415
|
-
size:
|
|
416
|
-
mode:
|
|
417
|
-
borderType:
|
|
418
|
-
placeholder:
|
|
419
|
-
"show-search":
|
|
420
|
-
filterOption:
|
|
421
|
-
width:
|
|
434
|
+
modelValue: o(k),
|
|
435
|
+
"onUpdate:modelValue": v[0] || (v[0] = (w) => ce(k) ? k.value = w : null)
|
|
436
|
+
}, h.value, {
|
|
437
|
+
searchValue: o(j),
|
|
438
|
+
options: o(Z),
|
|
439
|
+
disabled: a.disabled,
|
|
440
|
+
isView: a.isView,
|
|
441
|
+
size: a.size,
|
|
442
|
+
mode: a.mode,
|
|
443
|
+
borderType: a.borderType,
|
|
444
|
+
placeholder: y.value,
|
|
445
|
+
"show-search": a.filter,
|
|
446
|
+
filterOption: a.filter,
|
|
447
|
+
width: o(u),
|
|
422
448
|
fieldNames: {
|
|
423
|
-
value:
|
|
424
|
-
label:
|
|
449
|
+
value: p.value,
|
|
450
|
+
label: a.showFullPath ? o(W).pathName : o(W).label
|
|
425
451
|
},
|
|
426
|
-
isTooltip:
|
|
427
|
-
errorMode:
|
|
428
|
-
error:
|
|
429
|
-
errorLabel:
|
|
452
|
+
isTooltip: P.value,
|
|
453
|
+
errorMode: a.errorMode,
|
|
454
|
+
error: a.error,
|
|
455
|
+
errorLabel: a.errorLabel,
|
|
430
456
|
autoClearSearchValue: !1,
|
|
431
457
|
isExterControlCount: "",
|
|
432
|
-
onDeselect:
|
|
433
|
-
onSearch:
|
|
434
|
-
onInputKeyDown:
|
|
435
|
-
onFocus:
|
|
436
|
-
onBlur:
|
|
437
|
-
onClear:
|
|
458
|
+
onDeselect: o(te),
|
|
459
|
+
onSearch: o(re),
|
|
460
|
+
onInputKeyDown: R,
|
|
461
|
+
onFocus: o(t),
|
|
462
|
+
onBlur: o(l),
|
|
463
|
+
onClear: o(ae)
|
|
438
464
|
}), {
|
|
439
|
-
suffixIcon:
|
|
440
|
-
|
|
465
|
+
suffixIcon: B(() => [
|
|
466
|
+
X(o(He), {
|
|
441
467
|
size: "medium",
|
|
442
468
|
style: { transition: "transform 0.5s" },
|
|
443
|
-
iconColor:
|
|
469
|
+
iconColor: o(F) ? "#5582F3" : "currentColor"
|
|
444
470
|
}, null, 8, ["iconColor"])
|
|
445
471
|
]),
|
|
446
472
|
_: 1
|
|
@@ -449,79 +475,87 @@ const Ut = /* @__PURE__ */ Ue(zt), qt = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
449
475
|
],
|
|
450
476
|
32
|
|
451
477
|
/* NEED_HYDRATION */
|
|
452
|
-
)
|
|
478
|
+
)) : ve((se(), ue("div", Zt, [
|
|
479
|
+
Ve(
|
|
480
|
+
Re(o(K)),
|
|
481
|
+
1
|
|
482
|
+
/* TEXT */
|
|
483
|
+
)
|
|
484
|
+
])), [
|
|
485
|
+
[o(ze)]
|
|
486
|
+
])
|
|
453
487
|
]),
|
|
454
|
-
default:
|
|
455
|
-
|
|
488
|
+
default: B(() => [
|
|
489
|
+
Me(
|
|
456
490
|
"div",
|
|
457
491
|
{
|
|
458
492
|
class: "das-tree-select__tree-content",
|
|
459
|
-
style:
|
|
460
|
-
onClick:
|
|
493
|
+
style: pe(o(x)),
|
|
494
|
+
onClick: v[4] || (v[4] = de(() => {
|
|
461
495
|
}, ["stop"])),
|
|
462
|
-
onMousedown:
|
|
496
|
+
onMousedown: v[5] || (v[5] = de(() => {
|
|
463
497
|
}, ["stop"]))
|
|
464
498
|
},
|
|
465
499
|
[
|
|
466
|
-
|
|
500
|
+
X(o(Ge), he({
|
|
467
501
|
ref_key: "$tree",
|
|
468
|
-
ref:
|
|
469
|
-
},
|
|
470
|
-
data:
|
|
471
|
-
modelValue:
|
|
472
|
-
"onUpdate:modelValue":
|
|
473
|
-
"filter-value":
|
|
474
|
-
"onUpdate:filterValue":
|
|
475
|
-
"show-checkbox":
|
|
476
|
-
"is-filter":
|
|
502
|
+
ref: E
|
|
503
|
+
}, o($), {
|
|
504
|
+
data: a.data,
|
|
505
|
+
modelValue: o(k),
|
|
506
|
+
"onUpdate:modelValue": v[2] || (v[2] = (w) => ce(k) ? k.value = w : null),
|
|
507
|
+
"filter-value": o(j),
|
|
508
|
+
"onUpdate:filterValue": v[3] || (v[3] = (w) => ce(j) ? j.value = w : null),
|
|
509
|
+
"show-checkbox": o(S),
|
|
510
|
+
"is-filter": a.filter,
|
|
477
511
|
"show-filter-input": !1,
|
|
478
512
|
"filter-mode": "input",
|
|
479
|
-
lazy:
|
|
480
|
-
load:
|
|
481
|
-
search:
|
|
482
|
-
path:
|
|
483
|
-
"default-expand-all":
|
|
484
|
-
"check-strictly":
|
|
485
|
-
parentLinkChildrenStrictly:
|
|
486
|
-
getGrandChildren:
|
|
487
|
-
childLinkParentStrictly:
|
|
488
|
-
onChange:
|
|
489
|
-
onNodeChange:
|
|
490
|
-
}),
|
|
491
|
-
default:
|
|
492
|
-
G(
|
|
493
|
-
node:
|
|
494
|
-
data:
|
|
513
|
+
lazy: T.value,
|
|
514
|
+
load: f.value,
|
|
515
|
+
search: L.value,
|
|
516
|
+
path: o(A),
|
|
517
|
+
"default-expand-all": V.value,
|
|
518
|
+
"check-strictly": T.value ? !0 : s.value,
|
|
519
|
+
parentLinkChildrenStrictly: a.parentLinkChildrenStrictly,
|
|
520
|
+
getGrandChildren: C.value,
|
|
521
|
+
childLinkParentStrictly: a.childLinkParentStrictly,
|
|
522
|
+
onChange: o(I),
|
|
523
|
+
onNodeChange: o(Y)
|
|
524
|
+
}), Ee({
|
|
525
|
+
default: B(({ node: w, data: oe }) => [
|
|
526
|
+
G(a.$slots, "default", {
|
|
527
|
+
node: w,
|
|
528
|
+
data: oe
|
|
495
529
|
})
|
|
496
530
|
]),
|
|
497
531
|
_: 2
|
|
498
532
|
/* DYNAMIC */
|
|
499
533
|
}, [
|
|
500
|
-
|
|
534
|
+
a.$slots.prefix ? {
|
|
501
535
|
name: "prefix",
|
|
502
|
-
fn:
|
|
503
|
-
G(
|
|
536
|
+
fn: B(() => [
|
|
537
|
+
G(a.$slots, "prefix")
|
|
504
538
|
]),
|
|
505
539
|
key: "0"
|
|
506
540
|
} : void 0,
|
|
507
|
-
|
|
541
|
+
a.$slots.suffix ? {
|
|
508
542
|
name: "suffix",
|
|
509
|
-
fn:
|
|
510
|
-
G(
|
|
543
|
+
fn: B(() => [
|
|
544
|
+
G(a.$slots, "suffix")
|
|
511
545
|
]),
|
|
512
546
|
key: "1"
|
|
513
547
|
} : void 0,
|
|
514
|
-
|
|
548
|
+
a.$slots.prepend ? {
|
|
515
549
|
name: "prepend",
|
|
516
|
-
fn:
|
|
517
|
-
G(
|
|
550
|
+
fn: B(() => [
|
|
551
|
+
G(a.$slots, "prepend")
|
|
518
552
|
]),
|
|
519
553
|
key: "2"
|
|
520
554
|
} : void 0,
|
|
521
|
-
|
|
555
|
+
a.$slots.append ? {
|
|
522
556
|
name: "append",
|
|
523
|
-
fn:
|
|
524
|
-
G(
|
|
557
|
+
fn: B(() => [
|
|
558
|
+
G(a.$slots, "append")
|
|
525
559
|
]),
|
|
526
560
|
key: "3"
|
|
527
561
|
} : void 0
|
|
@@ -538,21 +572,21 @@ const Ut = /* @__PURE__ */ Ue(zt), qt = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
538
572
|
6
|
|
539
573
|
/* CLASS, STYLE */
|
|
540
574
|
)), [
|
|
541
|
-
[
|
|
575
|
+
[o(qe), {
|
|
542
576
|
fn: () => {
|
|
543
|
-
|
|
577
|
+
F.value = !1;
|
|
544
578
|
}
|
|
545
579
|
}]
|
|
546
580
|
]);
|
|
547
581
|
}
|
|
548
|
-
}),
|
|
582
|
+
}), tr = {
|
|
549
583
|
"--das-ui-tree-select-keyword-input-active": "#5582F3",
|
|
550
584
|
"--das-ui-tree-select-search-no-data": "#999999"
|
|
551
585
|
};
|
|
552
|
-
|
|
553
|
-
const
|
|
586
|
+
Xe(tr);
|
|
587
|
+
const hr = Be(er), mr = () => N(null), br = { title: "tree-select 树选择" };
|
|
554
588
|
export {
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
589
|
+
hr as DasTreeSelect,
|
|
590
|
+
mr as DasTreeSelectRef,
|
|
591
|
+
br as default
|
|
558
592
|
};
|