@das-fed/upf-ui 6.4.0-dev.139 → 6.4.0-dev.140
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/components/input/index.js +153 -153
- 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/select/index.js +190 -190
- package/packages/components/select/index.js.gz +0 -0
- package/packages/components/select/style.css +1 -1
- package/packages/components/select/style.css.gz +0 -0
- package/packages/components/tree-v2/index.js +2 -1
- package/packages/components/tree-v2/index.js.gz +0 -0
- package/packages/components/edit-table/src/index.vue.d.ts +0 -4207
- package/packages/components/table/index.d.ts +0 -7208
- package/packages/components/table/src/Table.vue.d.ts +0 -2129
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import '@das-fed/upf-ui/packages/components/select/style.css';
|
|
2
|
-
import { withInstall as
|
|
3
|
-
import { defineComponent as
|
|
4
|
-
import { Select as ml, Tag as
|
|
5
|
-
import { DasCheckbox as
|
|
2
|
+
import { withInstall as Me } from "@das-fed/upf-utils/with-install/index";
|
|
3
|
+
import { defineComponent as $e, useCssVars as ul, computed as d, ref as n, watch as G, useSlots as il, onMounted as de, onUnmounted as Ne, watchEffect as ce, nextTick as T, resolveComponent as dl, createElementBlock as g, openBlock as v, normalizeStyle as H, normalizeClass as cl, createVNode as y, withDirectives as ve, createCommentVNode as k, createElementVNode as h, unref as r, createBlock as Z, mergeProps as he, withModifiers as J, isRef as vl, createSlots as fl, withCtx as p, renderSlot as C, normalizeProps as Q, guardReactiveProps as Y, withKeys as pl, toDisplayString as W, createTextVNode as fe, Fragment as pe } from "vue";
|
|
4
|
+
import { Select as ml, Tag as me } from "ant-design-vue";
|
|
5
|
+
import { DasCheckbox as ze } from "@das-fed/upf-ui/packages/components/checkbox/index";
|
|
6
6
|
import { vScrollbar as hl } from "@das-fed/upf-ui/packages/components/scrollbar/index";
|
|
7
7
|
import { DasTooltip as bl } from "@das-fed/upf-ui/packages/components/tooltip/index";
|
|
8
|
-
import { vDasTooltip as
|
|
8
|
+
import { vDasTooltip as Le } from "@das-fed/upf-ui/packages/components/text-tooltip/index";
|
|
9
9
|
import { DasInput as gl } from "@das-fed/upf-ui/packages/components/input/index";
|
|
10
10
|
import { DasIconXiala as yl } from "@das-fed/upf-ui/packages/icons/xiala/index";
|
|
11
11
|
import { DasIconEmpty as Cl } from "@das-fed/upf-ui/packages/icons/empty/index";
|
|
12
12
|
import { DasErrorOverlayModel as wl } from "@das-fed/upf-ui/packages/components/error-overlay-model/index";
|
|
13
13
|
import { vHoverInside as xl } from "@das-fed/upf-utils/directive";
|
|
14
|
-
import { getVarValue as Tl, getVar as
|
|
14
|
+
import { getVarValue as Tl, getVar as _e, setThemeRule as kl } from "@das-fed/upf-web/packages/theme/index";
|
|
15
15
|
import { t as P, currentLang as Il, setI18nRule as Sl } from "@das-fed/upf-web/packages/i18n/index";
|
|
16
16
|
import { useZIndex as Vl } from "@das-fed/upf-utils/hooks/popup-manager/use-zindex";
|
|
17
17
|
import { useModelValue as Nl } from "@das-fed/upf-utils/vue";
|
|
@@ -22,12 +22,12 @@ import { SelectOption as Ll } from "ant-design-vue/es";
|
|
|
22
22
|
const _l = { key: 0 }, Ml = { class: "das-multiple-option-item" }, $l = { style: { display: "inline-block" } }, Fl = { key: 0 }, Al = { key: 2 }, Bl = { style: { display: "inline-block" } }, Dl = ["innerHTML"], El = ["innerHTML"], Ol = {
|
|
23
23
|
key: 0,
|
|
24
24
|
class: "das-select-error-label-content das-select-label-content"
|
|
25
|
-
}, Wl = { class: "ant-select ant-select-multiple ant-select-selection-overflow-item ant-select-selection-overflow-item-rest" }, Pl = { class: "ant-select-selection-item" }, Rl = { class: "ant-select-selection-item-content" }, ql = ["innerHTML"], Hl =
|
|
25
|
+
}, Wl = { class: "ant-select ant-select-multiple ant-select-selection-overflow-item ant-select-selection-overflow-item-rest" }, Pl = { class: "ant-select-selection-item" }, Rl = { class: "ant-select-selection-item-content" }, ql = ["innerHTML"], Hl = $e({
|
|
26
26
|
inheritAttrs: !1,
|
|
27
27
|
components: {
|
|
28
28
|
VNodes: (I, { attrs: M }) => M.vnodes
|
|
29
29
|
}
|
|
30
|
-
}), Zl = /* @__PURE__ */
|
|
30
|
+
}), Zl = /* @__PURE__ */ $e({
|
|
31
31
|
...Hl,
|
|
32
32
|
__name: "Select",
|
|
33
33
|
props: {
|
|
@@ -67,32 +67,32 @@ const _l = { key: 0 }, Ml = { class: "das-multiple-option-item" }, $l = { style:
|
|
|
67
67
|
emits: ["update:model-value", "change", "focus", "blur", "dropdownVisibleChange", "addCustomItem"],
|
|
68
68
|
setup(I, { expose: M, emit: $ }) {
|
|
69
69
|
ul((e) => ({
|
|
70
|
-
"
|
|
71
|
-
|
|
70
|
+
"560dba4c": Re.value,
|
|
71
|
+
"9f4782da": qe.value
|
|
72
72
|
}));
|
|
73
73
|
const l = I, w = $, s = Nl(l, "modelValue"), ee = d(() => {
|
|
74
74
|
var e;
|
|
75
75
|
return `<span class='key'>${((e = s.value) == null ? void 0 : e.length) ?? 0}</span>`;
|
|
76
|
-
}), F = n(null),
|
|
76
|
+
}), F = n(null), be = n(null), b = n(!1), K = d(() => l.isView ? l.noSetDefaultVal ? "" : "-" : l.placeholder || P("请选择")), Ae = d(() => F.value ? F.value.querySelector(".ant-select-selector") : null), A = n(0), B = n(0), Be = d(() => l.isTooltip && S.value ? !1 : !l.isTooltip || N.value || !Se.value || !ae.value), De = d(() => (Array.isArray(s.value) ? s.value.length : s.value) ? Se.value : K.value), ge = () => {
|
|
77
77
|
const e = l.size === "table" ? 12 : 14;
|
|
78
|
-
return zl(
|
|
79
|
-
},
|
|
80
|
-
var _;
|
|
81
|
-
const e = F.value.querySelector(".ant-select-selection-placeholder"), t = (
|
|
82
|
-
t && t.length && t.forEach((
|
|
78
|
+
return zl(K.value, e);
|
|
79
|
+
}, ye = () => {
|
|
80
|
+
var _, q, c;
|
|
81
|
+
const e = (_ = F.value) == null ? void 0 : _.querySelector(".ant-select-selection-placeholder"), t = (c = (q = x.value) == null ? void 0 : q.$el) == null ? void 0 : c.querySelectorAll(".ant-select-selection-item");
|
|
82
|
+
t && t.length && t.forEach((ie) => ie.removeAttribute("title"));
|
|
83
83
|
let a = (e == null ? void 0 : e.offsetWidth) ?? 0;
|
|
84
84
|
if (a === 0) return a;
|
|
85
|
-
const o = window.getComputedStyle(e, null),
|
|
86
|
-
return a -
|
|
85
|
+
const o = window.getComputedStyle(e, null), m = parseFloat(o.paddingRight), f = parseFloat(o.paddingLeft);
|
|
86
|
+
return a - m - f;
|
|
87
87
|
}, S = n(!1);
|
|
88
|
-
G(() => [
|
|
88
|
+
G(() => [K.value, s.value], () => {
|
|
89
89
|
T(() => {
|
|
90
|
-
B.value =
|
|
90
|
+
B.value = ye(), A.value = ge(), ((Array.isArray(s.value) ? s.value.length : s.value) || B.value === A.value || A.value - B.value < 1) && (S.value = !1);
|
|
91
91
|
});
|
|
92
92
|
}), G(
|
|
93
93
|
() => {
|
|
94
94
|
var e;
|
|
95
|
-
return (e =
|
|
95
|
+
return (e = be.value) == null ? void 0 : e.$tooltipRef.popperRef.contentRef;
|
|
96
96
|
},
|
|
97
97
|
(e) => {
|
|
98
98
|
e && (e.addEventListener("mouseenter", function() {
|
|
@@ -104,29 +104,29 @@ const _l = { key: 0 }, Ml = { class: "das-multiple-option-item" }, $l = { style:
|
|
|
104
104
|
}));
|
|
105
105
|
}
|
|
106
106
|
);
|
|
107
|
-
const
|
|
107
|
+
const Ce = n(null), we = d(() => l.dropdownMode ?? l.mode ?? ""), D = n(null), Ee = n(null), E = n(""), Oe = () => {
|
|
108
108
|
D.value = !0;
|
|
109
|
-
},
|
|
109
|
+
}, We = () => {
|
|
110
110
|
D.value = null;
|
|
111
|
-
},
|
|
111
|
+
}, xe = () => {
|
|
112
112
|
E.value && (w("addCustomItem", E.value), T(() => {
|
|
113
113
|
x.value.focus(), E.value = "";
|
|
114
114
|
}));
|
|
115
|
-
},
|
|
116
|
-
l.dropdownMode === "custom" && !
|
|
115
|
+
}, Te = il(), le = () => {
|
|
116
|
+
l.dropdownMode === "custom" && !Te.dropdownRender && (D.value = !1, T(() => {
|
|
117
117
|
D.value = null;
|
|
118
118
|
}));
|
|
119
119
|
};
|
|
120
|
-
|
|
120
|
+
de(() => {
|
|
121
121
|
document.addEventListener("click", le);
|
|
122
|
-
}),
|
|
122
|
+
}), Ne(() => {
|
|
123
123
|
document.removeEventListener("click", le);
|
|
124
124
|
});
|
|
125
|
-
const x = n(),
|
|
125
|
+
const x = n(), ke = n(), te = n(!1), oe = d(() => {
|
|
126
126
|
if (D.value !== null) return D.value;
|
|
127
127
|
if (l.open !== void 0) return l.open;
|
|
128
128
|
}), V = 1e6, u = n(100), i = n(100), N = n(!1), ae = n(!0), se = n(!1);
|
|
129
|
-
|
|
129
|
+
ce(() => {
|
|
130
130
|
s.value && l.mode == "combobox" && (ae.value = !0, setTimeout(() => {
|
|
131
131
|
var t;
|
|
132
132
|
let e = (t = x.value) == null ? void 0 : t.$el.querySelectorAll(".ant-select-selection-item");
|
|
@@ -136,80 +136,80 @@ const _l = { key: 0 }, Ml = { class: "das-multiple-option-item" }, $l = { style:
|
|
|
136
136
|
o.scrollWidth <= o.offsetWidth && (ae.value = !1), o.title = "";
|
|
137
137
|
}
|
|
138
138
|
}, 300));
|
|
139
|
-
}),
|
|
140
|
-
l.options && (
|
|
139
|
+
}), ce(() => {
|
|
140
|
+
l.options && (ke.value = l.options.map((e) => (e.title = e.title ? e.title : "", e)));
|
|
141
141
|
});
|
|
142
|
-
const
|
|
142
|
+
const Pe = () => {
|
|
143
143
|
setTimeout(async () => {
|
|
144
144
|
u.value = 100, await L(), u.value = i.value, b.value = !0;
|
|
145
145
|
}, 100);
|
|
146
146
|
};
|
|
147
|
-
|
|
148
|
-
se.value === !0 && l.mode != "combobox" && s.value && s.value.length > 0 && l.options.length > 0 && (se.value = !1,
|
|
149
|
-
}),
|
|
147
|
+
ce(() => {
|
|
148
|
+
se.value === !0 && l.mode != "combobox" && s.value && s.value.length > 0 && l.options.length > 0 && (se.value = !1, Pe());
|
|
149
|
+
}), de(() => {
|
|
150
150
|
se.value = !0, l.focusOpen || (i.value = 1, u.value = i.value, b.value = !0);
|
|
151
151
|
});
|
|
152
|
-
const
|
|
153
|
-
"z-index":
|
|
154
|
-
})),
|
|
152
|
+
const Re = d(() => l.width ? l.width : "230px"), qe = d(() => l.height ? l.height : "auto"), Ie = n(3e3), He = d(() => ({
|
|
153
|
+
"z-index": Ie.value
|
|
154
|
+
})), Se = d(() => {
|
|
155
155
|
var t;
|
|
156
156
|
let e = [];
|
|
157
157
|
if (l.mode != "combobox" && Array.isArray(s.value))
|
|
158
158
|
s.value.map((a) => {
|
|
159
|
-
var
|
|
160
|
-
let o = (
|
|
161
|
-
o && e.push(o[
|
|
159
|
+
var m;
|
|
160
|
+
let o = (m = l.options) == null ? void 0 : m.find((f) => f[z.value] == a);
|
|
161
|
+
o && e.push(o[U.value]);
|
|
162
162
|
});
|
|
163
163
|
else if (l.mode == "combobox" && s.value) {
|
|
164
164
|
let a = (t = l.options) == null ? void 0 : t.find((o) => o[z.value] == s.value);
|
|
165
|
-
a && e.push(a[
|
|
165
|
+
a && e.push(a[U.value]);
|
|
166
166
|
}
|
|
167
167
|
return Il.value === "zh-CN" ? e.join("、") : e.join(", ");
|
|
168
|
-
}),
|
|
168
|
+
}), Ze = d(() => {
|
|
169
169
|
var t;
|
|
170
170
|
if (l.mode === "combobox") return !1;
|
|
171
171
|
let e = l.options.filter((a) => !a.disabled);
|
|
172
172
|
return !!(Array.isArray(s.value) && ((t = s.value) == null ? void 0 : t.length) == e.length);
|
|
173
|
-
}),
|
|
173
|
+
}), Ke = d(() => {
|
|
174
174
|
var t, a;
|
|
175
175
|
if (l.mode === "combobox") return !1;
|
|
176
176
|
let e = l.options.filter((o) => !o.disabled);
|
|
177
177
|
return !!(Array.isArray(s.value) && ((t = s.value) == null ? void 0 : t.length) > 0 && ((a = s.value) == null ? void 0 : a.length) < e.length);
|
|
178
|
-
}),
|
|
178
|
+
}), Ue = d(() => {
|
|
179
179
|
var e, t;
|
|
180
180
|
return l.optionFilterProp ? l.optionFilterProp : (e = l.fieldNames) != null && e.label ? (t = l.fieldNames) == null ? void 0 : t.label : "label";
|
|
181
|
-
}),
|
|
181
|
+
}), U = d(() => {
|
|
182
182
|
var e;
|
|
183
183
|
return l.fieldNames && l.fieldNames.label ? (e = l.fieldNames) == null ? void 0 : e.label : "label";
|
|
184
184
|
}), z = d(() => {
|
|
185
185
|
var e;
|
|
186
186
|
return l.fieldNames && l.fieldNames.value ? (e = l.fieldNames) == null ? void 0 : e.value : "value";
|
|
187
|
-
}),
|
|
187
|
+
}), je = d(() => ({
|
|
188
188
|
width: typeof l.width == "number" ? l.width + "px" : l.width
|
|
189
|
-
})), ne = n(!1),
|
|
189
|
+
})), ne = n(!1), Xe = n({
|
|
190
190
|
display: "block",
|
|
191
191
|
color: Tl("--das-ui-select-overlay-error-color").value,
|
|
192
192
|
"white-space": "break-spaces"
|
|
193
|
-
}), O = n(),
|
|
193
|
+
}), O = n(), Ge = () => {
|
|
194
194
|
var a;
|
|
195
|
-
B.value =
|
|
195
|
+
B.value = ye(), A.value = ge();
|
|
196
196
|
let e = (a = x.value) == null ? void 0 : a.$el.querySelectorAll(".ant-select-selection-item");
|
|
197
197
|
!!(Array.isArray(s.value) ? s.value.length : e != null && e.length) || B.value === A.value || A.value - B.value < 1 ? S.value = !1 : (S.value = !0, O.value && clearTimeout(O.value)), ne.value = !0;
|
|
198
|
-
},
|
|
198
|
+
}, Je = () => {
|
|
199
199
|
O.value = setTimeout(() => {
|
|
200
200
|
S.value = !1;
|
|
201
201
|
}, 200), ne.value = !1;
|
|
202
|
-
},
|
|
203
|
-
e ?
|
|
204
|
-
},
|
|
205
|
-
e && (
|
|
202
|
+
}, Qe = (e, t) => {
|
|
203
|
+
e ? Ge() : Je();
|
|
204
|
+
}, Ye = (e) => {
|
|
205
|
+
e && (Ie.value = Vl().nextZIndex(), E.value = ""), j.value = e, l.mode == "combobox" && (e || setTimeout(() => {
|
|
206
206
|
var t, a;
|
|
207
207
|
(a = (t = x.value) == null ? void 0 : t.blur) == null || a.call(t);
|
|
208
208
|
})), w("dropdownVisibleChange", e);
|
|
209
|
-
},
|
|
209
|
+
}, el = (e) => {
|
|
210
210
|
let t = e.toString();
|
|
211
211
|
return t.length > l.maxTagTextLength && (t = t.substr(0, l.maxTagTextLength) + "..."), t;
|
|
212
|
-
},
|
|
212
|
+
}, ll = (e) => l.isRenderNode ? F.value : l.getPopupContainer === void 0 ? document.body : l.getPopupContainer(e), tl = (e) => {
|
|
213
213
|
if (e) {
|
|
214
214
|
Array.isArray(s.value) || (s.value = []);
|
|
215
215
|
let t = s.value, a = [];
|
|
@@ -220,29 +220,29 @@ const _l = { key: 0 }, Ml = { class: "das-multiple-option-item" }, $l = { style:
|
|
|
220
220
|
let t = s.value;
|
|
221
221
|
s.value = t.filter((a) => !!l.options.find((o) => o[z.value] === a).disabled), ue(s.value, []);
|
|
222
222
|
}
|
|
223
|
-
},
|
|
223
|
+
}, ol = (e) => {
|
|
224
224
|
if (e.className.indexOf("ant-select-multiple") > -1 && e.children[0])
|
|
225
225
|
return e.children[0];
|
|
226
|
-
},
|
|
226
|
+
}, al = (e) => {
|
|
227
227
|
if (l.mode == "combobox") {
|
|
228
228
|
w("focus", e);
|
|
229
229
|
return;
|
|
230
230
|
}
|
|
231
231
|
te.value = !0, l.focusOpen && !l.isExterControlCount && (u.value = V, b.value = !1), w("focus", e);
|
|
232
|
-
},
|
|
233
|
-
|
|
232
|
+
}, j = n(!1), sl = () => {
|
|
233
|
+
j.value || setTimeout(() => {
|
|
234
234
|
var e, t;
|
|
235
235
|
(t = (e = x.value) == null ? void 0 : e.blur) == null || t.call(e);
|
|
236
236
|
}), l.mode != "combobox";
|
|
237
|
-
},
|
|
237
|
+
}, Ve = (e) => {
|
|
238
238
|
if (T(() => {
|
|
239
|
-
|
|
239
|
+
j.value = !1;
|
|
240
240
|
}), l.mode == "combobox") {
|
|
241
241
|
w("blur", e);
|
|
242
242
|
return;
|
|
243
243
|
}
|
|
244
244
|
te.value = !1, l.focusOpen && !l.isExterControlCount && (L(), u.value = i.value, b.value = !0), w("blur", e);
|
|
245
|
-
},
|
|
245
|
+
}, nl = (e) => {
|
|
246
246
|
e.onClose(), u.value = 100, T(() => {
|
|
247
247
|
l.mode !== "combobox" && oe.value || l.focusOpen && (L(), u.value = i.value, b.value = !0);
|
|
248
248
|
});
|
|
@@ -253,49 +253,49 @@ const _l = { key: 0 }, Ml = { class: "das-multiple-option-item" }, $l = { style:
|
|
|
253
253
|
if (e && l.mode !== "combobox") {
|
|
254
254
|
te.value = !1;
|
|
255
255
|
let t = new Event("blur");
|
|
256
|
-
|
|
256
|
+
Ve(t);
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
);
|
|
260
260
|
let R = n(!1);
|
|
261
|
-
const
|
|
261
|
+
const rl = (e) => {
|
|
262
262
|
R.value = e, N.value = !0, T(() => {
|
|
263
263
|
N.value = !1, l.focusOpen && (L(), u.value = e ? V : i.value, b.value = !e);
|
|
264
264
|
});
|
|
265
265
|
};
|
|
266
|
-
let
|
|
267
|
-
|
|
268
|
-
|
|
266
|
+
let X = null;
|
|
267
|
+
de(() => {
|
|
268
|
+
X = new IntersectionObserver((e) => {
|
|
269
269
|
e && e[0] && e[0].intersectionRatio > 0 && l.focusOpen && u.value === 0 && (u.value = 100, T(() => {
|
|
270
270
|
L(), u.value = i.value, b.value = !0;
|
|
271
271
|
}));
|
|
272
|
-
}),
|
|
273
|
-
}),
|
|
274
|
-
|
|
272
|
+
}), X.observe(F.value);
|
|
273
|
+
}), Ne(() => {
|
|
274
|
+
X && X.disconnect();
|
|
275
275
|
});
|
|
276
276
|
const L = () => {
|
|
277
|
-
var
|
|
278
|
-
let e = (
|
|
277
|
+
var q;
|
|
278
|
+
let e = (q = x.value) == null ? void 0 : q.$el;
|
|
279
279
|
if (!e) return;
|
|
280
280
|
let t = e == null ? void 0 : e.querySelector(".ant-select-selection-overflow");
|
|
281
281
|
if (!t) return;
|
|
282
282
|
let a = t.offsetWidth - 5;
|
|
283
283
|
l.borderType === "underline" && (a -= 10);
|
|
284
|
-
const
|
|
285
|
-
let
|
|
286
|
-
if (
|
|
284
|
+
const m = Math.ceil(Ce.value.querySelector(".ant-tag").offsetWidth) + 4;
|
|
285
|
+
let f = e.querySelectorAll(".ant-select-selection-overflow-item");
|
|
286
|
+
if (f.length < 1) return;
|
|
287
287
|
u.value = V;
|
|
288
288
|
let _ = 0;
|
|
289
|
-
for (let
|
|
290
|
-
if (_ += Math.ceil(
|
|
291
|
-
|
|
289
|
+
for (let c = 0; c < f.length - 1 && !f[c].classList.contains("ant-select-selection-overflow-item-rest"); c++)
|
|
290
|
+
if (_ += Math.ceil(f[c].offsetWidth), _ <= a - m)
|
|
291
|
+
c >= s.value.length - 1 && _ < a ? i.value = s.value.length : i.value = c + 1;
|
|
292
292
|
else {
|
|
293
|
-
|
|
293
|
+
c >= s.value.length - 1 && _ < a ? i.value = s.value.length : i.value = c;
|
|
294
294
|
break;
|
|
295
295
|
}
|
|
296
296
|
if (i.value === 0) {
|
|
297
|
-
let
|
|
298
|
-
|
|
297
|
+
let c = f[0], ie = c.querySelector(".anticon-close") ? 86 : 69;
|
|
298
|
+
c && !c.classList.contains("ant-select-selection-overflow-item-rest") && ie <= a - m && !Te.tagRender && (i.value = 1, c.classList.add("ellipsis"));
|
|
299
299
|
}
|
|
300
300
|
}, re = n(!1);
|
|
301
301
|
G(
|
|
@@ -309,16 +309,16 @@ const _l = { key: 0 }, Ml = { class: "das-multiple-option-item" }, $l = { style:
|
|
|
309
309
|
}
|
|
310
310
|
);
|
|
311
311
|
const ue = async (e, t) => {
|
|
312
|
-
re.value = !0,
|
|
312
|
+
re.value = !0, j.value = !1, l.mode === "combobox" && le();
|
|
313
313
|
const a = e;
|
|
314
314
|
l.noDropdown && l.maxTagsLength < a.length && a.pop(), N.value = !0, w("update:model-value", a), w("change", a, t), u.value = V, await T(), await L(), N.value = !1, l.isExterControlCount && l.focusOpen && (u.value = R.value ? V : i.value, b.value = !R.value), l.focusOpen || (u.value = i.value);
|
|
315
315
|
};
|
|
316
316
|
return M({
|
|
317
317
|
$select: x,
|
|
318
|
-
toChangeMaxCount:
|
|
318
|
+
toChangeMaxCount: rl
|
|
319
319
|
}), (e, t) => {
|
|
320
320
|
const a = dl("v-nodes");
|
|
321
|
-
return
|
|
321
|
+
return v(), g(
|
|
322
322
|
"div",
|
|
323
323
|
{
|
|
324
324
|
class: cl(["das-ui-select", [
|
|
@@ -329,87 +329,87 @@ const _l = { key: 0 }, Ml = { class: "das-multiple-option-item" }, $l = { style:
|
|
|
329
329
|
]]),
|
|
330
330
|
ref_key: "$selectBox",
|
|
331
331
|
ref: F,
|
|
332
|
-
style:
|
|
332
|
+
style: H(je.value)
|
|
333
333
|
},
|
|
334
334
|
[
|
|
335
335
|
y(r(bl), {
|
|
336
336
|
ref_key: "inputTooltipRef",
|
|
337
|
-
ref:
|
|
337
|
+
ref: be,
|
|
338
338
|
placement: "top",
|
|
339
339
|
"virtual-triggering": "",
|
|
340
|
-
"virtual-ref":
|
|
341
|
-
disabled:
|
|
342
|
-
content:
|
|
340
|
+
"virtual-ref": Ae.value,
|
|
341
|
+
disabled: Be.value,
|
|
342
|
+
content: De.value
|
|
343
343
|
}, null, 8, ["virtual-ref", "disabled", "content"]),
|
|
344
|
-
|
|
344
|
+
ve((v(), Z(r(ml), he({ mode: e.mode }, e.$attrs, {
|
|
345
345
|
value: r(s),
|
|
346
346
|
"onUpdate:value": t[4] || (t[4] = (o) => vl(s) ? s.value = o : null),
|
|
347
347
|
ref_key: "$select",
|
|
348
348
|
ref: x,
|
|
349
|
-
options:
|
|
349
|
+
options: ke.value,
|
|
350
350
|
fieldNames: e.fieldNames,
|
|
351
351
|
bordered: l.borderType === "bordered",
|
|
352
352
|
disabled: l.disabled || l.isView,
|
|
353
353
|
showArrow: !0,
|
|
354
354
|
open: l.noDropdown ? !1 : oe.value,
|
|
355
|
-
placeholder:
|
|
356
|
-
optionFilterProp:
|
|
355
|
+
placeholder: K.value,
|
|
356
|
+
optionFilterProp: Ue.value,
|
|
357
357
|
size: l.size == "middle" ? "defalut" : l.size == "mini" ? "small" : l.size,
|
|
358
358
|
style: l.size == "mini" || l.size == "table" ? { fontSize: "12px" } : {},
|
|
359
359
|
dropdownClassName: "das-ui-select-dorpdown " + e.dropdownClassName,
|
|
360
360
|
maxTagCount: u.value,
|
|
361
|
-
getPopupContainer:
|
|
362
|
-
dropdownStyle:
|
|
363
|
-
onDropdownVisibleChange:
|
|
361
|
+
getPopupContainer: ll,
|
|
362
|
+
dropdownStyle: He.value,
|
|
363
|
+
onDropdownVisibleChange: Ye,
|
|
364
364
|
onChange: ue,
|
|
365
|
-
onFocus:
|
|
365
|
+
onFocus: al,
|
|
366
366
|
onClick: [
|
|
367
|
-
|
|
367
|
+
sl,
|
|
368
368
|
t[5] || (t[5] = J(() => {
|
|
369
369
|
}, ["stop"]))
|
|
370
370
|
],
|
|
371
|
-
onBlur:
|
|
371
|
+
onBlur: Ve
|
|
372
372
|
}), fl({
|
|
373
|
-
option:
|
|
373
|
+
option: p((o) => [
|
|
374
374
|
C(e.$slots, "option", Q(Y(o)), () => {
|
|
375
|
-
var
|
|
375
|
+
var m;
|
|
376
376
|
return [
|
|
377
|
-
o.children && typeof o.children == "function" ? (
|
|
377
|
+
o.children && typeof o.children == "function" ? (v(), Z(a, {
|
|
378
378
|
key: 0,
|
|
379
379
|
vnodes: o.children()
|
|
380
|
-
}, null, 8, ["vnodes"])) : (
|
|
381
|
-
|
|
380
|
+
}, null, 8, ["vnodes"])) : (v(), g(
|
|
381
|
+
pe,
|
|
382
382
|
{ key: 1 },
|
|
383
383
|
[
|
|
384
384
|
k(' :option="{value, label, [disabled, key, title]}" '),
|
|
385
|
-
e.mode === "combobox" ?
|
|
386
|
-
|
|
387
|
-
W(o[
|
|
385
|
+
e.mode === "combobox" ? ve((v(), g("div", _l, [
|
|
386
|
+
fe(
|
|
387
|
+
W(o[U.value]),
|
|
388
388
|
1
|
|
389
389
|
/* TEXT */
|
|
390
390
|
)
|
|
391
391
|
])), [
|
|
392
|
-
[r(
|
|
393
|
-
]) : (
|
|
394
|
-
|
|
392
|
+
[r(Le)]
|
|
393
|
+
]) : (v(), g(
|
|
394
|
+
pe,
|
|
395
395
|
{ key: 1 },
|
|
396
396
|
[
|
|
397
397
|
k(` <das-tooltip v-if="mode === 'combobox'" placement="right-start" :text="option[labelKeyName]"></das-tooltip> `),
|
|
398
|
-
|
|
399
|
-
(
|
|
398
|
+
h("div", Ml, [
|
|
399
|
+
(v(), Z(r(ze), {
|
|
400
400
|
class: "das-select-checkbox",
|
|
401
|
-
modelValue: (
|
|
401
|
+
modelValue: (m = r(s)) == null ? void 0 : m.includes(o[z.value]),
|
|
402
402
|
key: o[z.value],
|
|
403
403
|
disabled: o.disabled
|
|
404
404
|
}, null, 8, ["modelValue", "disabled"])),
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
W(o[
|
|
405
|
+
ve((v(), g("div", $l, [
|
|
406
|
+
fe(
|
|
407
|
+
W(o[U.value]),
|
|
408
408
|
1
|
|
409
409
|
/* TEXT */
|
|
410
410
|
)
|
|
411
411
|
])), [
|
|
412
|
-
[r(
|
|
412
|
+
[r(Le)]
|
|
413
413
|
])
|
|
414
414
|
])
|
|
415
415
|
],
|
|
@@ -423,21 +423,21 @@ const _l = { key: 0 }, Ml = { class: "das-multiple-option-item" }, $l = { style:
|
|
|
423
423
|
];
|
|
424
424
|
}, !0)
|
|
425
425
|
]),
|
|
426
|
-
tagRender:
|
|
426
|
+
tagRender: p((o) => [
|
|
427
427
|
C(e.$slots, "tagRender", Q(Y(o)), () => [
|
|
428
|
-
y(r(
|
|
428
|
+
y(r(me), {
|
|
429
429
|
closable: o.closable,
|
|
430
430
|
style: { "margin-right": "3px", "background-color": "transparent" },
|
|
431
|
-
onClose: (
|
|
431
|
+
onClose: (m) => nl(o)
|
|
432
432
|
}, {
|
|
433
|
-
default:
|
|
434
|
-
|
|
433
|
+
default: p(() => [
|
|
434
|
+
h(
|
|
435
435
|
"span",
|
|
436
436
|
{
|
|
437
437
|
class: "tag-span",
|
|
438
|
-
style:
|
|
438
|
+
style: H(l.size == "mini" || l.size == "table" ? { fontSize: "12px" } : {})
|
|
439
439
|
},
|
|
440
|
-
W(
|
|
440
|
+
W(el(o.label)),
|
|
441
441
|
5
|
|
442
442
|
/* TEXT, STYLE */
|
|
443
443
|
)
|
|
@@ -447,41 +447,41 @@ const _l = { key: 0 }, Ml = { class: "das-multiple-option-item" }, $l = { style:
|
|
|
447
447
|
}, 1032, ["closable", "onClose"])
|
|
448
448
|
], !0)
|
|
449
449
|
]),
|
|
450
|
-
dropdownRender:
|
|
450
|
+
dropdownRender: p(({ menuNode: o }) => [
|
|
451
451
|
C(e.$slots, "dropdownRender", Q(Y({ menuNode: o })), () => {
|
|
452
|
-
var
|
|
452
|
+
var m;
|
|
453
453
|
return [
|
|
454
|
-
|
|
454
|
+
we.value === "combobox" ? (v(), g("div", Fl, [
|
|
455
455
|
y(a, { vnodes: o }, null, 8, ["vnodes"])
|
|
456
|
-
])) :
|
|
456
|
+
])) : we.value === "custom" ? (v(), g("div", {
|
|
457
457
|
key: 1,
|
|
458
458
|
onClick: t[2] || (t[2] = J(() => {
|
|
459
459
|
}, ["stop"]))
|
|
460
460
|
}, [
|
|
461
461
|
y(a, { vnodes: o }, null, 8, ["vnodes"]),
|
|
462
|
-
|
|
462
|
+
h(
|
|
463
463
|
"div",
|
|
464
464
|
{
|
|
465
465
|
class: "customDropdown",
|
|
466
|
-
onMousedown: t[1] || (t[1] = (
|
|
466
|
+
onMousedown: t[1] || (t[1] = (f) => f.preventDefault())
|
|
467
467
|
},
|
|
468
468
|
[
|
|
469
|
-
y(r(gl),
|
|
469
|
+
y(r(gl), he({
|
|
470
470
|
ref_key: "testInput",
|
|
471
|
-
ref:
|
|
471
|
+
ref: Ee,
|
|
472
472
|
modelValue: E.value,
|
|
473
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
474
|
-
onKeyup: pl(
|
|
475
|
-
onFocus: J(
|
|
476
|
-
onBlur: J(
|
|
473
|
+
"onUpdate:modelValue": t[0] || (t[0] = (f) => E.value = f),
|
|
474
|
+
onKeyup: pl(xe, ["enter"]),
|
|
475
|
+
onFocus: J(Oe, ["stop"]),
|
|
476
|
+
onBlur: J(We, ["stop"]),
|
|
477
477
|
width: "100%",
|
|
478
478
|
borderType: "bordered"
|
|
479
479
|
}, l.inputAttrs), null, 16, ["modelValue"]),
|
|
480
|
-
|
|
480
|
+
h(
|
|
481
481
|
"div",
|
|
482
482
|
{
|
|
483
483
|
class: "addBtn",
|
|
484
|
-
onClick:
|
|
484
|
+
onClick: xe
|
|
485
485
|
},
|
|
486
486
|
W(r(P)("添加")),
|
|
487
487
|
1
|
|
@@ -491,25 +491,25 @@ const _l = { key: 0 }, Ml = { class: "das-multiple-option-item" }, $l = { style:
|
|
|
491
491
|
32
|
|
492
492
|
/* NEED_HYDRATION */
|
|
493
493
|
)
|
|
494
|
-
])) : (
|
|
494
|
+
])) : (v(), g("div", Al, [
|
|
495
495
|
y(a, { vnodes: o }, null, 8, ["vnodes"]),
|
|
496
|
-
(
|
|
496
|
+
(m = l.options) != null && m.length ? (v(), g(
|
|
497
497
|
"div",
|
|
498
498
|
{
|
|
499
499
|
key: 0,
|
|
500
500
|
class: "das-ui-select-dropdown-checkall",
|
|
501
|
-
onMousedown: t[3] || (t[3] = (
|
|
501
|
+
onMousedown: t[3] || (t[3] = (f) => f.preventDefault())
|
|
502
502
|
},
|
|
503
503
|
[
|
|
504
|
-
|
|
505
|
-
y(r(
|
|
506
|
-
modelValue:
|
|
507
|
-
indeterminate:
|
|
508
|
-
onChange:
|
|
504
|
+
h("div", Bl, [
|
|
505
|
+
y(r(ze), {
|
|
506
|
+
modelValue: Ze.value,
|
|
507
|
+
indeterminate: Ke.value,
|
|
508
|
+
onChange: tl,
|
|
509
509
|
style: { display: "flex" }
|
|
510
510
|
}, {
|
|
511
|
-
default:
|
|
512
|
-
|
|
511
|
+
default: p(() => [
|
|
512
|
+
fe(
|
|
513
513
|
W(r(P)("全选")),
|
|
514
514
|
1
|
|
515
515
|
/* TEXT */
|
|
@@ -519,7 +519,7 @@ const _l = { key: 0 }, Ml = { class: "das-multiple-option-item" }, $l = { style:
|
|
|
519
519
|
/* STABLE */
|
|
520
520
|
}, 8, ["modelValue", "indeterminate"])
|
|
521
521
|
]),
|
|
522
|
-
|
|
522
|
+
h("span", {
|
|
523
523
|
class: "das-ui-dropdown-has-checked",
|
|
524
524
|
innerHTML: r(P)("das-ui-select-selectedItemsCountWithPlaceholder", ee.value)
|
|
525
525
|
}, null, 8, Dl)
|
|
@@ -531,19 +531,19 @@ const _l = { key: 0 }, Ml = { class: "das-multiple-option-item" }, $l = { style:
|
|
|
531
531
|
];
|
|
532
532
|
}, !0)
|
|
533
533
|
]),
|
|
534
|
-
clearIcon:
|
|
534
|
+
clearIcon: p(() => [
|
|
535
535
|
C(e.$slots, "clearIcon", {}, () => [
|
|
536
536
|
y(r(Cl), { size: "medium" })
|
|
537
537
|
], !0)
|
|
538
538
|
]),
|
|
539
|
-
maxTagPlaceholder:
|
|
539
|
+
maxTagPlaceholder: p((o) => [
|
|
540
540
|
C(e.$slots, "maxTagPlaceholder", Q(Y(o)), () => [
|
|
541
541
|
k(" 隐藏tag时显示的内容 "),
|
|
542
|
-
y(r(
|
|
543
|
-
style:
|
|
542
|
+
y(r(me), {
|
|
543
|
+
style: H(l.size == "mini" || l.size == "table" ? { fontSize: "12px" } : {})
|
|
544
544
|
}, {
|
|
545
|
-
default:
|
|
546
|
-
|
|
545
|
+
default: p(() => [
|
|
546
|
+
h("span", {
|
|
547
547
|
innerHTML: r(P)("das-ui-select-selectedItemsCountWithPlaceholder", ee.value)
|
|
548
548
|
}, null, 8, El)
|
|
549
549
|
]),
|
|
@@ -553,9 +553,9 @@ const _l = { key: 0 }, Ml = { class: "das-multiple-option-item" }, $l = { style:
|
|
|
553
553
|
k(" <a-tag>+{{ currValue?.length - maxTagCountCell }}</a-tag> ")
|
|
554
554
|
], !0)
|
|
555
555
|
]),
|
|
556
|
-
notFoundContent:
|
|
556
|
+
notFoundContent: p(() => [
|
|
557
557
|
C(e.$slots, "notFoundContent", {}, () => [
|
|
558
|
-
t[6] || (t[6] =
|
|
558
|
+
t[6] || (t[6] = h(
|
|
559
559
|
"div",
|
|
560
560
|
{ class: "hasNoData" },
|
|
561
561
|
"暂无数据",
|
|
@@ -564,7 +564,7 @@ const _l = { key: 0 }, Ml = { class: "das-multiple-option-item" }, $l = { style:
|
|
|
564
564
|
))
|
|
565
565
|
], !0)
|
|
566
566
|
]),
|
|
567
|
-
suffixIcon:
|
|
567
|
+
suffixIcon: p(() => [
|
|
568
568
|
C(e.$slots, "suffixIcon", {}, () => [
|
|
569
569
|
y(r(yl), {
|
|
570
570
|
class: "das-suffix-icon",
|
|
@@ -572,7 +572,7 @@ const _l = { key: 0 }, Ml = { class: "das-multiple-option-item" }, $l = { style:
|
|
|
572
572
|
})
|
|
573
573
|
], !0)
|
|
574
574
|
]),
|
|
575
|
-
default:
|
|
575
|
+
default: p(() => [
|
|
576
576
|
C(e.$slots, "default", {}, void 0, !0)
|
|
577
577
|
]),
|
|
578
578
|
_: 2
|
|
@@ -580,45 +580,45 @@ const _l = { key: 0 }, Ml = { class: "das-multiple-option-item" }, $l = { style:
|
|
|
580
580
|
}, [
|
|
581
581
|
e.$slots.menuItemSelectedIcon ? {
|
|
582
582
|
name: "menuItemSelectedIcon",
|
|
583
|
-
fn:
|
|
583
|
+
fn: p(() => [
|
|
584
584
|
C(e.$slots, "menuItemSelectedIcon", {}, void 0, !0)
|
|
585
585
|
]),
|
|
586
586
|
key: "0"
|
|
587
587
|
} : void 0,
|
|
588
588
|
e.$slots.placeholder ? {
|
|
589
589
|
name: "placeholder",
|
|
590
|
-
fn:
|
|
590
|
+
fn: p(() => [
|
|
591
591
|
C(e.$slots, "placeholder", {}, void 0, !0)
|
|
592
592
|
]),
|
|
593
593
|
key: "1"
|
|
594
594
|
} : void 0,
|
|
595
595
|
e.$slots.removeIcon ? {
|
|
596
596
|
name: "removeIcon",
|
|
597
|
-
fn:
|
|
597
|
+
fn: p(() => [
|
|
598
598
|
C(e.$slots, "removeIcon", {}, void 0, !0)
|
|
599
599
|
]),
|
|
600
600
|
key: "2"
|
|
601
601
|
} : void 0
|
|
602
602
|
]), 1040, ["mode", "value", "options", "fieldNames", "bordered", "disabled", "open", "placeholder", "optionFilterProp", "size", "style", "dropdownClassName", "maxTagCount", "dropdownStyle"])), [
|
|
603
|
-
[r(hl), { target:
|
|
604
|
-
[r(xl),
|
|
603
|
+
[r(hl), { target: ol, x: !1 }],
|
|
604
|
+
[r(xl), Qe]
|
|
605
605
|
]),
|
|
606
|
-
e.error && e.errorLabel ? (
|
|
607
|
-
|
|
606
|
+
e.error && e.errorLabel ? (v(), g(
|
|
607
|
+
pe,
|
|
608
608
|
{ key: 0 },
|
|
609
609
|
[
|
|
610
|
-
e.errorMode === "default" ? (
|
|
611
|
-
|
|
610
|
+
e.errorMode === "default" ? (v(), g("div", Ol, [
|
|
611
|
+
h(
|
|
612
612
|
"span",
|
|
613
613
|
{
|
|
614
|
-
style:
|
|
614
|
+
style: H(Xe.value)
|
|
615
615
|
},
|
|
616
616
|
W(e.errorLabel),
|
|
617
617
|
5
|
|
618
618
|
/* TEXT, STYLE */
|
|
619
619
|
)
|
|
620
620
|
])) : k("v-if", !0),
|
|
621
|
-
e.errorMode === "overlay" && ne.value ? (
|
|
621
|
+
e.errorMode === "overlay" && ne.value ? (v(), Z(r(wl), {
|
|
622
622
|
key: 1,
|
|
623
623
|
errorLabel: e.errorLabel,
|
|
624
624
|
getEl: () => x.value.$el,
|
|
@@ -628,23 +628,23 @@ const _l = { key: 0 }, Ml = { class: "das-multiple-option-item" }, $l = { style:
|
|
|
628
628
|
64
|
|
629
629
|
/* STABLE_FRAGMENT */
|
|
630
630
|
)) : k("v-if", !0),
|
|
631
|
-
|
|
631
|
+
h(
|
|
632
632
|
"div",
|
|
633
633
|
{
|
|
634
634
|
class: "ant-select-selection-overflow",
|
|
635
635
|
ref_key: "virtualTotalCount",
|
|
636
|
-
ref:
|
|
636
|
+
ref: Ce,
|
|
637
637
|
style: { position: "absolute", left: "-50%", top: "-50%", opacity: "0", "pointer-events": "none" }
|
|
638
638
|
},
|
|
639
639
|
[
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
y(r(
|
|
644
|
-
style:
|
|
640
|
+
h("div", Wl, [
|
|
641
|
+
h("div", Pl, [
|
|
642
|
+
h("span", Rl, [
|
|
643
|
+
y(r(me), {
|
|
644
|
+
style: H(l.size == "mini" || l.size == "table" ? { fontSize: "12px" } : {})
|
|
645
645
|
}, {
|
|
646
|
-
default:
|
|
647
|
-
|
|
646
|
+
default: p(() => [
|
|
647
|
+
h("span", {
|
|
648
648
|
innerHTML: r(P)("das-ui-select-selectedItemsCountWithPlaceholder", ee.value)
|
|
649
649
|
}, null, 8, ql)
|
|
650
650
|
]),
|
|
@@ -664,32 +664,32 @@ const _l = { key: 0 }, Ml = { class: "das-multiple-option-item" }, $l = { style:
|
|
|
664
664
|
);
|
|
665
665
|
};
|
|
666
666
|
}
|
|
667
|
-
}),
|
|
667
|
+
}), Fe = (I, M) => {
|
|
668
668
|
const $ = I.__vccOpts || I;
|
|
669
669
|
for (const [l, w] of M)
|
|
670
670
|
$[l] = w;
|
|
671
671
|
return $;
|
|
672
|
-
}, Kl = /* @__PURE__ */
|
|
672
|
+
}, Kl = /* @__PURE__ */ Fe(Zl, [["__scopeId", "data-v-c5442842"]]), Ul = {};
|
|
673
673
|
function jl(I, M) {
|
|
674
674
|
const $ = Ll;
|
|
675
|
-
return
|
|
675
|
+
return v(), Z(
|
|
676
676
|
$,
|
|
677
|
-
|
|
677
|
+
he({ class: "das-ui-select-option" }, I.$attrs),
|
|
678
678
|
null,
|
|
679
679
|
16
|
|
680
680
|
/* FULL_PROPS */
|
|
681
681
|
);
|
|
682
682
|
}
|
|
683
|
-
const Xl = /* @__PURE__ */
|
|
683
|
+
const Xl = /* @__PURE__ */ Fe(Ul, [["render", jl]]), Gl = {
|
|
684
684
|
"--das-ui-select-color-bg": "#FFFFFF",
|
|
685
685
|
// 默认背景色
|
|
686
|
-
"--das-ui-select-color-primary":
|
|
686
|
+
"--das-ui-select-color-primary": _e("--das-ui-color-primary"),
|
|
687
687
|
// 主题色
|
|
688
688
|
"--das-ui-select-color-text": "#212121",
|
|
689
689
|
// 主文本色
|
|
690
690
|
"--das-ui-select-color-border": "#d9d9d9",
|
|
691
691
|
// 边框基础色
|
|
692
|
-
"--das-ui-select-color-underline":
|
|
692
|
+
"--das-ui-select-color-underline": _e("--das-ui-color-help"),
|
|
693
693
|
// 下划线基础色
|
|
694
694
|
"--das-ui-select-color-error": "#FB2323",
|
|
695
695
|
// 错误边框色
|
|
@@ -739,7 +739,7 @@ const Xl = /* @__PURE__ */ $e(Ul, [["render", jl]]), Gl = {
|
|
|
739
739
|
};
|
|
740
740
|
Sl(Jl);
|
|
741
741
|
kl(Gl);
|
|
742
|
-
const yt =
|
|
742
|
+
const yt = Me(Kl), Ct = Me(Xl), wt = { name: "select 选择器" };
|
|
743
743
|
export {
|
|
744
744
|
yt as DasSelect,
|
|
745
745
|
Ct as DasSelectOption,
|