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