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