@das-fed/upf-ui 6.4.0-dev.311 → 6.4.0-dev.312
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 +2 -1
- package/front-end/i18n/front-end-page/dasui_en-US.js +9 -6
- package/front-end/i18n/front-end-page/dasui_zh-CN.js +9 -6
- package/front-end/i18n/front-end-page/dasui_zh-MO.js +9 -6
- package/package.json +7 -7
- package/packages/business-components/process-search-form/hooks/useSearchOptions.d.ts +2 -0
- package/packages/components/input/style.css +1 -1
- package/packages/components/input/style.css.gz +0 -0
- package/packages/components/search-form/i18n/index.d.ts +12 -0
- package/packages/components/search-form/index.d.ts +3 -0
- package/packages/components/search-form/index.js +1964 -1074
- package/packages/components/search-form/index.js.gz +0 -0
- package/packages/components/search-form/skills/DasSearchForm/345/215/207/347/272/247/346/214/207/345/215/227.md +141 -0
- package/packages/components/search-form/skills/das-search-form-toolbar-migration/SKILL.md +113 -0
- package/packages/components/search-form/skills/das-search-form-toolbar-migration//350/277/201/347/247/273/350/246/201/347/202/271/344/270/216/345/270/270/350/247/201/351/227/256/351/242/230.md +47 -0
- package/packages/components/search-form/src/Index.vue.d.ts +12 -50
- package/packages/components/search-form/src/Legacy.vue.d.ts +61 -0
- package/packages/components/search-form/src/SearchDateRange.vue.d.ts +5 -2
- package/packages/components/search-form/src/Toolbar.vue.d.ts +57 -0
- package/packages/components/search-form/src/api/park-space.d.ts +8 -0
- package/packages/components/search-form/src/hooks/common-query.d.ts +7 -0
- package/packages/components/search-form/src/hooks/searchFormItem.d.ts +16 -14
- package/packages/components/search-form/src/hooks/submission.d.ts +23 -0
- package/packages/components/search-form/src/hooks/toolbar-state.d.ts +22 -0
- package/packages/components/search-form/src/toolbar-types.d.ts +45 -0
- package/packages/components/search-form/style.css +1 -1
- package/packages/components/search-form/style.css.gz +0 -0
- package/packages/components/select/index.js +257 -233
- package/packages/components/select/index.js.gz +0 -0
- package/packages/components/select/src/type.d.ts +97 -97
- package/packages/components/select/style.css +1 -1
- package/packages/components/select/style.css.gz +0 -0
- package/packages/components/select-input/index.js +2 -2
- package/packages/components/select-input/index.js.gz +0 -0
- package/packages/components/select-input/style.css +1 -1
- package/packages/components/select-input/style.css.gz +0 -0
- package/packages/components/tree-select/index.js +125 -122
- package/packages/components/tree-select/index.js.gz +0 -0
- package/packages/components/tree-select/src/App.vue.d.ts +3 -2
- package/packages/components/tree-select/src/type.d.ts +115 -112
- package/packages/components/tree-v2/style.css +1 -1
- package/packages/components/tree-v2/style.css.gz +0 -0
- package/release-meta.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as N, computed as k, watch as ye, nextTick as _, unref as a, onMounted as Oe, onBeforeUnmount as Be, defineComponent as Re, useAttrs as Ee, withDirectives as be, openBlock as q, createElementBlock as ce, normalizeClass as Me, normalizeStyle as ge, createCommentVNode as ke, createVNode as ve, withCtx as x, withModifiers as he, mergeProps as pe, isRef as X, createTextVNode as Ae, toDisplayString as We, createElementVNode as Ge, createBlock as Se, createSlots as Te, renderSlot as j } from "vue";
|
|
2
2
|
import { withInstall as Fe } from "@das-fed/upf-utils/with-install/index";
|
|
3
3
|
import { ElPopover as ze } from "element-plus";
|
|
4
4
|
import "element-plus/es/components/popover/style/css";
|
|
@@ -21,100 +21,100 @@ function lt(e) {
|
|
|
21
21
|
var d = typeof e;
|
|
22
22
|
return e != null && (d == "object" || d == "function");
|
|
23
23
|
}
|
|
24
|
-
var
|
|
24
|
+
var De = lt, at = typeof ee == "object" && ee && ee.Object === Object && ee, rt = at, nt = rt, ot = typeof self == "object" && self && self.Object === Object && self, it = nt || ot || Function("return this")(), Ne = it, st = Ne, ut = function() {
|
|
25
25
|
return st.Date.now();
|
|
26
|
-
}, dt = ut,
|
|
27
|
-
function
|
|
28
|
-
for (var d = e.length; d-- &&
|
|
26
|
+
}, dt = ut, ft = /\s/;
|
|
27
|
+
function ct(e) {
|
|
28
|
+
for (var d = e.length; d-- && ft.test(e.charAt(d)); )
|
|
29
29
|
;
|
|
30
30
|
return d;
|
|
31
31
|
}
|
|
32
|
-
var vt =
|
|
32
|
+
var vt = ct, ht = vt, pt = /^\s+/;
|
|
33
33
|
function mt(e) {
|
|
34
34
|
return e && e.slice(0, ht(e) + 1).replace(pt, "");
|
|
35
35
|
}
|
|
36
|
-
var yt = mt, bt =
|
|
36
|
+
var yt = mt, bt = Ne, gt = bt.Symbol, je = gt, Ce = je, Pe = Object.prototype, kt = Pe.hasOwnProperty, St = Pe.toString, J = Ce ? Ce.toStringTag : void 0;
|
|
37
37
|
function Tt(e) {
|
|
38
|
-
var d = kt.call(e, J),
|
|
38
|
+
var d = kt.call(e, J), c = e[J];
|
|
39
39
|
try {
|
|
40
40
|
e[J] = void 0;
|
|
41
|
-
var
|
|
41
|
+
var f = !0;
|
|
42
42
|
} catch {
|
|
43
43
|
}
|
|
44
44
|
var m = St.call(e);
|
|
45
|
-
return
|
|
45
|
+
return f && (d ? e[J] = c : delete e[J]), m;
|
|
46
46
|
}
|
|
47
47
|
var Ct = Tt, wt = Object.prototype, $t = wt.toString;
|
|
48
48
|
function xt(e) {
|
|
49
49
|
return $t.call(e);
|
|
50
50
|
}
|
|
51
|
-
var Lt = xt,
|
|
51
|
+
var Lt = xt, we = je, Vt = Ct, Dt = Lt, Nt = "[object Null]", jt = "[object Undefined]", $e = we ? we.toStringTag : void 0;
|
|
52
52
|
function Pt(e) {
|
|
53
|
-
return e == null ? e === void 0 ?
|
|
53
|
+
return e == null ? e === void 0 ? jt : Nt : $e && $e in Object(e) ? Vt(e) : Dt(e);
|
|
54
54
|
}
|
|
55
55
|
var It = Pt;
|
|
56
|
-
function
|
|
56
|
+
function Ot(e) {
|
|
57
57
|
return e != null && typeof e == "object";
|
|
58
58
|
}
|
|
59
|
-
var
|
|
59
|
+
var Bt = Ot, Rt = It, Et = Bt, Mt = "[object Symbol]";
|
|
60
60
|
function At(e) {
|
|
61
61
|
return typeof e == "symbol" || Et(e) && Rt(e) == Mt;
|
|
62
62
|
}
|
|
63
|
-
var Wt = At, Gt = yt,
|
|
63
|
+
var Wt = At, Gt = yt, xe = De, Ft = Wt, Le = NaN, zt = /^[-+]0x[0-9a-f]+$/i, Ht = /^0b[01]+$/i, Ut = /^0o[0-7]+$/i, qt = parseInt;
|
|
64
64
|
function Xt(e) {
|
|
65
65
|
if (typeof e == "number")
|
|
66
66
|
return e;
|
|
67
67
|
if (Ft(e))
|
|
68
|
-
return
|
|
69
|
-
if (
|
|
68
|
+
return Le;
|
|
69
|
+
if (xe(e)) {
|
|
70
70
|
var d = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
71
|
-
e =
|
|
71
|
+
e = xe(d) ? d + "" : d;
|
|
72
72
|
}
|
|
73
73
|
if (typeof e != "string")
|
|
74
74
|
return e === 0 ? e : +e;
|
|
75
75
|
e = Gt(e);
|
|
76
|
-
var
|
|
77
|
-
return
|
|
76
|
+
var c = Ht.test(e);
|
|
77
|
+
return c || Ut.test(e) ? qt(e.slice(2), c ? 2 : 8) : zt.test(e) ? Le : +e;
|
|
78
78
|
}
|
|
79
|
-
var Jt = Xt, Qt =
|
|
80
|
-
function _t(e, d,
|
|
81
|
-
var
|
|
79
|
+
var Jt = Xt, Qt = De, me = dt, Ve = Jt, Yt = "Expected a function", Zt = Math.max, Kt = Math.min;
|
|
80
|
+
function _t(e, d, c) {
|
|
81
|
+
var f, m, S, y, h, v, L = 0, C = !1, b = !1, P = !0;
|
|
82
82
|
if (typeof e != "function")
|
|
83
83
|
throw new TypeError(Yt);
|
|
84
|
-
d =
|
|
84
|
+
d = Ve(d) || 0, Qt(c) && (C = !!c.leading, b = "maxWait" in c, S = b ? Zt(Ve(c.maxWait) || 0, d) : S, P = "trailing" in c ? !!c.trailing : P);
|
|
85
85
|
function p(i) {
|
|
86
|
-
var u =
|
|
87
|
-
return
|
|
86
|
+
var u = f, $ = m;
|
|
87
|
+
return f = m = void 0, L = i, y = e.apply($, u), y;
|
|
88
88
|
}
|
|
89
89
|
function g(i) {
|
|
90
|
-
return L = i, h = setTimeout(D, d),
|
|
90
|
+
return L = i, h = setTimeout(D, d), C ? p(i) : y;
|
|
91
91
|
}
|
|
92
92
|
function R(i) {
|
|
93
|
-
var u = i - v, $ = i - L,
|
|
94
|
-
return b ? Kt(
|
|
93
|
+
var u = i - v, $ = i - L, B = d - u;
|
|
94
|
+
return b ? Kt(B, S - $) : B;
|
|
95
95
|
}
|
|
96
96
|
function E(i) {
|
|
97
97
|
var u = i - v, $ = i - L;
|
|
98
|
-
return v === void 0 || u >= d || u < 0 || b && $ >=
|
|
98
|
+
return v === void 0 || u >= d || u < 0 || b && $ >= S;
|
|
99
99
|
}
|
|
100
100
|
function D() {
|
|
101
101
|
var i = me();
|
|
102
102
|
if (E(i))
|
|
103
|
-
return
|
|
103
|
+
return O(i);
|
|
104
104
|
h = setTimeout(D, R(i));
|
|
105
105
|
}
|
|
106
|
-
function
|
|
107
|
-
return h = void 0, P &&
|
|
106
|
+
function O(i) {
|
|
107
|
+
return h = void 0, P && f ? p(i) : (f = m = void 0, y);
|
|
108
108
|
}
|
|
109
109
|
function I() {
|
|
110
|
-
h !== void 0 && clearTimeout(h), L = 0,
|
|
110
|
+
h !== void 0 && clearTimeout(h), L = 0, f = v = m = h = void 0;
|
|
111
111
|
}
|
|
112
112
|
function M() {
|
|
113
|
-
return h === void 0 ? y :
|
|
113
|
+
return h === void 0 ? y : O(me());
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function T() {
|
|
116
116
|
var i = me(), u = E(i);
|
|
117
|
-
if (
|
|
117
|
+
if (f = arguments, m = this, v = i, u) {
|
|
118
118
|
if (h === void 0)
|
|
119
119
|
return g(v);
|
|
120
120
|
if (b)
|
|
@@ -122,21 +122,21 @@ function _t(e, d, f) {
|
|
|
122
122
|
}
|
|
123
123
|
return h === void 0 && (h = setTimeout(D, d)), y;
|
|
124
124
|
}
|
|
125
|
-
return
|
|
125
|
+
return T.cancel = I, T.flush = M, T;
|
|
126
126
|
}
|
|
127
127
|
var el = _t;
|
|
128
|
-
const tl = /* @__PURE__ */ tt(el), ll = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|%)$/.test(e), te = (e) => typeof e == "string" && ll(e) ? e : e + "px", al = (e, d,
|
|
129
|
-
const y =
|
|
128
|
+
const tl = /* @__PURE__ */ tt(el), ll = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|%)$/.test(e), te = (e) => typeof e == "string" && ll(e) ? e : e + "px", al = (e, d, c, f, m, S) => {
|
|
129
|
+
const y = N(null), h = N(null), v = Je(), L = N(), C = N(!1), b = N(""), P = N(""), p = k(() => e.mode === "multiple" || e.mode === "tags"), g = {
|
|
130
130
|
label: "name",
|
|
131
131
|
children: "children",
|
|
132
132
|
pathName: "pathName",
|
|
133
133
|
disabled: "disabled",
|
|
134
|
-
...
|
|
134
|
+
...f.props ?? {}
|
|
135
135
|
}, R = He.value === "zh-CN" ? "," : ", ", E = (t) => {
|
|
136
136
|
if (typeof t != "string") return !1;
|
|
137
137
|
const o = t.trim();
|
|
138
138
|
return o ? /^\d+$/.test(o) : !1;
|
|
139
|
-
}, D = (t) => typeof t == "number" || E(t),
|
|
139
|
+
}, D = (t) => typeof t == "number" || E(t), O = (t) => typeof t != "string" ? !1 : t.trim() !== "", I = k({
|
|
140
140
|
get: () => e.keyword || "",
|
|
141
141
|
set: (t) => {
|
|
142
142
|
d("update:keyword", t);
|
|
@@ -146,13 +146,13 @@ const tl = /* @__PURE__ */ tt(el), ll = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
146
146
|
set: (t) => {
|
|
147
147
|
d("update:path", t);
|
|
148
148
|
}
|
|
149
|
-
}),
|
|
149
|
+
}), T = (t, o, s = []) => {
|
|
150
150
|
for (let l = 0; l < t.length; l++) {
|
|
151
151
|
const r = t[l], n = r[g.label];
|
|
152
152
|
if (s.push(n), n === o) return s.join("/");
|
|
153
153
|
if (r.children && r.children.length > 0) {
|
|
154
|
-
const
|
|
155
|
-
if (
|
|
154
|
+
const w = T(r[g.children], o, s);
|
|
155
|
+
if (w) return w;
|
|
156
156
|
}
|
|
157
157
|
s.pop();
|
|
158
158
|
}
|
|
@@ -162,38 +162,38 @@ const tl = /* @__PURE__ */ tt(el), ll = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
162
162
|
let t = [], o = [];
|
|
163
163
|
return m.value ? o = ((s = v.value) == null ? void 0 : s.lazyData) || [] : e.data && (o = _e(e.data, g.children) || []), o.length && (t = o.map((l) => ({
|
|
164
164
|
...l,
|
|
165
|
-
[g.pathName]: l[g.pathName] ? l[g.pathName] : m.value ? l[g.label] :
|
|
165
|
+
[g.pathName]: l[g.pathName] ? l[g.pathName] : m.value ? l[g.label] : T(e.data, l[g.label])
|
|
166
166
|
}))), t;
|
|
167
167
|
}), u = k({
|
|
168
168
|
get: () => {
|
|
169
169
|
const t = e.modelValue;
|
|
170
|
-
return t === "" || t === null || t === void 0 ? void 0 : (p.value || i.value.find((s) => (s == null ? void 0 : s[
|
|
170
|
+
return t === "" || t === null || t === void 0 ? void 0 : (p.value || i.value.find((s) => (s == null ? void 0 : s[c.value]) === t), t);
|
|
171
171
|
},
|
|
172
172
|
set: (t) => {
|
|
173
173
|
d("update:modelValue", t);
|
|
174
174
|
}
|
|
175
|
-
}), $ =
|
|
175
|
+
}), $ = N(""), B = N(!0), z = () => {
|
|
176
176
|
var t;
|
|
177
177
|
if (!e.showTextStrict || !m.value || e.parentLinkChildrenStrictly) return !0;
|
|
178
|
-
if (i.value.length === 0) return
|
|
178
|
+
if (i.value.length === 0) return O(e.modelValue);
|
|
179
179
|
if (p.value) {
|
|
180
180
|
if (!u.value || !((t = u.value) != null && t.length)) return !0;
|
|
181
|
-
const o = i.value.map((n) => n[
|
|
181
|
+
const o = i.value.map((n) => n[c.value]), s = Array.isArray(u.value) ? u.value : [], l = s.some((n) => O(n)), r = s.some((n) => D(n) && o.includes(n));
|
|
182
182
|
return l || r;
|
|
183
183
|
} else
|
|
184
|
-
return !u.value || i.value.find((s) => s[
|
|
184
|
+
return !u.value || i.value.find((s) => s[c.value] === u.value) ? !0 : O(e.modelValue);
|
|
185
185
|
};
|
|
186
186
|
ye(
|
|
187
187
|
() => [i.value, u.value],
|
|
188
188
|
([t, o]) => {
|
|
189
|
-
if (
|
|
189
|
+
if (B.value = !z(), !B.value)
|
|
190
190
|
if (p.value)
|
|
191
191
|
if (!Array.isArray(o) || !o.length)
|
|
192
192
|
$.value = "";
|
|
193
193
|
else {
|
|
194
194
|
const l = (o ?? []).map((r) => {
|
|
195
|
-
var
|
|
196
|
-
const n = (
|
|
195
|
+
var w;
|
|
196
|
+
const n = (w = t == null ? void 0 : t.find) == null ? void 0 : w.call(t, (F) => (F == null ? void 0 : F[c.value]) === r);
|
|
197
197
|
return n ? e.showFullPath ? n == null ? void 0 : n[g.pathName] : n == null ? void 0 : n[g.label] : D(r) || r == null ? "" : String(r);
|
|
198
198
|
}).filter((r) => !!r);
|
|
199
199
|
$.value = l.join(R);
|
|
@@ -201,7 +201,7 @@ const tl = /* @__PURE__ */ tt(el), ll = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
201
201
|
else if (!o)
|
|
202
202
|
$.value = "";
|
|
203
203
|
else {
|
|
204
|
-
const s = t == null ? void 0 : t.find((l) => l[
|
|
204
|
+
const s = t == null ? void 0 : t.find((l) => l[c.value] === o);
|
|
205
205
|
s ? $.value = e.showFullPath ? s[g.pathName] : s[g.label] : $.value = e.modelValue === null || e.modelValue === void 0 ? "" : String(e.modelValue);
|
|
206
206
|
}
|
|
207
207
|
},
|
|
@@ -216,36 +216,36 @@ const tl = /* @__PURE__ */ tt(el), ll = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
216
216
|
var t;
|
|
217
217
|
I.value = "", (t = v.value) == null || t.searchClear(), d("visible-change", !1);
|
|
218
218
|
}, le = tl(() => {
|
|
219
|
-
e.disabled || e.isView || (
|
|
219
|
+
e.disabled || e.isView || (C.value ? C.value = !1 : (document.body.click(), C.value = !0));
|
|
220
220
|
}, 200), A = async () => {
|
|
221
221
|
var o, s;
|
|
222
222
|
await _();
|
|
223
223
|
let t = [];
|
|
224
|
-
if (p.value || (u.value || u.value === 0) && (m.value && D(u.value) && await ((o = v.value) == null ? void 0 : o.lazyDataNextTick(u.value)), t = i.value.filter((l) => l[
|
|
224
|
+
if (p.value || (u.value || u.value === 0) && (m.value && D(u.value) && await ((o = v.value) == null ? void 0 : o.lazyDataNextTick(u.value)), t = i.value.filter((l) => l[c.value] === u.value)), p.value && (u.value || u.value.length)) {
|
|
225
225
|
const r = (Array.isArray(u.value) ? u.value : []).filter((n) => D(n));
|
|
226
|
-
m.value && r.length && await ((s = v.value) == null ? void 0 : s.lazyDataNextTick(r)), t = i.value.filter((n) => r.includes(n[
|
|
226
|
+
m.value && r.length && await ((s = v.value) == null ? void 0 : s.lazyDataNextTick(r)), t = i.value.filter((n) => r.includes(n[c.value]));
|
|
227
227
|
}
|
|
228
228
|
d("change", u.value, t);
|
|
229
|
-
}, W =
|
|
230
|
-
|
|
229
|
+
}, W = N(!1), ae = async () => {
|
|
230
|
+
C.value = !1, u.value = p.value ? [] : "", A(), W.value = !0;
|
|
231
231
|
}, re = async (t) => {
|
|
232
|
-
var s, l, r, n,
|
|
232
|
+
var s, l, r, n, w, F;
|
|
233
233
|
if (W.value || !p.value) return;
|
|
234
|
-
if (!i.value.find((V) => (V == null ? void 0 : V[
|
|
234
|
+
if (!i.value.find((V) => (V == null ? void 0 : V[c.value]) === t)) {
|
|
235
235
|
A();
|
|
236
236
|
return;
|
|
237
237
|
}
|
|
238
|
-
if (!m.value && !
|
|
238
|
+
if (!m.value && !S.value) {
|
|
239
239
|
let V = (l = (s = v.value) == null ? void 0 : s.treeRef) == null ? void 0 : l.getNode(t);
|
|
240
240
|
V.checked = !1, (r = v.value) == null || r.childLinkParent(V, V.checked), (n = v.value) == null || n.parentLinkChild(V, V.checked);
|
|
241
241
|
}
|
|
242
242
|
if (m.value && e.parentLinkChildrenStrictly) {
|
|
243
|
-
let V = i.value.find((U) => U[
|
|
244
|
-
if (V && ((
|
|
243
|
+
let V = i.value.find((U) => U[c.value] === t);
|
|
244
|
+
if (V && ((w = v.value) != null && w.getGrandChildrenFn)) {
|
|
245
245
|
const U = await v.value.getGrandChildrenFn(V);
|
|
246
246
|
if (U && U.length) {
|
|
247
|
-
const
|
|
248
|
-
u.value && ((F = u.value) != null && F.length) && (u.value = u.value.filter((
|
|
247
|
+
const Ie = U.map((fe) => fe[c.value]);
|
|
248
|
+
u.value && ((F = u.value) != null && F.length) && (u.value = u.value.filter((fe) => !Ie.includes(fe)));
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
251
|
}
|
|
@@ -253,10 +253,10 @@ const tl = /* @__PURE__ */ tt(el), ll = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
253
253
|
}, ne = (t) => {
|
|
254
254
|
if (!e.filter) return;
|
|
255
255
|
const o = t && (t == null ? void 0 : t.trim());
|
|
256
|
-
I.value = o,
|
|
256
|
+
I.value = o, C.value || (C.value = !0);
|
|
257
257
|
}, oe = () => {
|
|
258
258
|
var t, o;
|
|
259
|
-
p.value || (
|
|
259
|
+
p.value || (C.value = !1, e.filter && ((o = (t = h.value) == null ? void 0 : t.$select) == null || o.focus()));
|
|
260
260
|
}, H = () => y != null && y.value && y.value.offsetWidth ? y.value.offsetWidth + "px" : "100%", G = () => {
|
|
261
261
|
_(() => {
|
|
262
262
|
b.value = e.width ? te(e.width) : H(), P.value = e.poppverWidth ? te(e.poppverWidth) : H();
|
|
@@ -268,17 +268,17 @@ const tl = /* @__PURE__ */ tt(el), ll = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
268
268
|
d("blur", t);
|
|
269
269
|
};
|
|
270
270
|
ye(
|
|
271
|
-
() =>
|
|
271
|
+
() => C.value,
|
|
272
272
|
(t) => {
|
|
273
273
|
var s, l;
|
|
274
274
|
const o = (s = y.value) == null ? void 0 : s.querySelector(".ant-select-arrow>.das-icon");
|
|
275
275
|
t ? o.style.transform = "rotate(180deg)" : o.style.transform = "", (l = h.value) == null || l.toChangeMaxCount(t), _(() => {
|
|
276
|
-
var r, n,
|
|
277
|
-
(
|
|
276
|
+
var r, n, w;
|
|
277
|
+
(w = (n = (r = a(L)) == null ? void 0 : r.popperRef) == null ? void 0 : n.popperInstanceRef) == null || w.update();
|
|
278
278
|
});
|
|
279
279
|
}
|
|
280
280
|
);
|
|
281
|
-
const K =
|
|
281
|
+
const K = N(null), ue = () => new Promise((t) => {
|
|
282
282
|
const o = () => {
|
|
283
283
|
var l;
|
|
284
284
|
const s = (l = y.value) == null ? void 0 : l.querySelector(".ant-select-selector");
|
|
@@ -289,7 +289,7 @@ const tl = /* @__PURE__ */ tt(el), ll = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
289
289
|
}), de = (t) => {
|
|
290
290
|
u.value = t;
|
|
291
291
|
};
|
|
292
|
-
return
|
|
292
|
+
return Oe(async () => {
|
|
293
293
|
G();
|
|
294
294
|
const t = await ue();
|
|
295
295
|
t && (K.value = Ke((o) => {
|
|
@@ -322,13 +322,13 @@ const tl = /* @__PURE__ */ tt(el), ll = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
322
322
|
deselect: re,
|
|
323
323
|
selectSearch: ne,
|
|
324
324
|
selectClear: ae,
|
|
325
|
-
popoverVisible:
|
|
325
|
+
popoverVisible: C,
|
|
326
326
|
selectMouseDown: le,
|
|
327
327
|
resetDefaultVal: de,
|
|
328
328
|
focus: ie,
|
|
329
329
|
blur: se,
|
|
330
330
|
checkselectOptionsData: z,
|
|
331
|
-
textHide:
|
|
331
|
+
textHide: B,
|
|
332
332
|
showCheckbox: p
|
|
333
333
|
};
|
|
334
334
|
}, rl = {
|
|
@@ -337,7 +337,7 @@ const tl = /* @__PURE__ */ tt(el), ll = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
337
337
|
}, nl = {
|
|
338
338
|
name: "DasTreeSelect",
|
|
339
339
|
inheritAttrs: !1
|
|
340
|
-
}, ol = /* @__PURE__ */
|
|
340
|
+
}, ol = /* @__PURE__ */ Re({
|
|
341
341
|
...nl,
|
|
342
342
|
props: {
|
|
343
343
|
data: { default: () => [] },
|
|
@@ -356,6 +356,7 @@ const tl = /* @__PURE__ */ tt(el), ll = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
356
356
|
selectAttrs: {},
|
|
357
357
|
width: {},
|
|
358
358
|
poppverWidth: {},
|
|
359
|
+
popoverOffset: { default: 12 },
|
|
359
360
|
poppverHeight: { default: 320 },
|
|
360
361
|
poppverMaxHeight: {},
|
|
361
362
|
filter: { type: Boolean, default: !0 },
|
|
@@ -373,22 +374,22 @@ const tl = /* @__PURE__ */ tt(el), ll = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
373
374
|
virtual: { type: Boolean, default: !1 }
|
|
374
375
|
},
|
|
375
376
|
emits: ["update:modelValue", "update:path", "update:keyword", "change", "focus", "blur", "visible-change"],
|
|
376
|
-
setup(e, { expose: d, emit:
|
|
377
|
-
const
|
|
377
|
+
setup(e, { expose: d, emit: c }) {
|
|
378
|
+
const f = e, m = c, S = Ee(), y = k(() => f.placeholder || Ue("请选择")), h = k(() => S.nodeKey ?? S["node-key"] ?? "id"), v = k(() => f.load ?? void 0), L = k(() => f.search ?? void 0), C = k(() => f.getGrandChildren ?? void 0), b = k(() => S.lazy ?? !!v.value), P = k(() => b.value ? !1 : f.defaultExpandAll), p = k(() => f.selectAttrs ? f.selectAttrs : {}), g = k(() => !!(f.disabled || f.isView)), R = k(() => f.parentLinkChildrenStrictly || f.childLinkParentStrictly ? !0 : !!(f.checkStrictly ?? b.value)), E = {
|
|
378
379
|
fn: () => {
|
|
379
380
|
G.value = !1;
|
|
380
381
|
}
|
|
381
382
|
}, D = (l) => {
|
|
382
383
|
l.key === "Enter" && l.stopPropagation();
|
|
383
384
|
}, {
|
|
384
|
-
dasTreeSelectRef:
|
|
385
|
+
dasTreeSelectRef: O,
|
|
385
386
|
$tree: I,
|
|
386
387
|
$select: M,
|
|
387
|
-
innerValue:
|
|
388
|
+
innerValue: T,
|
|
388
389
|
innerKeyword: i,
|
|
389
390
|
realWidth: u,
|
|
390
391
|
poppverContentStyle: $,
|
|
391
|
-
realPoppverWidth:
|
|
392
|
+
realPoppverWidth: B,
|
|
392
393
|
treeChange: z,
|
|
393
394
|
nodeChange: Q,
|
|
394
395
|
treePath: Y,
|
|
@@ -409,7 +410,7 @@ const tl = /* @__PURE__ */ tt(el), ll = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
409
410
|
textHide: de,
|
|
410
411
|
checkselectOptionsData: t,
|
|
411
412
|
showCheckbox: o
|
|
412
|
-
} = al(
|
|
413
|
+
} = al(f, m, h, S, b, R), s = k(() => p.value.isTooltip ? p.value.isTooltip && t() : p.value["is-tooltip"] ? p.value["is-tooltip"] && t() : t());
|
|
413
414
|
return d({
|
|
414
415
|
/** das-select */
|
|
415
416
|
$select: M,
|
|
@@ -417,31 +418,33 @@ const tl = /* @__PURE__ */ tt(el), ll = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
417
418
|
$tree: I,
|
|
418
419
|
/** 设置默认值,当默认值为动态设置时使用(兼容老版本) */
|
|
419
420
|
resetDefaultVal: ie
|
|
420
|
-
}), (l, r) => be((q(),
|
|
421
|
+
}), (l, r) => be((q(), ce(
|
|
421
422
|
"div",
|
|
422
423
|
{
|
|
423
424
|
ref_key: "dasTreeSelectRef",
|
|
424
|
-
ref:
|
|
425
|
-
class:
|
|
425
|
+
ref: O,
|
|
426
|
+
class: Me({ "das-ui-tree-select": !0, "is-lazy": b.value, "text-hide": a(de), "show-select": e.showSelectDom }),
|
|
426
427
|
style: ge({ width: a(u) })
|
|
427
428
|
},
|
|
428
429
|
[
|
|
429
|
-
|
|
430
|
+
ke(` 在使用 2.x 版本的element-UI时,里面的Popover气泡卡片组件,有自带的自动适应位置的功能;在 element plus 中,直接使用,已经无法自适应气泡弹窗的位置了;需要自行配置:fallback-placements="['bottom', 'top', 'right', 'left']" `),
|
|
431
|
+
ke(" 园区楼栋选择器通过该间距与相邻选择框对齐。 "),
|
|
430
432
|
ve(a(ze), {
|
|
431
433
|
ref_key: "popoverRef",
|
|
432
434
|
ref: W,
|
|
433
435
|
visible: a(G),
|
|
434
436
|
"popper-class": "das-tree-select-popper",
|
|
435
437
|
placement: "bottom-start",
|
|
438
|
+
offset: Number(a(S)["popover-offset"] ?? a(S).popoverOffset ?? f.popoverOffset),
|
|
436
439
|
"show-arrow": !1,
|
|
437
|
-
width: a(
|
|
440
|
+
width: a(B),
|
|
438
441
|
disabled: g.value,
|
|
439
442
|
"fallback-placements": ["bottom", "top", "right", "left"],
|
|
440
443
|
onShow: a(re),
|
|
441
444
|
onHide: a(ne)
|
|
442
445
|
}, {
|
|
443
446
|
reference: x(() => [
|
|
444
|
-
e.showSelectDom ? (q(),
|
|
447
|
+
e.showSelectDom ? (q(), ce(
|
|
445
448
|
"div",
|
|
446
449
|
{
|
|
447
450
|
key: 0,
|
|
@@ -458,8 +461,8 @@ const tl = /* @__PURE__ */ tt(el), ll = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
458
461
|
ref: M,
|
|
459
462
|
class: { "is-active": a(G) },
|
|
460
463
|
dropdownClassName: "das-tree-select-dropdown",
|
|
461
|
-
modelValue: a(
|
|
462
|
-
"onUpdate:modelValue": r[0] || (r[0] = (n) => X(
|
|
464
|
+
modelValue: a(T),
|
|
465
|
+
"onUpdate:modelValue": r[0] || (r[0] = (n) => X(T) ? T.value = n : null)
|
|
463
466
|
}, p.value, {
|
|
464
467
|
searchValue: a(i),
|
|
465
468
|
options: a(le),
|
|
@@ -502,7 +505,7 @@ const tl = /* @__PURE__ */ tt(el), ll = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
502
505
|
],
|
|
503
506
|
32
|
|
504
507
|
/* NEED_HYDRATION */
|
|
505
|
-
)) : be((q(),
|
|
508
|
+
)) : be((q(), ce("div", rl, [
|
|
506
509
|
Ae(
|
|
507
510
|
We(a(A)),
|
|
508
511
|
1
|
|
@@ -524,14 +527,14 @@ const tl = /* @__PURE__ */ tt(el), ll = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
524
527
|
}, ["stop"]))
|
|
525
528
|
},
|
|
526
529
|
[
|
|
527
|
-
e.virtual ? (q(),
|
|
530
|
+
e.virtual ? (q(), Se(a(Xe), pe({
|
|
528
531
|
key: 1,
|
|
529
532
|
ref_key: "$tree",
|
|
530
533
|
ref: I
|
|
531
|
-
}, a(
|
|
534
|
+
}, a(S), {
|
|
532
535
|
data: e.data,
|
|
533
|
-
modelValue: a(
|
|
534
|
-
"onUpdate:modelValue": r[4] || (r[4] = (n) => X(
|
|
536
|
+
modelValue: a(T),
|
|
537
|
+
"onUpdate:modelValue": r[4] || (r[4] = (n) => X(T) ? T.value = n : null),
|
|
535
538
|
"filter-value": a(i),
|
|
536
539
|
"onUpdate:filterValue": r[5] || (r[5] = (n) => X(i) ? i.value = n : null),
|
|
537
540
|
"show-checkbox": a(o),
|
|
@@ -540,21 +543,21 @@ const tl = /* @__PURE__ */ tt(el), ll = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
540
543
|
"filter-mode": "input",
|
|
541
544
|
lazy: b.value,
|
|
542
545
|
load: v.value,
|
|
543
|
-
"batch-load":
|
|
546
|
+
"batch-load": f.batchLoad,
|
|
544
547
|
search: L.value,
|
|
545
548
|
path: a(Y),
|
|
546
549
|
"default-expand-all": P.value,
|
|
547
550
|
"check-strictly": b.value ? !0 : R.value,
|
|
548
551
|
parentLinkChildrenStrictly: e.parentLinkChildrenStrictly,
|
|
549
|
-
getGrandChildren:
|
|
552
|
+
getGrandChildren: C.value,
|
|
550
553
|
childLinkParentStrictly: e.childLinkParentStrictly,
|
|
551
554
|
onChange: a(z),
|
|
552
555
|
onNodeChange: a(Q)
|
|
553
|
-
}),
|
|
554
|
-
default: x(({ node: n, data:
|
|
555
|
-
|
|
556
|
+
}), Te({
|
|
557
|
+
default: x(({ node: n, data: w }) => [
|
|
558
|
+
j(l.$slots, "default", {
|
|
556
559
|
node: n,
|
|
557
|
-
data:
|
|
560
|
+
data: w
|
|
558
561
|
})
|
|
559
562
|
]),
|
|
560
563
|
_: 2
|
|
@@ -563,39 +566,39 @@ const tl = /* @__PURE__ */ tt(el), ll = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
563
566
|
l.$slots.prefix ? {
|
|
564
567
|
name: "prefix",
|
|
565
568
|
fn: x(() => [
|
|
566
|
-
|
|
569
|
+
j(l.$slots, "prefix")
|
|
567
570
|
]),
|
|
568
571
|
key: "0"
|
|
569
572
|
} : void 0,
|
|
570
573
|
l.$slots.suffix ? {
|
|
571
574
|
name: "suffix",
|
|
572
575
|
fn: x(() => [
|
|
573
|
-
|
|
576
|
+
j(l.$slots, "suffix")
|
|
574
577
|
]),
|
|
575
578
|
key: "1"
|
|
576
579
|
} : void 0,
|
|
577
580
|
l.$slots.prepend ? {
|
|
578
581
|
name: "prepend",
|
|
579
582
|
fn: x(() => [
|
|
580
|
-
|
|
583
|
+
j(l.$slots, "prepend")
|
|
581
584
|
]),
|
|
582
585
|
key: "2"
|
|
583
586
|
} : void 0,
|
|
584
587
|
l.$slots.append ? {
|
|
585
588
|
name: "append",
|
|
586
589
|
fn: x(() => [
|
|
587
|
-
|
|
590
|
+
j(l.$slots, "append")
|
|
588
591
|
]),
|
|
589
592
|
key: "3"
|
|
590
593
|
} : void 0
|
|
591
|
-
]), 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"])) : (q(),
|
|
594
|
+
]), 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"])) : (q(), Se(a(Qe), pe({
|
|
592
595
|
key: 0,
|
|
593
596
|
ref_key: "$tree",
|
|
594
597
|
ref: I
|
|
595
|
-
}, a(
|
|
598
|
+
}, a(S), {
|
|
596
599
|
data: e.data,
|
|
597
|
-
modelValue: a(
|
|
598
|
-
"onUpdate:modelValue": r[2] || (r[2] = (n) => X(
|
|
600
|
+
modelValue: a(T),
|
|
601
|
+
"onUpdate:modelValue": r[2] || (r[2] = (n) => X(T) ? T.value = n : null),
|
|
599
602
|
"filter-value": a(i),
|
|
600
603
|
"onUpdate:filterValue": r[3] || (r[3] = (n) => X(i) ? i.value = n : null),
|
|
601
604
|
"show-checkbox": a(o),
|
|
@@ -604,21 +607,21 @@ const tl = /* @__PURE__ */ tt(el), ll = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
604
607
|
"filter-mode": "input",
|
|
605
608
|
lazy: b.value,
|
|
606
609
|
load: v.value,
|
|
607
|
-
"batch-load":
|
|
610
|
+
"batch-load": f.batchLoad,
|
|
608
611
|
search: L.value,
|
|
609
612
|
path: a(Y),
|
|
610
613
|
"default-expand-all": P.value,
|
|
611
614
|
"check-strictly": b.value ? !0 : R.value,
|
|
612
615
|
parentLinkChildrenStrictly: e.parentLinkChildrenStrictly,
|
|
613
|
-
getGrandChildren:
|
|
616
|
+
getGrandChildren: C.value,
|
|
614
617
|
childLinkParentStrictly: e.childLinkParentStrictly,
|
|
615
618
|
onChange: a(z),
|
|
616
619
|
onNodeChange: a(Q)
|
|
617
|
-
}),
|
|
618
|
-
default: x(({ node: n, data:
|
|
619
|
-
|
|
620
|
+
}), Te({
|
|
621
|
+
default: x(({ node: n, data: w }) => [
|
|
622
|
+
j(l.$slots, "default", {
|
|
620
623
|
node: n,
|
|
621
|
-
data:
|
|
624
|
+
data: w
|
|
622
625
|
})
|
|
623
626
|
]),
|
|
624
627
|
_: 2
|
|
@@ -627,28 +630,28 @@ const tl = /* @__PURE__ */ tt(el), ll = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
627
630
|
l.$slots.prefix ? {
|
|
628
631
|
name: "prefix",
|
|
629
632
|
fn: x(() => [
|
|
630
|
-
|
|
633
|
+
j(l.$slots, "prefix")
|
|
631
634
|
]),
|
|
632
635
|
key: "0"
|
|
633
636
|
} : void 0,
|
|
634
637
|
l.$slots.suffix ? {
|
|
635
638
|
name: "suffix",
|
|
636
639
|
fn: x(() => [
|
|
637
|
-
|
|
640
|
+
j(l.$slots, "suffix")
|
|
638
641
|
]),
|
|
639
642
|
key: "1"
|
|
640
643
|
} : void 0,
|
|
641
644
|
l.$slots.prepend ? {
|
|
642
645
|
name: "prepend",
|
|
643
646
|
fn: x(() => [
|
|
644
|
-
|
|
647
|
+
j(l.$slots, "prepend")
|
|
645
648
|
]),
|
|
646
649
|
key: "2"
|
|
647
650
|
} : void 0,
|
|
648
651
|
l.$slots.append ? {
|
|
649
652
|
name: "append",
|
|
650
653
|
fn: x(() => [
|
|
651
|
-
|
|
654
|
+
j(l.$slots, "append")
|
|
652
655
|
]),
|
|
653
656
|
key: "3"
|
|
654
657
|
} : void 0
|
|
@@ -660,7 +663,7 @@ const tl = /* @__PURE__ */ tt(el), ll = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
660
663
|
]),
|
|
661
664
|
_: 3
|
|
662
665
|
/* FORWARDED */
|
|
663
|
-
}, 8, ["visible", "width", "disabled", "onShow", "onHide"])
|
|
666
|
+
}, 8, ["visible", "offset", "width", "disabled", "onShow", "onHide"])
|
|
664
667
|
],
|
|
665
668
|
6
|
|
666
669
|
/* CLASS, STYLE */
|
|
@@ -668,7 +671,7 @@ const tl = /* @__PURE__ */ tt(el), ll = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|v
|
|
|
668
671
|
[a(et), E]
|
|
669
672
|
]);
|
|
670
673
|
}
|
|
671
|
-
}), kl = Fe(ol), Sl = () =>
|
|
674
|
+
}), kl = Fe(ol), Sl = () => N(null), Tl = { title: "tree-select 树选择" };
|
|
672
675
|
export {
|
|
673
676
|
kl as DasTreeSelect,
|
|
674
677
|
Sl as DasTreeSelectRef,
|
|
Binary file
|