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