@das-fed/upf-ui 6.4.0-dev.251 → 6.4.0-dev.253
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 +3 -3
- package/packages/components/button/index.js +85 -83
- 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/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/form-item/index.js +471 -466
- package/packages/components/form-item/index.js.gz +0 -0
- package/packages/components/form-item/src/type.d.ts +3 -0
- package/packages/components/form-item/style.css +1 -1
- package/packages/components/form-item/style.css.gz +0 -0
- package/packages/components/input/index.js +921 -911
- package/packages/components/input/index.js.gz +0 -0
- package/packages/components/input/src/index.vue.d.ts +2 -1
- package/packages/components/input/src/type.d.ts +2 -2
- package/packages/components/input/style.css +1 -1
- package/packages/components/input/style.css.gz +0 -0
- package/packages/components/search-form/index.js +3 -3
- package/packages/components/search-form/index.js.gz +0 -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 +285 -273
- 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 +1409 -1399
- package/packages/components/tree-v2/index.js.gz +0 -0
- package/packages/components/tree-v2/style.css +1 -1
- package/packages/components/tree-v2/style.css.gz +0 -0
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { withInstall as
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { Select as
|
|
4
|
-
import { DasCheckbox as
|
|
5
|
-
import { vScrollbar as
|
|
6
|
-
import { DasTooltip as
|
|
7
|
-
import { vDasTooltip as
|
|
8
|
-
import { DasInput as
|
|
9
|
-
import { DasIconXiala as
|
|
10
|
-
import { DasIconEmpty as
|
|
11
|
-
import { DasErrorOverlayModel as
|
|
12
|
-
import { vHoverInside as
|
|
13
|
-
import { t as M, currentLang as
|
|
14
|
-
import { useZIndex as
|
|
15
|
-
import { useModelValue as
|
|
16
|
-
import { calcTextWidth as
|
|
1
|
+
import { withInstall as tl } from "@das-fed/upf-utils/with-install/index";
|
|
2
|
+
import { defineComponent as ol, useCssVars as lt, useAttrs as tt, computed as s, ref as i, watch as j, useSlots as ot, onMounted as Ae, onUnmounted as Qe, watchEffect as Ye, nextTick as k, resolveComponent as nt, openBlock as f, createElementBlock as y, normalizeClass as at, normalizeStyle as X, withModifiers as ue, createBlock as K, unref as c, createCommentVNode as L, withDirectives as Te, mergeProps as Le, createSlots as rt, withCtx as m, renderSlot as w, normalizeProps as ie, guardReactiveProps as ce, Fragment as ke, createTextVNode as Ie, toDisplayString as Z, createElementVNode as b, createVNode as I, withKeys as st } from "vue";
|
|
3
|
+
import { Select as ut, Tag as Ve } from "ant-design-vue";
|
|
4
|
+
import { DasCheckbox as el } from "@das-fed/upf-ui/packages/components/checkbox/index";
|
|
5
|
+
import { vScrollbar as it } from "@das-fed/upf-ui/packages/components/scrollbar/index";
|
|
6
|
+
import { DasTooltip as ct } from "@das-fed/upf-ui/packages/components/tooltip/index";
|
|
7
|
+
import { vDasTooltip as ll } from "@das-fed/upf-ui/packages/components/text-tooltip/index";
|
|
8
|
+
import { DasInput as dt } from "@das-fed/upf-ui/packages/components/input/index";
|
|
9
|
+
import { DasIconXiala as ft } from "@das-fed/upf-ui/packages/icons/xiala/index";
|
|
10
|
+
import { DasIconEmpty as vt } from "@das-fed/upf-ui/packages/icons/empty/index";
|
|
11
|
+
import { DasErrorOverlayModel as pt } from "@das-fed/upf-ui/packages/components/error-overlay-model/index";
|
|
12
|
+
import { vHoverInside as ht } from "@das-fed/upf-utils/directive";
|
|
13
|
+
import { t as M, currentLang as mt, setI18nRule as gt } from "@das-fed/upf-web/packages/i18n/index";
|
|
14
|
+
import { useZIndex as yt } from "@das-fed/upf-utils/hooks/popup-manager/use-zindex";
|
|
15
|
+
import { useModelValue as bt } from "@das-fed/upf-utils/vue";
|
|
16
|
+
import { calcTextWidth as St } from "@das-fed/upf-utils/common-tools";
|
|
17
17
|
import "ant-design-vue/es/select/style/css";
|
|
18
18
|
import "ant-design-vue/es/tag/style/css";
|
|
19
|
-
import { SelectOption as
|
|
19
|
+
import { SelectOption as Ct } from "ant-design-vue/es"
|
|
20
20
|
import '@das-fed/upf-ui/packages/components/select/style.css';
|
|
21
21
|
;
|
|
22
|
-
const
|
|
22
|
+
const wt = { key: 0 }, xt = ["onClick"], At = { style: { display: "inline-block" } }, Tt = ["innerHTML"], kt = { key: 0 }, It = { key: 2 }, Vt = { style: { display: "inline-block" } }, Lt = ["innerHTML"], Mt = ["innerHTML"], Ot = {
|
|
23
23
|
key: 0,
|
|
24
24
|
class: "das-select-error-label-content das-select-label-content"
|
|
25
|
-
},
|
|
25
|
+
}, zt = { class: "ant-select ant-select-multiple ant-select-selection-overflow-item ant-select-selection-overflow-item-rest" }, Pt = { class: "ant-select-selection-item" }, _t = { class: "ant-select-selection-item-content" }, Nt = ["innerHTML"], Et = ol({
|
|
26
26
|
inheritAttrs: !1,
|
|
27
27
|
components: {
|
|
28
|
-
VNodes: (p, { attrs:
|
|
28
|
+
VNodes: (p, { attrs: E }) => E.vnodes
|
|
29
29
|
}
|
|
30
|
-
}),
|
|
31
|
-
...
|
|
30
|
+
}), Dt = /* @__PURE__ */ ol({
|
|
31
|
+
...Et,
|
|
32
32
|
__name: "Select",
|
|
33
33
|
props: {
|
|
34
34
|
modelValue: { default: void 0 },
|
|
@@ -72,39 +72,39 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
72
72
|
largeSelectionCollapseThreshold: { default: 200 }
|
|
73
73
|
},
|
|
74
74
|
emits: ["update:model-value", "change", "focus", "blur", "dropdownVisibleChange", "addCustomItem"],
|
|
75
|
-
setup(p, { expose:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
setup(p, { expose: E, emit: D }) {
|
|
76
|
+
lt((e) => ({
|
|
77
|
+
ddcf49b6: Il.value,
|
|
78
|
+
v78240fa8: Vl.value
|
|
79
79
|
}));
|
|
80
|
-
const t = p, x =
|
|
80
|
+
const t = p, x = D, J = tt(), al = s(() => {
|
|
81
81
|
const e = {};
|
|
82
82
|
for (const l in J)
|
|
83
|
-
l === "onClick" || l.startsWith("onClick") || l === "filterOption" || l === "onSearch" || l === "onPopupScroll" || (e[l] = J[l]);
|
|
83
|
+
l === "size" || l === "formSize" || l === "onClick" || l.startsWith("onClick") || l === "filterOption" || l === "onSearch" || l === "onPopupScroll" || (e[l] = J[l]);
|
|
84
84
|
return e;
|
|
85
|
-
}), a =
|
|
85
|
+
}), a = bt(t, "modelValue"), Q = s(() => {
|
|
86
86
|
var e;
|
|
87
87
|
return `<span class='key'>${((e = a.value) == null ? void 0 : e.length) ?? 0}</span>`;
|
|
88
|
-
}),
|
|
88
|
+
}), rl = s(() => {
|
|
89
89
|
const e = Array.isArray(a.value) ? a.value.length : a.value ? 1 : 0;
|
|
90
90
|
return M("das-ui-select-selectedItemsCountWithPlaceholder", e);
|
|
91
|
-
}),
|
|
91
|
+
}), B = i(null), Me = i(null), S = i(!1), Y = s(() => t.isView ? t.noSetDefaultVal ? "" : "-" : t.placeholder || M("请选择")), de = s(() => B.value ? B.value.querySelector(".ant-select-selector") : null), $ = i(0), W = i(0), sl = s(() => de.value ? t.isTooltip && O.value ? !1 : !t.isTooltip || _.value || !je.value || !be.value : !0), ul = s(() => (Array.isArray(a.value) ? a.value.length : a.value) ? je.value : Y.value), Oe = () => {
|
|
92
92
|
const e = t.size === "table" ? 12 : 14;
|
|
93
|
-
return
|
|
93
|
+
return St(Y.value, e);
|
|
94
94
|
}, ze = () => {
|
|
95
|
-
var T,
|
|
96
|
-
const e = (T =
|
|
95
|
+
var T, U, h;
|
|
96
|
+
const e = (T = B.value) == null ? void 0 : T.querySelector(".ant-select-selection-placeholder"), l = (h = (U = A.value) == null ? void 0 : U.$el) == null ? void 0 : h.querySelectorAll(".ant-select-selection-item");
|
|
97
97
|
l && l.length && l.forEach((xe) => xe.removeAttribute("title"));
|
|
98
98
|
let n = (e == null ? void 0 : e.offsetWidth) ?? 0;
|
|
99
99
|
if (n === 0) return n;
|
|
100
100
|
const o = window.getComputedStyle(e, null), u = parseFloat(o.paddingRight), r = parseFloat(o.paddingLeft);
|
|
101
101
|
return n - u - r;
|
|
102
102
|
}, O = i(!1);
|
|
103
|
-
|
|
103
|
+
j(() => [Y.value, a.value], () => {
|
|
104
104
|
k(() => {
|
|
105
|
-
W.value = ze(),
|
|
105
|
+
W.value = ze(), $.value = Oe(), ((Array.isArray(a.value) ? a.value.length : a.value) || W.value === $.value || $.value - W.value < 1) && (O.value = !1);
|
|
106
106
|
});
|
|
107
|
-
}),
|
|
107
|
+
}), j(
|
|
108
108
|
() => {
|
|
109
109
|
var e;
|
|
110
110
|
return (e = Me.value) == null ? void 0 : e.$tooltipRef.popperRef.contentRef;
|
|
@@ -119,73 +119,84 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
119
119
|
}));
|
|
120
120
|
}
|
|
121
121
|
);
|
|
122
|
-
const Pe = i(null),
|
|
123
|
-
|
|
124
|
-
},
|
|
125
|
-
|
|
126
|
-
},
|
|
127
|
-
|
|
128
|
-
A.value.focus(),
|
|
122
|
+
const Pe = i(null), _e = s(() => t.dropdownMode ?? t.mode ?? ""), R = i(null), il = i(null), F = i(""), cl = () => {
|
|
123
|
+
R.value = !0;
|
|
124
|
+
}, dl = () => {
|
|
125
|
+
R.value = null;
|
|
126
|
+
}, Ne = () => {
|
|
127
|
+
F.value && (x("addCustomItem", F.value), k(() => {
|
|
128
|
+
A.value.focus(), F.value = "";
|
|
129
129
|
}));
|
|
130
|
-
},
|
|
131
|
-
t.dropdownMode === "custom" && !
|
|
132
|
-
|
|
130
|
+
}, Ee = ot(), fe = () => {
|
|
131
|
+
t.dropdownMode === "custom" && !Ee.dropdownRender && (R.value = !1, k(() => {
|
|
132
|
+
R.value = null;
|
|
133
133
|
}));
|
|
134
134
|
};
|
|
135
135
|
Ae(() => {
|
|
136
136
|
document.addEventListener("click", fe);
|
|
137
|
-
}),
|
|
137
|
+
}), Qe(() => {
|
|
138
138
|
document.removeEventListener("click", fe);
|
|
139
139
|
});
|
|
140
|
-
const A = i(), H = i(""), ee = i(0),
|
|
140
|
+
const A = i(), H = i(""), ee = i(0), De = `__DAS_SELECT_COLLAPSED_${Math.random().toString(36).slice(2)}__`, V = s(() => {
|
|
141
141
|
var e;
|
|
142
142
|
return t.fieldNames && t.fieldNames.label ? (e = t.fieldNames) == null ? void 0 : e.label : "label";
|
|
143
|
-
}),
|
|
143
|
+
}), g = s(() => {
|
|
144
144
|
var e;
|
|
145
145
|
return t.fieldNames && t.fieldNames.value ? (e = t.fieldNames) == null ? void 0 : e.value : "value";
|
|
146
|
-
}), ve = i(/* @__PURE__ */ new Map()),
|
|
146
|
+
}), ve = i(/* @__PURE__ */ new Map()), fl = s(() => t.mode === "combobox" ? void 0 : t.mode), Be = {
|
|
147
|
+
large: "large",
|
|
148
|
+
middle: "middle",
|
|
149
|
+
default: "middle",
|
|
150
|
+
small: "small",
|
|
151
|
+
mini: "small",
|
|
152
|
+
table: "middle"
|
|
153
|
+
}, vl = {
|
|
154
|
+
large: "36px",
|
|
155
|
+
middle: "32px",
|
|
156
|
+
small: "24px"
|
|
157
|
+
}, pl = (e) => e && e in Be ? e : "middle", hl = s(() => pl(t.size)), $e = s(() => Be[hl.value]), ml = s(() => t.height ?? vl[$e.value]), We = s(() => {
|
|
147
158
|
const e = Number(t.optionPageSize);
|
|
148
159
|
return Number.isFinite(e) && e > 0 ? Math.floor(e) : 80;
|
|
149
|
-
}),
|
|
160
|
+
}), Re = (e, l) => {
|
|
150
161
|
Array.isArray(e) && e.forEach((n) => {
|
|
151
|
-
l(n), Array.isArray(n == null ? void 0 : n.children) &&
|
|
162
|
+
l(n), Array.isArray(n == null ? void 0 : n.children) && Re(n.children, l);
|
|
152
163
|
});
|
|
153
164
|
}, le = (e, l) => {
|
|
154
165
|
if (Array.isArray(e))
|
|
155
166
|
for (const n of e) {
|
|
156
|
-
if ((n == null ? void 0 : n[
|
|
167
|
+
if ((n == null ? void 0 : n[g.value]) == l) return n;
|
|
157
168
|
if (Array.isArray(n == null ? void 0 : n.children)) {
|
|
158
169
|
const o = le(n.children, l);
|
|
159
170
|
if (o) return o;
|
|
160
171
|
}
|
|
161
172
|
}
|
|
162
|
-
},
|
|
163
|
-
|
|
164
|
-
l && l[
|
|
173
|
+
}, gl = (e) => {
|
|
174
|
+
Re(e, (l) => {
|
|
175
|
+
l && l[g.value] != null && l[V.value] != null && ve.value.set(l[g.value], l[V.value]);
|
|
165
176
|
});
|
|
166
177
|
}, pe = (e) => {
|
|
167
178
|
if (e == null || e === "") return;
|
|
168
179
|
const l = le(t.options, e);
|
|
169
|
-
if (l && l[
|
|
180
|
+
if (l && l[V.value] != null) return l[V.value];
|
|
170
181
|
if (t.preserveLabelWhenMissing)
|
|
171
182
|
return ve.value.get(e);
|
|
172
|
-
},
|
|
183
|
+
}, yl = (e) => {
|
|
173
184
|
const l = Array.isArray(e) ? e.slice() : [];
|
|
174
185
|
return t.preserveLabelWhenMissing ? ((t.mode !== "combobox" && Array.isArray(a.value) ? a.value : a.value != null && a.value !== "" ? [a.value] : []).forEach((o) => {
|
|
175
186
|
if (le(l, o)) return;
|
|
176
187
|
const r = ve.value.get(o);
|
|
177
188
|
r != null && l.unshift({
|
|
178
|
-
[
|
|
179
|
-
[
|
|
189
|
+
[g.value]: o,
|
|
190
|
+
[V.value]: r,
|
|
180
191
|
disabled: !0,
|
|
181
192
|
title: "",
|
|
182
193
|
__dasGhostOption: !0
|
|
183
194
|
});
|
|
184
195
|
}), l.map((o) => (o.title = o.title ? o.title : "", o))) : l.map((o) => (o.title = o.title ? o.title : "", o));
|
|
185
|
-
},
|
|
196
|
+
}, bl = (e) => Array.isArray(e) ? e.some((l) => Array.isArray(l == null ? void 0 : l.children) && l.children.length > 0) : !1, te = s(() => !!t.optionPaging && Array.isArray(t.options) && !bl(t.options)), Fe = (e, ...l) => {
|
|
186
197
|
const n = J[e];
|
|
187
198
|
Array.isArray(n) ? n.forEach((o) => typeof o == "function" && o(...l)) : typeof n == "function" && n(...l);
|
|
188
|
-
},
|
|
199
|
+
}, He = (e, l) => {
|
|
189
200
|
const n = e == null ? "" : String(e), o = J.filterOption;
|
|
190
201
|
if (typeof o == "function")
|
|
191
202
|
try {
|
|
@@ -194,51 +205,51 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
194
205
|
return !1;
|
|
195
206
|
}
|
|
196
207
|
if (o === !1) return !0;
|
|
197
|
-
const u =
|
|
208
|
+
const u = Xe.value, r = (l == null ? void 0 : l[u]) ?? (l == null ? void 0 : l[V.value]) ?? (l == null ? void 0 : l[g.value]);
|
|
198
209
|
return String(r ?? "").toLowerCase().indexOf(n.toLowerCase()) >= 0;
|
|
199
210
|
}, he = s(() => {
|
|
200
211
|
if (!Array.isArray(t.options)) return;
|
|
201
|
-
const e =
|
|
202
|
-
return Array.isArray(t.options) &&
|
|
203
|
-
}),
|
|
212
|
+
const e = yl(t.options);
|
|
213
|
+
return Array.isArray(t.options) && gl(t.options), e;
|
|
214
|
+
}), qe = s(() => {
|
|
204
215
|
const e = he.value ?? [];
|
|
205
|
-
return !te.value || !H.value ? e : e.filter((l) =>
|
|
216
|
+
return !te.value || !H.value ? e : e.filter((l) => He(H.value, l));
|
|
206
217
|
}), z = (e) => {
|
|
207
218
|
t.optionPagingDebug && k(() => {
|
|
208
219
|
});
|
|
209
|
-
}, oe = s(() => t.mode !== "combobox" && Array.isArray(a.value) ? a.value : a.value !== null && a.value !== void 0 && a.value !== "" ? [a.value] : []),
|
|
220
|
+
}, oe = s(() => t.mode !== "combobox" && Array.isArray(a.value) ? a.value : a.value !== null && a.value !== void 0 && a.value !== "" ? [a.value] : []), Ze = s(() => new Set(oe.value)), Sl = s(() => {
|
|
210
221
|
const e = Number(t.largeSelectionCollapseThreshold);
|
|
211
222
|
return Number.isFinite(e) && e >= 0 ? Math.floor(e) : 200;
|
|
212
|
-
}),
|
|
213
|
-
if (H.value ||
|
|
214
|
-
const n = new Set(e.map((u) => u == null ? void 0 : u[
|
|
223
|
+
}), C = s(() => t.mode !== "combobox" && oe.value.length > Sl.value), Cl = s(() => C.value ? [De] : a.value), Ke = s(() => Array.isArray(t.options) ? t.options.filter((e) => !(e != null && e.disabled)) : []), ne = s(() => Ke.value.map((e) => e == null ? void 0 : e[g.value])), me = s(() => ne.value.reduce((e, l) => Ze.value.has(l) ? e + 1 : e, 0)), wl = (e, l) => {
|
|
224
|
+
if (H.value || C.value || !oe.value.length) return e;
|
|
225
|
+
const n = new Set(e.map((u) => u == null ? void 0 : u[g.value])), o = [];
|
|
215
226
|
return oe.value.forEach((u) => {
|
|
216
227
|
if (n.has(u)) return;
|
|
217
228
|
const r = le(l, u);
|
|
218
229
|
r && (o.push(r), n.add(u));
|
|
219
230
|
}), o.length ? o.concat(e) : e;
|
|
220
|
-
},
|
|
231
|
+
}, xl = s(() => {
|
|
221
232
|
if (!te.value) return he.value;
|
|
222
|
-
const e =
|
|
223
|
-
return
|
|
224
|
-
}),
|
|
225
|
-
ee.value =
|
|
226
|
-
},
|
|
233
|
+
const e = qe.value.slice(0, ee.value);
|
|
234
|
+
return wl(e, he.value ?? []);
|
|
235
|
+
}), Ge = () => {
|
|
236
|
+
ee.value = We.value, z();
|
|
237
|
+
}, Al = () => {
|
|
227
238
|
te.value && (ee.value = Math.min(
|
|
228
|
-
ee.value +
|
|
229
|
-
|
|
239
|
+
ee.value + We.value,
|
|
240
|
+
qe.value.length
|
|
230
241
|
), z());
|
|
231
242
|
};
|
|
232
|
-
|
|
233
|
-
() => [t.options, t.optionPaging, t.optionPageSize, H.value,
|
|
234
|
-
|
|
243
|
+
j(
|
|
244
|
+
() => [t.options, t.optionPaging, t.optionPageSize, H.value, V.value, g.value],
|
|
245
|
+
Ge,
|
|
235
246
|
{ immediate: !0 }
|
|
236
247
|
);
|
|
237
|
-
const
|
|
238
|
-
if (
|
|
248
|
+
const ge = i(!1), ye = s(() => {
|
|
249
|
+
if (R.value !== null) return R.value;
|
|
239
250
|
if (t.open !== void 0) return t.open;
|
|
240
|
-
}), P = 1e6, d = i(100), v = i(100),
|
|
241
|
-
|
|
251
|
+
}), P = 1e6, d = i(100), v = i(100), Tl = s(() => C.value ? 0 : d.value), _ = i(!1), be = i(!0), Se = i(!1);
|
|
252
|
+
Ye(() => {
|
|
242
253
|
a.value && t.mode == "combobox" && (be.value = !0, setTimeout(() => {
|
|
243
254
|
var l;
|
|
244
255
|
let e = (l = A.value) == null ? void 0 : l.$el.querySelectorAll(".ant-select-selection-item");
|
|
@@ -249,21 +260,21 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
249
260
|
}
|
|
250
261
|
}, 300));
|
|
251
262
|
});
|
|
252
|
-
const
|
|
263
|
+
const kl = () => {
|
|
253
264
|
setTimeout(async () => {
|
|
254
|
-
d.value = 100, await
|
|
265
|
+
d.value = 100, await N(), d.value = v.value, S.value = !0;
|
|
255
266
|
}, 100);
|
|
256
267
|
};
|
|
257
|
-
|
|
258
|
-
|
|
268
|
+
Ye(() => {
|
|
269
|
+
Se.value === !0 && t.mode != "combobox" && a.value && a.value.length > 0 && t.options.length > 0 && (Se.value = !1, kl());
|
|
259
270
|
}), Ae(() => {
|
|
260
|
-
|
|
271
|
+
Se.value = !0, t.focusOpen || (v.value = 1, d.value = v.value, S.value = !0);
|
|
261
272
|
});
|
|
262
|
-
const
|
|
263
|
-
"z-index":
|
|
264
|
-
})),
|
|
265
|
-
if (
|
|
266
|
-
return
|
|
273
|
+
const Il = s(() => t.width ? t.width : "230px"), Vl = s(() => t.height ? t.height : "auto"), Ue = i(3e3), Ll = s(() => ({
|
|
274
|
+
"z-index": Ue.value
|
|
275
|
+
})), je = s(() => {
|
|
276
|
+
if (C.value)
|
|
277
|
+
return rl.value;
|
|
267
278
|
let e = [];
|
|
268
279
|
if (t.mode != "combobox" && Array.isArray(a.value))
|
|
269
280
|
a.value.map((l) => {
|
|
@@ -274,125 +285,126 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
274
285
|
const l = pe(a.value);
|
|
275
286
|
l != null ? e.push(l) : a.value !== null && a.value !== void 0 && a.value !== "" && e.push(String(a.value));
|
|
276
287
|
}
|
|
277
|
-
return
|
|
278
|
-
}),
|
|
288
|
+
return mt.value === "zh-CN" ? e.join("、") : e.join(", ");
|
|
289
|
+
}), Ml = s(() => t.mode === "combobox" ? !1 : ne.value.length > 0 && me.value === ne.value.length), Ol = s(() => t.mode === "combobox" ? !1 : me.value > 0 && me.value < ne.value.length), Xe = s(() => {
|
|
279
290
|
var e, l;
|
|
280
291
|
return t.optionFilterProp ? t.optionFilterProp : (e = t.fieldNames) != null && e.label ? (l = t.fieldNames) == null ? void 0 : l.label : "label";
|
|
281
|
-
}),
|
|
282
|
-
width: typeof t.width == "number" ? t.width + "px" : t.width
|
|
283
|
-
|
|
292
|
+
}), zl = s(() => ({
|
|
293
|
+
width: typeof t.width == "number" ? t.width + "px" : t.width,
|
|
294
|
+
"--das-select-resolved-height": ml.value
|
|
295
|
+
})), Ce = i(!1), Pl = i({
|
|
284
296
|
display: "block",
|
|
285
297
|
color: "var(--upf-color-error)",
|
|
286
298
|
"white-space": "break-spaces"
|
|
287
|
-
}), q = i(),
|
|
299
|
+
}), q = i(), _l = () => {
|
|
288
300
|
var n;
|
|
289
|
-
W.value = ze(),
|
|
301
|
+
W.value = ze(), $.value = Oe();
|
|
290
302
|
let e = (n = A.value) == null ? void 0 : n.$el.querySelectorAll(".ant-select-selection-item");
|
|
291
|
-
!!(Array.isArray(a.value) ? a.value.length : e != null && e.length) || W.value ===
|
|
292
|
-
},
|
|
303
|
+
!!(Array.isArray(a.value) ? a.value.length : e != null && e.length) || W.value === $.value || $.value - W.value < 1 ? O.value = !1 : (O.value = !0, q.value && clearTimeout(q.value)), Ce.value = !0;
|
|
304
|
+
}, Nl = () => {
|
|
293
305
|
q.value = setTimeout(() => {
|
|
294
306
|
O.value = !1;
|
|
295
|
-
}, 200),
|
|
296
|
-
},
|
|
297
|
-
e ?
|
|
298
|
-
},
|
|
299
|
-
e ? (
|
|
307
|
+
}, 200), Ce.value = !1;
|
|
308
|
+
}, El = (e, l) => {
|
|
309
|
+
e ? _l() : Nl();
|
|
310
|
+
}, Dl = (e) => {
|
|
311
|
+
e ? (Ue.value = yt().nextZIndex(), F.value = "", Ge(), z()) : (H.value = "", z()), ae.value = e, t.mode == "combobox" && (e || setTimeout(() => {
|
|
300
312
|
var l, n;
|
|
301
313
|
(n = (l = A.value) == null ? void 0 : l.blur) == null || n.call(l);
|
|
302
314
|
})), x("dropdownVisibleChange", e);
|
|
303
|
-
},
|
|
304
|
-
H.value = e ?? "", z(),
|
|
305
|
-
},
|
|
306
|
-
if (
|
|
315
|
+
}, Bl = (e) => {
|
|
316
|
+
H.value = e ?? "", z(), Fe("onSearch", e);
|
|
317
|
+
}, $l = s(() => t.mode === "combobox" ? t.showSearch === !0 : t.mode === "tags" ? !0 : typeof t.showSearch == "boolean" ? t.showSearch : t.mode === "multiple"), Wl = s(() => $l.value ? { onSearch: Bl } : {}), Rl = s(() => ({ ...al.value, ...Wl.value })), Fl = (e) => {
|
|
318
|
+
if (Fe("onPopupScroll", e), !te.value) return;
|
|
307
319
|
const l = e.target;
|
|
308
320
|
if (!l) return;
|
|
309
|
-
l.scrollHeight - l.scrollTop - l.clientHeight <= 24 &&
|
|
310
|
-
},
|
|
321
|
+
l.scrollHeight - l.scrollTop - l.clientHeight <= 24 && Al();
|
|
322
|
+
}, Hl = (e) => {
|
|
311
323
|
let l = e.toString();
|
|
312
324
|
return l.length > t.maxTagTextLength && (l = l.substr(0, t.maxTagTextLength) + "..."), l;
|
|
313
|
-
},
|
|
325
|
+
}, ql = (e) => t.isRenderNode ? B.value : t.getPopupContainer === void 0 ? document.body : t.getPopupContainer(e), Zl = (e) => {
|
|
314
326
|
if (e) {
|
|
315
327
|
const l = new Set(Array.isArray(a.value) ? a.value : []), n = Array.isArray(a.value) ? a.value.slice() : [], o = [];
|
|
316
|
-
|
|
317
|
-
const r = u[
|
|
328
|
+
Ke.value.forEach((u) => {
|
|
329
|
+
const r = u[g.value];
|
|
318
330
|
l.has(r) || (l.add(r), n.push(r), o.push(u));
|
|
319
331
|
}), a.value = n, se(n, o, "inner");
|
|
320
332
|
} else {
|
|
321
|
-
const l = Array.isArray(t.options) ? t.options : [], n = new Set(l.map((r) => r == null ? void 0 : r[
|
|
333
|
+
const l = Array.isArray(t.options) ? t.options : [], n = new Set(l.map((r) => r == null ? void 0 : r[g.value])), o = new Set(l.filter((r) => r == null ? void 0 : r.disabled).map((r) => r == null ? void 0 : r[g.value])), u = (Array.isArray(a.value) ? a.value : []).filter((r) => n.has(r) && o.has(r));
|
|
322
334
|
a.value = u, se(u, [], "inner");
|
|
323
335
|
}
|
|
324
|
-
},
|
|
336
|
+
}, Kl = (e) => {
|
|
325
337
|
const l = Array.isArray(a.value) ? a.value.slice() : [], n = l.findIndex((o) => o === e);
|
|
326
338
|
return n > -1 ? l.splice(n, 1) : l.push(e), l;
|
|
327
|
-
},
|
|
328
|
-
|
|
329
|
-
},
|
|
330
|
-
if (!
|
|
339
|
+
}, Gl = (e) => {
|
|
340
|
+
C.value && (e.preventDefault(), e.stopPropagation());
|
|
341
|
+
}, Ul = (e, l) => {
|
|
342
|
+
if (!C.value || e != null && e.disabled) return;
|
|
331
343
|
l.preventDefault(), l.stopPropagation();
|
|
332
|
-
const n = e == null ? void 0 : e[
|
|
344
|
+
const n = e == null ? void 0 : e[g.value];
|
|
333
345
|
if (n === void 0) return;
|
|
334
|
-
const o =
|
|
346
|
+
const o = Kl(n);
|
|
335
347
|
a.value = o, se(o, e, "inner");
|
|
336
|
-
},
|
|
348
|
+
}, jl = (e) => {
|
|
337
349
|
if (e.className.indexOf("ant-select-multiple") > -1 && e.children[0])
|
|
338
350
|
return e.children[0];
|
|
339
|
-
},
|
|
351
|
+
}, Xl = (e) => {
|
|
340
352
|
if (t.mode == "combobox") {
|
|
341
353
|
x("focus", e);
|
|
342
354
|
return;
|
|
343
355
|
}
|
|
344
|
-
|
|
345
|
-
}, ae = i(!1),
|
|
356
|
+
ge.value = !0, t.focusOpen && !t.isExterControlCount && (d.value = P, S.value = !1), x("focus", e);
|
|
357
|
+
}, ae = i(!1), Jl = () => {
|
|
346
358
|
ae.value || setTimeout(() => {
|
|
347
359
|
var e, l;
|
|
348
360
|
(l = (e = A.value) == null ? void 0 : e.blur) == null || l.call(e);
|
|
349
361
|
}), t.mode != "combobox";
|
|
350
|
-
},
|
|
362
|
+
}, Je = (e) => {
|
|
351
363
|
if (k(() => {
|
|
352
364
|
ae.value = !1;
|
|
353
365
|
}), t.mode == "combobox") {
|
|
354
366
|
x("blur", e);
|
|
355
367
|
return;
|
|
356
368
|
}
|
|
357
|
-
|
|
358
|
-
},
|
|
369
|
+
ge.value = !1, t.focusOpen && !t.isExterControlCount && (N(), d.value = v.value, S.value = !0), x("blur", e);
|
|
370
|
+
}, Ql = (e) => {
|
|
359
371
|
e.onClose(), d.value = 100, k(() => {
|
|
360
|
-
t.mode !== "combobox" &&
|
|
372
|
+
t.mode !== "combobox" && ye.value || t.focusOpen && (N(), d.value = v.value, S.value = !0);
|
|
361
373
|
});
|
|
362
374
|
};
|
|
363
|
-
|
|
375
|
+
j(
|
|
364
376
|
() => t.disabled || t.isView,
|
|
365
377
|
(e) => {
|
|
366
378
|
if (e && t.mode !== "combobox") {
|
|
367
|
-
|
|
379
|
+
ge.value = !1;
|
|
368
380
|
let l = new Event("blur");
|
|
369
|
-
|
|
381
|
+
Je(l);
|
|
370
382
|
}
|
|
371
383
|
}
|
|
372
384
|
);
|
|
373
|
-
let
|
|
374
|
-
const
|
|
375
|
-
|
|
376
|
-
|
|
385
|
+
let G = i(!1);
|
|
386
|
+
const Yl = (e) => {
|
|
387
|
+
G.value = e, _.value = !0, k(() => {
|
|
388
|
+
_.value = !1, t.focusOpen && (N(), d.value = e ? P : v.value, S.value = !e);
|
|
377
389
|
});
|
|
378
390
|
};
|
|
379
391
|
let re = null;
|
|
380
392
|
Ae(() => {
|
|
381
393
|
re = new IntersectionObserver((e) => {
|
|
382
394
|
e && e[0] && e[0].intersectionRatio > 0 && t.focusOpen && d.value === 0 && (d.value = 100, k(() => {
|
|
383
|
-
|
|
395
|
+
N(), d.value = v.value, S.value = !0;
|
|
384
396
|
}));
|
|
385
|
-
}), re.observe(
|
|
386
|
-
}),
|
|
397
|
+
}), re.observe(B.value);
|
|
398
|
+
}), Qe(() => {
|
|
387
399
|
re && re.disconnect();
|
|
388
400
|
});
|
|
389
|
-
const
|
|
390
|
-
var
|
|
391
|
-
if (
|
|
401
|
+
const N = () => {
|
|
402
|
+
var U;
|
|
403
|
+
if (C.value) {
|
|
392
404
|
v.value = 0;
|
|
393
405
|
return;
|
|
394
406
|
}
|
|
395
|
-
let e = (
|
|
407
|
+
let e = (U = A.value) == null ? void 0 : U.$el;
|
|
396
408
|
if (!e) return;
|
|
397
409
|
let l = e == null ? void 0 : e.querySelector(".ant-select-selection-overflow");
|
|
398
410
|
if (!l) return;
|
|
@@ -412,24 +424,24 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
412
424
|
}
|
|
413
425
|
if (v.value === 0) {
|
|
414
426
|
let h = r[0], xe = h.querySelector(".anticon-close") ? 86 : 69;
|
|
415
|
-
h && !h.classList.contains("ant-select-selection-overflow-item-rest") && xe <= n - u && !
|
|
427
|
+
h && !h.classList.contains("ant-select-selection-overflow-item-rest") && xe <= n - u && !Ee.tagRender && (v.value = 1, h.classList.add("ellipsis"));
|
|
416
428
|
}
|
|
417
|
-
},
|
|
418
|
-
|
|
429
|
+
}, we = i(!1);
|
|
430
|
+
j(
|
|
419
431
|
() => a.value,
|
|
420
432
|
async () => {
|
|
421
|
-
if (
|
|
422
|
-
|
|
433
|
+
if (we.value) {
|
|
434
|
+
we.value = !1;
|
|
423
435
|
return;
|
|
424
436
|
}
|
|
425
|
-
t.mode !== "combobox" &&
|
|
437
|
+
t.mode !== "combobox" && ye.value || (_.value = !0, d.value = P, await k(), await N(), _.value = !1, t.isExterControlCount && t.focusOpen ? (d.value = G.value ? P : v.value, S.value = !G.value) : (d.value = v.value, S.value = !0));
|
|
426
438
|
}
|
|
427
439
|
);
|
|
428
|
-
const
|
|
429
|
-
if (!
|
|
440
|
+
const et = (e) => {
|
|
441
|
+
if (!C.value || t.mode === "combobox") return e;
|
|
430
442
|
const l = Array.isArray(e) ? e : e == null ? [] : [e];
|
|
431
443
|
if (!l.length) return [];
|
|
432
|
-
const n = Array.from(new Set(l.filter((u) => u !==
|
|
444
|
+
const n = Array.from(new Set(l.filter((u) => u !== De)));
|
|
433
445
|
if (!n.length) return;
|
|
434
446
|
let o = Array.isArray(a.value) ? a.value.slice() : [];
|
|
435
447
|
return n.forEach((u) => {
|
|
@@ -438,113 +450,113 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
438
450
|
}), o;
|
|
439
451
|
}, se = async (e, l, n = "antdv") => {
|
|
440
452
|
ae.value = !1, t.mode === "combobox" && fe();
|
|
441
|
-
let o = n === "antdv" ?
|
|
453
|
+
let o = n === "antdv" ? et(e) : e;
|
|
442
454
|
if (o === void 0) {
|
|
443
455
|
z();
|
|
444
456
|
return;
|
|
445
457
|
}
|
|
446
|
-
|
|
458
|
+
we.value = !0, t.noDropdown && Array.isArray(o) && t.maxTagsLength < o.length && (o = o.slice(), o.pop()), n === "antdv" && C.value && (a.value = o), _.value = !0, x("update:model-value", o), x("change", o, l), z(), d.value = P, await k(), await N(), _.value = !1, t.isExterControlCount && t.focusOpen && (d.value = G.value ? P : v.value, S.value = !G.value), t.focusOpen || (d.value = v.value);
|
|
447
459
|
};
|
|
448
|
-
return
|
|
460
|
+
return E({
|
|
449
461
|
$select: A,
|
|
450
|
-
toChangeMaxCount:
|
|
462
|
+
toChangeMaxCount: Yl
|
|
451
463
|
}), (e, l) => {
|
|
452
|
-
const n =
|
|
453
|
-
return f(),
|
|
464
|
+
const n = nt("v-nodes");
|
|
465
|
+
return f(), y(
|
|
454
466
|
"div",
|
|
455
467
|
{
|
|
456
|
-
class:
|
|
468
|
+
class: at(["das-ui-select", [
|
|
457
469
|
t.borderType,
|
|
458
470
|
t.isView ? "readonly" : "",
|
|
459
471
|
t.error ? "is-error" : "",
|
|
460
|
-
|
|
472
|
+
S.value ? "show-ellipsis" : ""
|
|
461
473
|
]]),
|
|
462
474
|
ref_key: "$selectBox",
|
|
463
|
-
ref:
|
|
464
|
-
style: X(
|
|
465
|
-
onClick: ue(
|
|
475
|
+
ref: B,
|
|
476
|
+
style: X(zl.value),
|
|
477
|
+
onClick: ue(Jl, ["stop"])
|
|
466
478
|
},
|
|
467
479
|
[
|
|
468
|
-
de.value ? (f(), K(c(
|
|
480
|
+
de.value ? (f(), K(c(ct), {
|
|
469
481
|
key: 0,
|
|
470
482
|
ref_key: "inputTooltipRef",
|
|
471
483
|
ref: Me,
|
|
472
484
|
placement: "top",
|
|
473
485
|
"virtual-triggering": "",
|
|
474
486
|
"virtual-ref": de.value,
|
|
475
|
-
disabled:
|
|
476
|
-
content:
|
|
487
|
+
disabled: sl.value,
|
|
488
|
+
content: ul.value
|
|
477
489
|
}, null, 8, ["virtual-ref", "disabled", "content"])) : L("v-if", !0),
|
|
478
|
-
Te((f(), K(c(
|
|
479
|
-
value:
|
|
490
|
+
Te((f(), K(c(ut), Le({ mode: fl.value }, Rl.value, {
|
|
491
|
+
value: Cl.value,
|
|
480
492
|
ref_key: "$select",
|
|
481
493
|
ref: A,
|
|
482
|
-
options:
|
|
494
|
+
options: xl.value,
|
|
483
495
|
fieldNames: p.fieldNames,
|
|
484
496
|
bordered: t.borderType === "bordered",
|
|
485
497
|
disabled: t.disabled || t.isView,
|
|
486
498
|
showArrow: !0,
|
|
487
|
-
open: t.noDropdown ? !1 :
|
|
499
|
+
open: t.noDropdown ? !1 : ye.value,
|
|
488
500
|
placeholder: Y.value,
|
|
489
501
|
showSearch: t.showSearch,
|
|
490
|
-
optionFilterProp:
|
|
491
|
-
filterOption:
|
|
492
|
-
size:
|
|
502
|
+
optionFilterProp: Xe.value,
|
|
503
|
+
filterOption: He,
|
|
504
|
+
size: $e.value,
|
|
493
505
|
style: t.size == "mini" || t.size == "table" ? { fontSize: "12px" } : {},
|
|
494
506
|
dropdownClassName: "das-ui-select-dorpdown " + p.dropdownClassName,
|
|
495
|
-
maxTagCount:
|
|
496
|
-
getPopupContainer:
|
|
497
|
-
dropdownStyle:
|
|
498
|
-
onDropdownVisibleChange:
|
|
507
|
+
maxTagCount: Tl.value,
|
|
508
|
+
getPopupContainer: ql,
|
|
509
|
+
dropdownStyle: Ll.value,
|
|
510
|
+
onDropdownVisibleChange: Dl,
|
|
499
511
|
onChange: l[4] || (l[4] = (o, u) => se(o, u, "antdv")),
|
|
500
|
-
onFocus:
|
|
501
|
-
onBlur:
|
|
502
|
-
onPopupScroll:
|
|
503
|
-
}),
|
|
512
|
+
onFocus: Xl,
|
|
513
|
+
onBlur: Je,
|
|
514
|
+
onPopupScroll: Fl
|
|
515
|
+
}), rt({
|
|
504
516
|
option: m((o) => [
|
|
505
|
-
|
|
517
|
+
w(e.$slots, "option", ie(ce(o)), () => [
|
|
506
518
|
o.children && typeof o.children == "function" ? (f(), K(n, {
|
|
507
519
|
key: 0,
|
|
508
520
|
vnodes: o.children()
|
|
509
|
-
}, null, 8, ["vnodes"])) : (f(),
|
|
521
|
+
}, null, 8, ["vnodes"])) : (f(), y(
|
|
510
522
|
ke,
|
|
511
523
|
{ key: 1 },
|
|
512
524
|
[
|
|
513
525
|
L(' :option="{value, label, [disabled, key, title]}" '),
|
|
514
|
-
p.mode === "combobox" ? Te((f(),
|
|
515
|
-
|
|
516
|
-
Z(o[
|
|
526
|
+
p.mode === "combobox" ? Te((f(), y("div", wt, [
|
|
527
|
+
Ie(
|
|
528
|
+
Z(o[V.value]),
|
|
517
529
|
1
|
|
518
530
|
/* TEXT */
|
|
519
531
|
)
|
|
520
532
|
])), [
|
|
521
|
-
[c(
|
|
522
|
-
]) : (f(),
|
|
533
|
+
[c(ll)]
|
|
534
|
+
]) : (f(), y(
|
|
523
535
|
ke,
|
|
524
536
|
{ key: 1 },
|
|
525
537
|
[
|
|
526
538
|
L(` <das-tooltip v-if="mode === 'combobox'" placement="right-start" :text="option[labelKeyName]"></das-tooltip> `),
|
|
527
539
|
b("div", {
|
|
528
540
|
class: "das-multiple-option-item",
|
|
529
|
-
onMousedown:
|
|
530
|
-
onClick: (u) =>
|
|
541
|
+
onMousedown: Gl,
|
|
542
|
+
onClick: (u) => Ul(o, u)
|
|
531
543
|
}, [
|
|
532
|
-
(f(), K(c(
|
|
544
|
+
(f(), K(c(el), {
|
|
533
545
|
class: "das-select-checkbox",
|
|
534
|
-
modelValue:
|
|
535
|
-
key: o[
|
|
546
|
+
modelValue: Ze.value.has(o[g.value]),
|
|
547
|
+
key: o[g.value],
|
|
536
548
|
disabled: o.disabled
|
|
537
549
|
}, null, 8, ["modelValue", "disabled"])),
|
|
538
|
-
Te((f(),
|
|
539
|
-
|
|
540
|
-
Z(o[
|
|
550
|
+
Te((f(), y("div", At, [
|
|
551
|
+
Ie(
|
|
552
|
+
Z(o[V.value]),
|
|
541
553
|
1
|
|
542
554
|
/* TEXT */
|
|
543
555
|
)
|
|
544
556
|
])), [
|
|
545
|
-
[c(
|
|
557
|
+
[c(ll)]
|
|
546
558
|
])
|
|
547
|
-
], 40,
|
|
559
|
+
], 40, xt)
|
|
548
560
|
],
|
|
549
561
|
2112
|
|
550
562
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
@@ -556,24 +568,24 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
556
568
|
], !0)
|
|
557
569
|
]),
|
|
558
570
|
tagRender: m((o) => [
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
closable: !
|
|
571
|
+
w(e.$slots, "tagRender", ie(ce(o)), () => [
|
|
572
|
+
I(c(Ve), {
|
|
573
|
+
closable: !C.value && o.closable,
|
|
562
574
|
style: { "margin-right": "3px", "background-color": "transparent" },
|
|
563
|
-
onClose: (u) =>
|
|
575
|
+
onClose: (u) => Ql(o)
|
|
564
576
|
}, {
|
|
565
577
|
default: m(() => [
|
|
566
|
-
|
|
578
|
+
C.value ? (f(), y("span", {
|
|
567
579
|
key: 0,
|
|
568
580
|
innerHTML: c(M)("das-ui-select-selectedItemsCountWithPlaceholder", Q.value)
|
|
569
|
-
}, null, 8,
|
|
581
|
+
}, null, 8, Tt)) : (f(), y(
|
|
570
582
|
"span",
|
|
571
583
|
{
|
|
572
584
|
key: 1,
|
|
573
585
|
class: "tag-span",
|
|
574
586
|
style: X(t.size == "mini" || t.size == "table" ? { fontSize: "12px" } : {})
|
|
575
587
|
},
|
|
576
|
-
Z(
|
|
588
|
+
Z(Hl(pe(o.value) ?? o.label ?? String(o.value))),
|
|
577
589
|
5
|
|
578
590
|
/* TEXT, STYLE */
|
|
579
591
|
))
|
|
@@ -584,17 +596,17 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
584
596
|
], !0)
|
|
585
597
|
]),
|
|
586
598
|
dropdownRender: m(({ menuNode: o }) => [
|
|
587
|
-
|
|
599
|
+
w(e.$slots, "dropdownRender", ie(ce({ menuNode: o })), () => {
|
|
588
600
|
var u;
|
|
589
601
|
return [
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
])) :
|
|
602
|
+
_e.value === "combobox" ? (f(), y("div", kt, [
|
|
603
|
+
I(n, { vnodes: o }, null, 8, ["vnodes"])
|
|
604
|
+
])) : _e.value === "custom" ? (f(), y("div", {
|
|
593
605
|
key: 1,
|
|
594
606
|
onClick: l[2] || (l[2] = ue(() => {
|
|
595
607
|
}, ["stop"]))
|
|
596
608
|
}, [
|
|
597
|
-
|
|
609
|
+
I(n, { vnodes: o }, null, 8, ["vnodes"]),
|
|
598
610
|
b(
|
|
599
611
|
"div",
|
|
600
612
|
{
|
|
@@ -602,14 +614,14 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
602
614
|
onMousedown: l[1] || (l[1] = (r) => r.preventDefault())
|
|
603
615
|
},
|
|
604
616
|
[
|
|
605
|
-
|
|
617
|
+
I(c(dt), Le({
|
|
606
618
|
ref_key: "testInput",
|
|
607
|
-
ref:
|
|
608
|
-
modelValue:
|
|
609
|
-
"onUpdate:modelValue": l[0] || (l[0] = (r) =>
|
|
610
|
-
onKeyup:
|
|
611
|
-
onFocus: ue(
|
|
612
|
-
onBlur: ue(
|
|
619
|
+
ref: il,
|
|
620
|
+
modelValue: F.value,
|
|
621
|
+
"onUpdate:modelValue": l[0] || (l[0] = (r) => F.value = r),
|
|
622
|
+
onKeyup: st(Ne, ["enter"]),
|
|
623
|
+
onFocus: ue(cl, ["stop"]),
|
|
624
|
+
onBlur: ue(dl, ["stop"]),
|
|
613
625
|
width: "100%",
|
|
614
626
|
borderType: "bordered"
|
|
615
627
|
}, t.inputAttrs), null, 16, ["modelValue"]),
|
|
@@ -617,7 +629,7 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
617
629
|
"div",
|
|
618
630
|
{
|
|
619
631
|
class: "addBtn",
|
|
620
|
-
onClick:
|
|
632
|
+
onClick: Ne
|
|
621
633
|
},
|
|
622
634
|
Z(c(M)("添加")),
|
|
623
635
|
1
|
|
@@ -627,9 +639,9 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
627
639
|
32
|
|
628
640
|
/* NEED_HYDRATION */
|
|
629
641
|
)
|
|
630
|
-
])) : (f(),
|
|
631
|
-
|
|
632
|
-
(u = t.options) != null && u.length && t.showSelectAll ? (f(),
|
|
642
|
+
])) : (f(), y("div", It, [
|
|
643
|
+
I(n, { vnodes: o }, null, 8, ["vnodes"]),
|
|
644
|
+
(u = t.options) != null && u.length && t.showSelectAll ? (f(), y(
|
|
633
645
|
"div",
|
|
634
646
|
{
|
|
635
647
|
key: 0,
|
|
@@ -637,15 +649,15 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
637
649
|
onMousedown: l[3] || (l[3] = (r) => r.preventDefault())
|
|
638
650
|
},
|
|
639
651
|
[
|
|
640
|
-
b("div",
|
|
641
|
-
|
|
642
|
-
modelValue:
|
|
643
|
-
indeterminate:
|
|
644
|
-
onChange:
|
|
652
|
+
b("div", Vt, [
|
|
653
|
+
I(c(el), {
|
|
654
|
+
modelValue: Ml.value,
|
|
655
|
+
indeterminate: Ol.value,
|
|
656
|
+
onChange: Zl,
|
|
645
657
|
style: { display: "flex" }
|
|
646
658
|
}, {
|
|
647
659
|
default: m(() => [
|
|
648
|
-
|
|
660
|
+
Ie(
|
|
649
661
|
Z(c(M)("全选")),
|
|
650
662
|
1
|
|
651
663
|
/* TEXT */
|
|
@@ -658,7 +670,7 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
658
670
|
b("span", {
|
|
659
671
|
class: "das-ui-dropdown-has-checked",
|
|
660
672
|
innerHTML: c(M)("das-ui-select-selectedItemsCountWithPlaceholder", Q.value)
|
|
661
|
-
}, null, 8,
|
|
673
|
+
}, null, 8, Lt)
|
|
662
674
|
],
|
|
663
675
|
32
|
|
664
676
|
/* NEED_HYDRATION */
|
|
@@ -668,20 +680,20 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
668
680
|
}, !0)
|
|
669
681
|
]),
|
|
670
682
|
clearIcon: m(() => [
|
|
671
|
-
|
|
672
|
-
|
|
683
|
+
w(e.$slots, "clearIcon", {}, () => [
|
|
684
|
+
I(c(vt), { size: "medium" })
|
|
673
685
|
], !0)
|
|
674
686
|
]),
|
|
675
687
|
maxTagPlaceholder: m((o) => [
|
|
676
|
-
|
|
688
|
+
w(e.$slots, "maxTagPlaceholder", ie(ce(o)), () => [
|
|
677
689
|
L(" 隐藏tag时显示的内容 "),
|
|
678
|
-
|
|
690
|
+
I(c(Ve), {
|
|
679
691
|
style: X(t.size == "mini" || t.size == "table" ? { fontSize: "12px" } : {})
|
|
680
692
|
}, {
|
|
681
693
|
default: m(() => [
|
|
682
694
|
b("span", {
|
|
683
695
|
innerHTML: c(M)("das-ui-select-selectedItemsCountWithPlaceholder", Q.value)
|
|
684
|
-
}, null, 8,
|
|
696
|
+
}, null, 8, Mt)
|
|
685
697
|
]),
|
|
686
698
|
_: 1
|
|
687
699
|
/* STABLE */
|
|
@@ -690,7 +702,7 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
690
702
|
], !0)
|
|
691
703
|
]),
|
|
692
704
|
notFoundContent: m(() => [
|
|
693
|
-
|
|
705
|
+
w(e.$slots, "notFoundContent", {}, () => [
|
|
694
706
|
l[5] || (l[5] = b(
|
|
695
707
|
"div",
|
|
696
708
|
{ class: "hasNoData" },
|
|
@@ -701,15 +713,15 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
701
713
|
], !0)
|
|
702
714
|
]),
|
|
703
715
|
suffixIcon: m(() => [
|
|
704
|
-
|
|
705
|
-
|
|
716
|
+
w(e.$slots, "suffixIcon", {}, () => [
|
|
717
|
+
I(c(ft), {
|
|
706
718
|
class: "das-suffix-icon",
|
|
707
719
|
size: "medium"
|
|
708
720
|
})
|
|
709
721
|
], !0)
|
|
710
722
|
]),
|
|
711
723
|
default: m(() => [
|
|
712
|
-
|
|
724
|
+
w(e.$slots, "default", {}, void 0, !0)
|
|
713
725
|
]),
|
|
714
726
|
_: 2
|
|
715
727
|
/* DYNAMIC */
|
|
@@ -717,44 +729,44 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
717
729
|
e.$slots.menuItemSelectedIcon ? {
|
|
718
730
|
name: "menuItemSelectedIcon",
|
|
719
731
|
fn: m(() => [
|
|
720
|
-
|
|
732
|
+
w(e.$slots, "menuItemSelectedIcon", {}, void 0, !0)
|
|
721
733
|
]),
|
|
722
734
|
key: "0"
|
|
723
735
|
} : void 0,
|
|
724
736
|
e.$slots.placeholder ? {
|
|
725
737
|
name: "placeholder",
|
|
726
738
|
fn: m(() => [
|
|
727
|
-
|
|
739
|
+
w(e.$slots, "placeholder", {}, void 0, !0)
|
|
728
740
|
]),
|
|
729
741
|
key: "1"
|
|
730
742
|
} : void 0,
|
|
731
743
|
e.$slots.removeIcon ? {
|
|
732
744
|
name: "removeIcon",
|
|
733
745
|
fn: m(() => [
|
|
734
|
-
|
|
746
|
+
w(e.$slots, "removeIcon", {}, void 0, !0)
|
|
735
747
|
]),
|
|
736
748
|
key: "2"
|
|
737
749
|
} : void 0
|
|
738
750
|
]), 1040, ["mode", "value", "options", "fieldNames", "bordered", "disabled", "open", "placeholder", "showSearch", "optionFilterProp", "size", "style", "dropdownClassName", "maxTagCount", "dropdownStyle"])), [
|
|
739
|
-
[c(
|
|
740
|
-
[c(
|
|
751
|
+
[c(it), { target: jl, x: !1 }],
|
|
752
|
+
[c(ht), El]
|
|
741
753
|
]),
|
|
742
|
-
p.error && p.errorLabel ? (f(),
|
|
754
|
+
p.error && p.errorLabel ? (f(), y(
|
|
743
755
|
ke,
|
|
744
756
|
{ key: 1 },
|
|
745
757
|
[
|
|
746
|
-
p.errorMode === "default" ? (f(),
|
|
758
|
+
p.errorMode === "default" ? (f(), y("div", Ot, [
|
|
747
759
|
b(
|
|
748
760
|
"span",
|
|
749
761
|
{
|
|
750
|
-
style: X(
|
|
762
|
+
style: X(Pl.value)
|
|
751
763
|
},
|
|
752
764
|
Z(p.errorLabel),
|
|
753
765
|
5
|
|
754
766
|
/* TEXT, STYLE */
|
|
755
767
|
)
|
|
756
768
|
])) : L("v-if", !0),
|
|
757
|
-
p.errorMode === "overlay" &&
|
|
769
|
+
p.errorMode === "overlay" && Ce.value ? (f(), K(c(pt), {
|
|
758
770
|
key: 1,
|
|
759
771
|
errorLabel: p.errorLabel,
|
|
760
772
|
getEl: () => A.value.$el,
|
|
@@ -773,16 +785,16 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
773
785
|
style: { position: "absolute", left: "-50%", top: "-50%", opacity: "0", "pointer-events": "none" }
|
|
774
786
|
},
|
|
775
787
|
[
|
|
776
|
-
b("div",
|
|
777
|
-
b("div",
|
|
778
|
-
b("span",
|
|
779
|
-
|
|
788
|
+
b("div", zt, [
|
|
789
|
+
b("div", Pt, [
|
|
790
|
+
b("span", _t, [
|
|
791
|
+
I(c(Ve), {
|
|
780
792
|
style: X(t.size == "mini" || t.size == "table" ? { fontSize: "12px" } : {})
|
|
781
793
|
}, {
|
|
782
794
|
default: m(() => [
|
|
783
795
|
b("span", {
|
|
784
796
|
innerHTML: c(M)("das-ui-select-selectedItemsCountWithPlaceholder", Q.value)
|
|
785
|
-
}, null, 8,
|
|
797
|
+
}, null, 8, Nt)
|
|
786
798
|
]),
|
|
787
799
|
_: 1
|
|
788
800
|
/* STABLE */
|
|
@@ -800,23 +812,23 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
800
812
|
);
|
|
801
813
|
};
|
|
802
814
|
}
|
|
803
|
-
}),
|
|
804
|
-
const
|
|
805
|
-
for (const [t, x] of
|
|
806
|
-
|
|
807
|
-
return
|
|
808
|
-
},
|
|
809
|
-
function
|
|
810
|
-
const
|
|
815
|
+
}), nl = (p, E) => {
|
|
816
|
+
const D = p.__vccOpts || p;
|
|
817
|
+
for (const [t, x] of E)
|
|
818
|
+
D[t] = x;
|
|
819
|
+
return D;
|
|
820
|
+
}, Bt = /* @__PURE__ */ nl(Dt, [["__scopeId", "data-v-c294ab77"]]), $t = {};
|
|
821
|
+
function Wt(p, E) {
|
|
822
|
+
const D = Ct;
|
|
811
823
|
return f(), K(
|
|
812
|
-
|
|
824
|
+
D,
|
|
813
825
|
Le({ class: "das-ui-select-option" }, p.$attrs),
|
|
814
826
|
null,
|
|
815
827
|
16
|
|
816
828
|
/* FULL_PROPS */
|
|
817
829
|
);
|
|
818
830
|
}
|
|
819
|
-
const
|
|
831
|
+
const Rt = /* @__PURE__ */ nl($t, [["render", Wt]]), Ft = {
|
|
820
832
|
添加: { "zh-CN": "添加", en: "Add", "zh-MO": "添加", _appCode: "framework" },
|
|
821
833
|
全选: { "zh-CN": "全选", en: "Select All", "zh-MO": "全選", _appCode: "framework" },
|
|
822
834
|
已选: { "zh-CN": "已选", en: "Selected", "zh-MO": "已選", _appCode: "framework" },
|
|
@@ -827,10 +839,10 @@ const Dt = /* @__PURE__ */ tl(Nt, [["render", _t]]), Bt = {
|
|
|
827
839
|
_appCode: "framework"
|
|
828
840
|
}
|
|
829
841
|
};
|
|
830
|
-
|
|
831
|
-
const
|
|
842
|
+
gt(Ft);
|
|
843
|
+
const io = tl(Bt), co = tl(Rt), fo = { name: "select 选择器" };
|
|
832
844
|
export {
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
845
|
+
io as DasSelect,
|
|
846
|
+
co as DasSelectOption,
|
|
847
|
+
fo as default
|
|
836
848
|
};
|