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