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