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