z-vue-design 0.0.86 → 0.0.88
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/README.md +182 -15
- package/dist/DownOutlined-BrYBGypf.mjs +35 -0
- package/dist/SearchOutlined-BNT7uPts.mjs +234 -0
- package/dist/{UtilsEmpty-B_xFeZwK.mjs → UtilsEmpty-B6WwrOTe.mjs} +2 -2
- package/dist/{ZDatePicker-_iOnGzI5.mjs → ZDatePicker-EOtFAGoi.mjs} +3 -3
- package/dist/ZInput-Ds2otBpn.mjs +1151 -0
- package/dist/ZRangeNum-C0U4pbD8.mjs +58 -0
- package/dist/{ZRangePicker-DEc9ZFHk.mjs → ZRangePicker-mof2hLjj.mjs} +5 -5
- package/dist/{ZSelect-CqYr-KaO.mjs → ZSelect-BjET2NWH.mjs} +64 -63
- package/dist/{ZSwitch-QdXAUbbQ.mjs → ZSwitch-e3cBfhVO.mjs} +4 -4
- package/dist/{ZTimePicker-ChueuS5q.mjs → ZTimePicker-CtXWBdG1.mjs} +3 -3
- package/dist/{ZTimeRangePicker-D9QmtL5j.mjs → ZTimeRangePicker-DtMcg82P.mjs} +7 -7
- package/dist/{dayjs-BaYokJbL.mjs → dayjs-CIEUg31L.mjs} +10 -10
- package/dist/{dayjs-D0ij1LGv.mjs → dayjs-CggiMIMx.mjs} +2 -2
- package/dist/index-B9t17rBN.mjs +1356 -0
- package/dist/{index-OVDVakdf.mjs → index-Cb-rHwx_.mjs} +7 -7
- package/dist/{index-BqCcUSZ_.mjs → index-CevsYPck.mjs} +2083 -2085
- package/dist/{slide-Df0ggJ0k.mjs → slide-CriZ4J2L.mjs} +1 -1
- package/dist/{statusUtils-Dl7LD-4k.mjs → statusUtils-DvyrBsJJ.mjs} +1 -1
- package/dist/styles/z-vue-design.css +1 -1
- package/dist/z-vue-design.es.js +1 -1
- package/dist/z-vue-design.umd.js +63 -63
- package/dist/{zh_CN-Ci4SAGB1.mjs → zh_CN-Cz2gX8l_.mjs} +245 -245
- package/package.json +1 -1
- package/dist/SearchOutlined-CNVKSbgO.mjs +0 -264
- package/dist/ZInput-DwKbIjYr.mjs +0 -2497
|
@@ -0,0 +1,1356 @@
|
|
|
1
|
+
import { q as Te, d as z, g as Xe, P as X, p as ee, c as D, a as V, o as Q, t as Ae, u as Fe, F as ue, k as se, l as Je, m as je, C as Me, N as _e, n as Pe, v as et, B as tt, x as J, y as nt, b as fe, z as at, R as lt, I as Ve, A as ot } from "./index-CevsYPck.mjs";
|
|
2
|
+
import { defineComponent as K, ref as Z, createVNode as y, shallowRef as U, watch as ie, computed as Y, onMounted as ke, Fragment as De, nextTick as pe, onBeforeUpdate as rt, onBeforeUnmount as ye, watchEffect as we, getCurrentInstance as Le } from "vue";
|
|
3
|
+
import { g as Se, a as le } from "./statusUtils-DvyrBsJJ.mjs";
|
|
4
|
+
import { B as We, S as ut } from "./SearchOutlined-BNT7uPts.mjs";
|
|
5
|
+
import { u as Ie } from "./index-Cb-rHwx_.mjs";
|
|
6
|
+
const oe = (e) => e != null && (Array.isArray(e) ? Te(e).length : !0);
|
|
7
|
+
function $e(e) {
|
|
8
|
+
return oe(e.prefix) || oe(e.suffix) || oe(e.allowClear);
|
|
9
|
+
}
|
|
10
|
+
function ve(e) {
|
|
11
|
+
return oe(e.addonBefore) || oe(e.addonAfter);
|
|
12
|
+
}
|
|
13
|
+
function Ce(e) {
|
|
14
|
+
return typeof e > "u" || e === null ? "" : String(e);
|
|
15
|
+
}
|
|
16
|
+
function re(e, l, t, n) {
|
|
17
|
+
if (!t)
|
|
18
|
+
return;
|
|
19
|
+
const a = l;
|
|
20
|
+
if (l.type === "click") {
|
|
21
|
+
Object.defineProperty(a, "target", {
|
|
22
|
+
writable: !0
|
|
23
|
+
}), Object.defineProperty(a, "currentTarget", {
|
|
24
|
+
writable: !0
|
|
25
|
+
});
|
|
26
|
+
const m = e.cloneNode(!0);
|
|
27
|
+
a.target = m, a.currentTarget = m, m.value = "", t(a);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
if (n !== void 0) {
|
|
31
|
+
Object.defineProperty(a, "target", {
|
|
32
|
+
writable: !0
|
|
33
|
+
}), Object.defineProperty(a, "currentTarget", {
|
|
34
|
+
writable: !0
|
|
35
|
+
}), a.target = e, a.currentTarget = e, e.value = n, t(a);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
t(a);
|
|
39
|
+
}
|
|
40
|
+
function He(e, l) {
|
|
41
|
+
if (!e) return;
|
|
42
|
+
e.focus(l);
|
|
43
|
+
const {
|
|
44
|
+
cursor: t
|
|
45
|
+
} = l || {};
|
|
46
|
+
if (t) {
|
|
47
|
+
const n = e.value.length;
|
|
48
|
+
switch (t) {
|
|
49
|
+
case "start":
|
|
50
|
+
e.setSelectionRange(0, 0);
|
|
51
|
+
break;
|
|
52
|
+
case "end":
|
|
53
|
+
e.setSelectionRange(n, n);
|
|
54
|
+
break;
|
|
55
|
+
default:
|
|
56
|
+
e.setSelectionRange(0, n);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
const it = () => ({
|
|
61
|
+
addonBefore: X.any,
|
|
62
|
+
addonAfter: X.any,
|
|
63
|
+
prefix: X.any,
|
|
64
|
+
suffix: X.any,
|
|
65
|
+
clearIcon: X.any,
|
|
66
|
+
affixWrapperClassName: String,
|
|
67
|
+
groupClassName: String,
|
|
68
|
+
wrapperClassName: String,
|
|
69
|
+
inputClassName: String,
|
|
70
|
+
allowClear: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: void 0
|
|
73
|
+
}
|
|
74
|
+
}), Ue = () => z(z({}, it()), {
|
|
75
|
+
value: {
|
|
76
|
+
type: [String, Number, Symbol],
|
|
77
|
+
default: void 0
|
|
78
|
+
},
|
|
79
|
+
defaultValue: {
|
|
80
|
+
type: [String, Number, Symbol],
|
|
81
|
+
default: void 0
|
|
82
|
+
},
|
|
83
|
+
inputElement: X.any,
|
|
84
|
+
prefixCls: String,
|
|
85
|
+
disabled: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
default: void 0
|
|
88
|
+
},
|
|
89
|
+
focused: {
|
|
90
|
+
type: Boolean,
|
|
91
|
+
default: void 0
|
|
92
|
+
},
|
|
93
|
+
triggerFocus: Function,
|
|
94
|
+
readonly: {
|
|
95
|
+
type: Boolean,
|
|
96
|
+
default: void 0
|
|
97
|
+
},
|
|
98
|
+
handleReset: Function,
|
|
99
|
+
hidden: {
|
|
100
|
+
type: Boolean,
|
|
101
|
+
default: void 0
|
|
102
|
+
}
|
|
103
|
+
}), Ge = () => z(z({}, Ue()), {
|
|
104
|
+
id: String,
|
|
105
|
+
placeholder: {
|
|
106
|
+
type: [String, Number]
|
|
107
|
+
},
|
|
108
|
+
autocomplete: String,
|
|
109
|
+
type: Xe("text"),
|
|
110
|
+
name: String,
|
|
111
|
+
size: {
|
|
112
|
+
type: String
|
|
113
|
+
},
|
|
114
|
+
autofocus: {
|
|
115
|
+
type: Boolean,
|
|
116
|
+
default: void 0
|
|
117
|
+
},
|
|
118
|
+
lazy: {
|
|
119
|
+
type: Boolean,
|
|
120
|
+
default: !0
|
|
121
|
+
},
|
|
122
|
+
maxlength: Number,
|
|
123
|
+
loading: {
|
|
124
|
+
type: Boolean,
|
|
125
|
+
default: void 0
|
|
126
|
+
},
|
|
127
|
+
bordered: {
|
|
128
|
+
type: Boolean,
|
|
129
|
+
default: void 0
|
|
130
|
+
},
|
|
131
|
+
showCount: {
|
|
132
|
+
type: [Boolean, Object]
|
|
133
|
+
},
|
|
134
|
+
htmlSize: Number,
|
|
135
|
+
onPressEnter: Function,
|
|
136
|
+
onKeydown: Function,
|
|
137
|
+
onKeyup: Function,
|
|
138
|
+
onFocus: Function,
|
|
139
|
+
onBlur: Function,
|
|
140
|
+
onChange: Function,
|
|
141
|
+
onInput: Function,
|
|
142
|
+
"onUpdate:value": Function,
|
|
143
|
+
onCompositionstart: Function,
|
|
144
|
+
onCompositionend: Function,
|
|
145
|
+
valueModifiers: Object,
|
|
146
|
+
hidden: {
|
|
147
|
+
type: Boolean,
|
|
148
|
+
default: void 0
|
|
149
|
+
},
|
|
150
|
+
status: String
|
|
151
|
+
}), st = K({
|
|
152
|
+
name: "BaseInput",
|
|
153
|
+
inheritAttrs: !1,
|
|
154
|
+
props: Ue(),
|
|
155
|
+
setup(e, l) {
|
|
156
|
+
let {
|
|
157
|
+
slots: t,
|
|
158
|
+
attrs: n
|
|
159
|
+
} = l;
|
|
160
|
+
const a = Z(), m = (o) => {
|
|
161
|
+
var c;
|
|
162
|
+
if (!((c = a.value) === null || c === void 0) && c.contains(o.target)) {
|
|
163
|
+
const {
|
|
164
|
+
triggerFocus: s
|
|
165
|
+
} = e;
|
|
166
|
+
s == null || s();
|
|
167
|
+
}
|
|
168
|
+
}, d = () => {
|
|
169
|
+
var o;
|
|
170
|
+
const {
|
|
171
|
+
allowClear: c,
|
|
172
|
+
value: s,
|
|
173
|
+
disabled: b,
|
|
174
|
+
readonly: p,
|
|
175
|
+
handleReset: i,
|
|
176
|
+
suffix: O = t.suffix,
|
|
177
|
+
prefixCls: A
|
|
178
|
+
} = e;
|
|
179
|
+
if (!c)
|
|
180
|
+
return null;
|
|
181
|
+
const _ = !b && !p && s, f = `${A}-clear-icon`, B = ((o = t.clearIcon) === null || o === void 0 ? void 0 : o.call(t)) || "*";
|
|
182
|
+
return y("span", {
|
|
183
|
+
onClick: i,
|
|
184
|
+
onMousedown: (S) => S.preventDefault(),
|
|
185
|
+
class: D({
|
|
186
|
+
[`${f}-hidden`]: !_,
|
|
187
|
+
[`${f}-has-suffix`]: !!O
|
|
188
|
+
}, f),
|
|
189
|
+
role: "button",
|
|
190
|
+
tabindex: -1
|
|
191
|
+
}, [B]);
|
|
192
|
+
};
|
|
193
|
+
return () => {
|
|
194
|
+
var o, c;
|
|
195
|
+
const {
|
|
196
|
+
focused: s,
|
|
197
|
+
value: b,
|
|
198
|
+
disabled: p,
|
|
199
|
+
allowClear: i,
|
|
200
|
+
readonly: O,
|
|
201
|
+
hidden: A,
|
|
202
|
+
prefixCls: _,
|
|
203
|
+
prefix: f = (o = t.prefix) === null || o === void 0 ? void 0 : o.call(t),
|
|
204
|
+
suffix: B = (c = t.suffix) === null || c === void 0 ? void 0 : c.call(t),
|
|
205
|
+
addonAfter: S = t.addonAfter,
|
|
206
|
+
addonBefore: $ = t.addonBefore,
|
|
207
|
+
inputElement: R,
|
|
208
|
+
affixWrapperClassName: v,
|
|
209
|
+
wrapperClassName: g,
|
|
210
|
+
groupClassName: r
|
|
211
|
+
} = e;
|
|
212
|
+
let w = ee(R, {
|
|
213
|
+
value: b,
|
|
214
|
+
hidden: A
|
|
215
|
+
});
|
|
216
|
+
if ($e({
|
|
217
|
+
prefix: f,
|
|
218
|
+
suffix: B,
|
|
219
|
+
allowClear: i
|
|
220
|
+
})) {
|
|
221
|
+
const C = `${_}-affix-wrapper`, E = D(C, {
|
|
222
|
+
[`${C}-disabled`]: p,
|
|
223
|
+
[`${C}-focused`]: s,
|
|
224
|
+
[`${C}-readonly`]: O,
|
|
225
|
+
[`${C}-input-with-clear-btn`]: B && i && b
|
|
226
|
+
}, !ve({
|
|
227
|
+
addonAfter: S,
|
|
228
|
+
addonBefore: $
|
|
229
|
+
}) && n.class, v), F = (B || i) && y("span", {
|
|
230
|
+
class: `${_}-suffix`
|
|
231
|
+
}, [d(), B]);
|
|
232
|
+
w = y("span", {
|
|
233
|
+
class: E,
|
|
234
|
+
style: n.style,
|
|
235
|
+
hidden: !ve({
|
|
236
|
+
addonAfter: S,
|
|
237
|
+
addonBefore: $
|
|
238
|
+
}) && A,
|
|
239
|
+
onMousedown: m,
|
|
240
|
+
ref: a
|
|
241
|
+
}, [f && y("span", {
|
|
242
|
+
class: `${_}-prefix`
|
|
243
|
+
}, [f]), ee(R, {
|
|
244
|
+
style: null,
|
|
245
|
+
value: b,
|
|
246
|
+
hidden: null
|
|
247
|
+
}), F]);
|
|
248
|
+
}
|
|
249
|
+
if (ve({
|
|
250
|
+
addonAfter: S,
|
|
251
|
+
addonBefore: $
|
|
252
|
+
})) {
|
|
253
|
+
const C = `${_}-group`, E = `${C}-addon`, F = D(`${_}-wrapper`, C, g), T = D(`${_}-group-wrapper`, n.class, r);
|
|
254
|
+
return y("span", {
|
|
255
|
+
class: T,
|
|
256
|
+
style: n.style,
|
|
257
|
+
hidden: A
|
|
258
|
+
}, [y("span", {
|
|
259
|
+
class: F
|
|
260
|
+
}, [$ && y("span", {
|
|
261
|
+
class: E
|
|
262
|
+
}, [$]), ee(w, {
|
|
263
|
+
style: null,
|
|
264
|
+
hidden: null
|
|
265
|
+
}), S && y("span", {
|
|
266
|
+
class: E
|
|
267
|
+
}, [S])])]);
|
|
268
|
+
}
|
|
269
|
+
return w;
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
var dt = function(e, l) {
|
|
274
|
+
var t = {};
|
|
275
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && l.indexOf(n) < 0 && (t[n] = e[n]);
|
|
276
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
|
|
277
|
+
l.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (t[n[a]] = e[n[a]]);
|
|
278
|
+
return t;
|
|
279
|
+
};
|
|
280
|
+
const ct = K({
|
|
281
|
+
name: "VCInput",
|
|
282
|
+
inheritAttrs: !1,
|
|
283
|
+
props: Ge(),
|
|
284
|
+
setup(e, l) {
|
|
285
|
+
let {
|
|
286
|
+
slots: t,
|
|
287
|
+
attrs: n,
|
|
288
|
+
expose: a,
|
|
289
|
+
emit: m
|
|
290
|
+
} = l;
|
|
291
|
+
const d = U(e.value === void 0 ? e.defaultValue : e.value), o = U(!1), c = U(), s = U();
|
|
292
|
+
ie(() => e.value, () => {
|
|
293
|
+
d.value = e.value;
|
|
294
|
+
}), ie(() => e.disabled, () => {
|
|
295
|
+
e.disabled && (o.value = !1);
|
|
296
|
+
});
|
|
297
|
+
const b = (r) => {
|
|
298
|
+
c.value && He(c.value.input, r);
|
|
299
|
+
}, p = () => {
|
|
300
|
+
var r;
|
|
301
|
+
(r = c.value.input) === null || r === void 0 || r.blur();
|
|
302
|
+
}, i = (r, w, C) => {
|
|
303
|
+
var E;
|
|
304
|
+
(E = c.value.input) === null || E === void 0 || E.setSelectionRange(r, w, C);
|
|
305
|
+
}, O = () => {
|
|
306
|
+
var r;
|
|
307
|
+
(r = c.value.input) === null || r === void 0 || r.select();
|
|
308
|
+
};
|
|
309
|
+
a({
|
|
310
|
+
focus: b,
|
|
311
|
+
blur: p,
|
|
312
|
+
input: Y(() => {
|
|
313
|
+
var r;
|
|
314
|
+
return (r = c.value.input) === null || r === void 0 ? void 0 : r.input;
|
|
315
|
+
}),
|
|
316
|
+
stateValue: d,
|
|
317
|
+
setSelectionRange: i,
|
|
318
|
+
select: O
|
|
319
|
+
});
|
|
320
|
+
const A = (r) => {
|
|
321
|
+
m("change", r);
|
|
322
|
+
}, _ = (r, w) => {
|
|
323
|
+
d.value !== r && (e.value === void 0 ? d.value = r : pe(() => {
|
|
324
|
+
var C;
|
|
325
|
+
c.value.input.value !== d.value && ((C = s.value) === null || C === void 0 || C.$forceUpdate());
|
|
326
|
+
}), pe(() => {
|
|
327
|
+
w && w();
|
|
328
|
+
}));
|
|
329
|
+
}, f = (r) => {
|
|
330
|
+
const {
|
|
331
|
+
value: w
|
|
332
|
+
} = r.target;
|
|
333
|
+
if (d.value === w) return;
|
|
334
|
+
const C = r.target.value;
|
|
335
|
+
re(c.value.input, r, A), _(C);
|
|
336
|
+
}, B = (r) => {
|
|
337
|
+
r.keyCode === 13 && m("pressEnter", r), m("keydown", r);
|
|
338
|
+
}, S = (r) => {
|
|
339
|
+
o.value = !0, m("focus", r);
|
|
340
|
+
}, $ = (r) => {
|
|
341
|
+
o.value = !1, m("blur", r);
|
|
342
|
+
}, R = (r) => {
|
|
343
|
+
re(c.value.input, r, A), _("", () => {
|
|
344
|
+
b();
|
|
345
|
+
});
|
|
346
|
+
}, v = () => {
|
|
347
|
+
var r, w;
|
|
348
|
+
const {
|
|
349
|
+
addonBefore: C = t.addonBefore,
|
|
350
|
+
addonAfter: E = t.addonAfter,
|
|
351
|
+
disabled: F,
|
|
352
|
+
valueModifiers: T = {},
|
|
353
|
+
htmlSize: h,
|
|
354
|
+
autocomplete: I,
|
|
355
|
+
prefixCls: N,
|
|
356
|
+
inputClassName: j,
|
|
357
|
+
prefix: H = (r = t.prefix) === null || r === void 0 ? void 0 : r.call(t),
|
|
358
|
+
suffix: G = (w = t.suffix) === null || w === void 0 ? void 0 : w.call(t),
|
|
359
|
+
allowClear: u,
|
|
360
|
+
type: x = "text"
|
|
361
|
+
} = e, P = Q(e, [
|
|
362
|
+
"prefixCls",
|
|
363
|
+
"onPressEnter",
|
|
364
|
+
"addonBefore",
|
|
365
|
+
"addonAfter",
|
|
366
|
+
"prefix",
|
|
367
|
+
"suffix",
|
|
368
|
+
"allowClear",
|
|
369
|
+
// Input elements must be either controlled or uncontrolled,
|
|
370
|
+
// specify either the value prop, or the defaultValue prop, but not both.
|
|
371
|
+
"defaultValue",
|
|
372
|
+
"size",
|
|
373
|
+
"bordered",
|
|
374
|
+
"htmlSize",
|
|
375
|
+
"lazy",
|
|
376
|
+
"showCount",
|
|
377
|
+
"valueModifiers",
|
|
378
|
+
"showCount",
|
|
379
|
+
"affixWrapperClassName",
|
|
380
|
+
"groupClassName",
|
|
381
|
+
"inputClassName",
|
|
382
|
+
"wrapperClassName"
|
|
383
|
+
]), M = z(z(z({}, P), n), {
|
|
384
|
+
autocomplete: I,
|
|
385
|
+
onChange: f,
|
|
386
|
+
onInput: f,
|
|
387
|
+
onFocus: S,
|
|
388
|
+
onBlur: $,
|
|
389
|
+
onKeydown: B,
|
|
390
|
+
class: D(N, {
|
|
391
|
+
[`${N}-disabled`]: F
|
|
392
|
+
}, j, !ve({
|
|
393
|
+
addonAfter: E,
|
|
394
|
+
addonBefore: C
|
|
395
|
+
}) && !$e({
|
|
396
|
+
prefix: H,
|
|
397
|
+
suffix: G,
|
|
398
|
+
allowClear: u
|
|
399
|
+
}) && n.class),
|
|
400
|
+
ref: c,
|
|
401
|
+
key: "ant-input",
|
|
402
|
+
size: h,
|
|
403
|
+
type: x,
|
|
404
|
+
lazy: e.lazy
|
|
405
|
+
});
|
|
406
|
+
return T.lazy && delete M.onInput, M.autofocus || delete M.autofocus, y(We, Q(M, ["size"]), null);
|
|
407
|
+
}, g = () => {
|
|
408
|
+
var r;
|
|
409
|
+
const {
|
|
410
|
+
maxlength: w,
|
|
411
|
+
suffix: C = (r = t.suffix) === null || r === void 0 ? void 0 : r.call(t),
|
|
412
|
+
showCount: E,
|
|
413
|
+
prefixCls: F
|
|
414
|
+
} = e, T = Number(w) > 0;
|
|
415
|
+
if (C || E) {
|
|
416
|
+
const h = [...Ce(d.value)].length, I = typeof E == "object" ? E.formatter({
|
|
417
|
+
count: h,
|
|
418
|
+
maxlength: w
|
|
419
|
+
}) : `${h}${T ? ` / ${w}` : ""}`;
|
|
420
|
+
return y(De, null, [!!E && y("span", {
|
|
421
|
+
class: D(`${F}-show-count-suffix`, {
|
|
422
|
+
[`${F}-show-count-has-suffix`]: !!C
|
|
423
|
+
})
|
|
424
|
+
}, [I]), C]);
|
|
425
|
+
}
|
|
426
|
+
return null;
|
|
427
|
+
};
|
|
428
|
+
return ke(() => {
|
|
429
|
+
process.env.NODE_ENV === "test" && e.autofocus && b();
|
|
430
|
+
}), () => {
|
|
431
|
+
const {
|
|
432
|
+
prefixCls: r,
|
|
433
|
+
disabled: w
|
|
434
|
+
} = e, C = dt(e, ["prefixCls", "disabled"]);
|
|
435
|
+
return y(st, V(V(V({}, C), n), {}, {
|
|
436
|
+
ref: s,
|
|
437
|
+
prefixCls: r,
|
|
438
|
+
inputElement: v(),
|
|
439
|
+
handleReset: R,
|
|
440
|
+
value: Ce(d.value),
|
|
441
|
+
focused: o.value,
|
|
442
|
+
triggerFocus: b,
|
|
443
|
+
suffix: g(),
|
|
444
|
+
disabled: w
|
|
445
|
+
}), t);
|
|
446
|
+
};
|
|
447
|
+
}
|
|
448
|
+
}), me = () => Q(Ge(), ["wrapperClassName", "groupClassName", "inputClassName", "affixWrapperClassName"]), qe = () => z(z({}, Q(me(), ["prefix", "addonBefore", "addonAfter", "suffix"])), {
|
|
449
|
+
rows: Number,
|
|
450
|
+
autosize: {
|
|
451
|
+
type: [Boolean, Object],
|
|
452
|
+
default: void 0
|
|
453
|
+
},
|
|
454
|
+
autoSize: {
|
|
455
|
+
type: [Boolean, Object],
|
|
456
|
+
default: void 0
|
|
457
|
+
},
|
|
458
|
+
onResize: {
|
|
459
|
+
type: Function
|
|
460
|
+
},
|
|
461
|
+
onCompositionstart: Ae(),
|
|
462
|
+
onCompositionend: Ae(),
|
|
463
|
+
valueModifiers: Object
|
|
464
|
+
});
|
|
465
|
+
var ft = function(e, l) {
|
|
466
|
+
var t = {};
|
|
467
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && l.indexOf(n) < 0 && (t[n] = e[n]);
|
|
468
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
|
|
469
|
+
l.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (t[n[a]] = e[n[a]]);
|
|
470
|
+
return t;
|
|
471
|
+
};
|
|
472
|
+
const k = K({
|
|
473
|
+
compatConfig: {
|
|
474
|
+
MODE: 3
|
|
475
|
+
},
|
|
476
|
+
name: "AInput",
|
|
477
|
+
inheritAttrs: !1,
|
|
478
|
+
props: me(),
|
|
479
|
+
setup(e, l) {
|
|
480
|
+
let {
|
|
481
|
+
slots: t,
|
|
482
|
+
attrs: n,
|
|
483
|
+
expose: a,
|
|
484
|
+
emit: m
|
|
485
|
+
} = l;
|
|
486
|
+
const d = Z(), o = Fe(), c = ue.useInject(), s = Y(() => Se(c.status, e.status)), {
|
|
487
|
+
direction: b,
|
|
488
|
+
prefixCls: p,
|
|
489
|
+
size: i,
|
|
490
|
+
autocomplete: O
|
|
491
|
+
} = se("input", e), {
|
|
492
|
+
compactSize: A,
|
|
493
|
+
compactItemClassnames: _
|
|
494
|
+
} = Je(p, b), f = Y(() => A.value || i.value), [B, S] = Ie(p), $ = je();
|
|
495
|
+
a({
|
|
496
|
+
focus: (h) => {
|
|
497
|
+
var I;
|
|
498
|
+
(I = d.value) === null || I === void 0 || I.focus(h);
|
|
499
|
+
},
|
|
500
|
+
blur: () => {
|
|
501
|
+
var h;
|
|
502
|
+
(h = d.value) === null || h === void 0 || h.blur();
|
|
503
|
+
},
|
|
504
|
+
input: d,
|
|
505
|
+
setSelectionRange: (h, I, N) => {
|
|
506
|
+
var j;
|
|
507
|
+
(j = d.value) === null || j === void 0 || j.setSelectionRange(h, I, N);
|
|
508
|
+
},
|
|
509
|
+
select: () => {
|
|
510
|
+
var h;
|
|
511
|
+
(h = d.value) === null || h === void 0 || h.select();
|
|
512
|
+
}
|
|
513
|
+
});
|
|
514
|
+
const w = Z([]), C = () => {
|
|
515
|
+
w.value.push(setTimeout(() => {
|
|
516
|
+
var h, I, N, j;
|
|
517
|
+
!((h = d.value) === null || h === void 0) && h.input && ((I = d.value) === null || I === void 0 ? void 0 : I.input.getAttribute("type")) === "password" && (!((N = d.value) === null || N === void 0) && N.input.hasAttribute("value")) && ((j = d.value) === null || j === void 0 || j.input.removeAttribute("value"));
|
|
518
|
+
}));
|
|
519
|
+
};
|
|
520
|
+
ke(() => {
|
|
521
|
+
C();
|
|
522
|
+
}), rt(() => {
|
|
523
|
+
w.value.forEach((h) => clearTimeout(h));
|
|
524
|
+
}), ye(() => {
|
|
525
|
+
w.value.forEach((h) => clearTimeout(h));
|
|
526
|
+
});
|
|
527
|
+
const E = (h) => {
|
|
528
|
+
C(), m("blur", h), o.onFieldBlur();
|
|
529
|
+
}, F = (h) => {
|
|
530
|
+
C(), m("focus", h);
|
|
531
|
+
}, T = (h) => {
|
|
532
|
+
m("update:value", h.target.value), m("change", h), m("input", h), o.onFieldChange();
|
|
533
|
+
};
|
|
534
|
+
return () => {
|
|
535
|
+
var h, I, N, j, H, G;
|
|
536
|
+
const {
|
|
537
|
+
hasFeedback: u,
|
|
538
|
+
feedbackIcon: x
|
|
539
|
+
} = c, {
|
|
540
|
+
allowClear: P,
|
|
541
|
+
bordered: M = !0,
|
|
542
|
+
prefix: L = (h = t.prefix) === null || h === void 0 ? void 0 : h.call(t),
|
|
543
|
+
suffix: ae = (I = t.suffix) === null || I === void 0 ? void 0 : I.call(t),
|
|
544
|
+
addonAfter: de = (N = t.addonAfter) === null || N === void 0 ? void 0 : N.call(t),
|
|
545
|
+
addonBefore: te = (j = t.addonBefore) === null || j === void 0 ? void 0 : j.call(t),
|
|
546
|
+
id: ce = (H = o.id) === null || H === void 0 ? void 0 : H.value
|
|
547
|
+
} = e, ne = ft(e, ["allowClear", "bordered", "prefix", "suffix", "addonAfter", "addonBefore", "id"]), Ze = (u || ae) && y(De, null, [ae, u && x]), W = p.value, Qe = $e({
|
|
548
|
+
prefix: L,
|
|
549
|
+
suffix: ae
|
|
550
|
+
}) || !!u, Ke = t.clearIcon || (() => y(Me, null, null));
|
|
551
|
+
return B(y(ct, V(V(V({}, n), Q(ne, ["onUpdate:value", "onChange", "onInput"])), {}, {
|
|
552
|
+
onChange: T,
|
|
553
|
+
id: ce,
|
|
554
|
+
disabled: (G = e.disabled) !== null && G !== void 0 ? G : $.value,
|
|
555
|
+
ref: d,
|
|
556
|
+
prefixCls: W,
|
|
557
|
+
autocomplete: O.value,
|
|
558
|
+
onBlur: E,
|
|
559
|
+
onFocus: F,
|
|
560
|
+
prefix: L,
|
|
561
|
+
suffix: Ze,
|
|
562
|
+
allowClear: P,
|
|
563
|
+
addonAfter: de && y(_e, null, {
|
|
564
|
+
default: () => [y(Pe, null, {
|
|
565
|
+
default: () => [de]
|
|
566
|
+
})]
|
|
567
|
+
}),
|
|
568
|
+
addonBefore: te && y(_e, null, {
|
|
569
|
+
default: () => [y(Pe, null, {
|
|
570
|
+
default: () => [te]
|
|
571
|
+
})]
|
|
572
|
+
}),
|
|
573
|
+
class: [n.class, _.value],
|
|
574
|
+
inputClassName: D({
|
|
575
|
+
[`${W}-sm`]: f.value === "small",
|
|
576
|
+
[`${W}-lg`]: f.value === "large",
|
|
577
|
+
[`${W}-rtl`]: b.value === "rtl",
|
|
578
|
+
[`${W}-borderless`]: !M
|
|
579
|
+
}, !Qe && le(W, s.value), S.value),
|
|
580
|
+
affixWrapperClassName: D({
|
|
581
|
+
[`${W}-affix-wrapper-sm`]: f.value === "small",
|
|
582
|
+
[`${W}-affix-wrapper-lg`]: f.value === "large",
|
|
583
|
+
[`${W}-affix-wrapper-rtl`]: b.value === "rtl",
|
|
584
|
+
[`${W}-affix-wrapper-borderless`]: !M
|
|
585
|
+
}, le(`${W}-affix-wrapper`, s.value, u), S.value),
|
|
586
|
+
wrapperClassName: D({
|
|
587
|
+
[`${W}-group-rtl`]: b.value === "rtl"
|
|
588
|
+
}, S.value),
|
|
589
|
+
groupClassName: D({
|
|
590
|
+
[`${W}-group-wrapper-sm`]: f.value === "small",
|
|
591
|
+
[`${W}-group-wrapper-lg`]: f.value === "large",
|
|
592
|
+
[`${W}-group-wrapper-rtl`]: b.value === "rtl"
|
|
593
|
+
}, le(`${W}-group-wrapper`, s.value, u), S.value)
|
|
594
|
+
}), z(z({}, t), {
|
|
595
|
+
clearIcon: Ke
|
|
596
|
+
})));
|
|
597
|
+
};
|
|
598
|
+
}
|
|
599
|
+
}), vt = K({
|
|
600
|
+
compatConfig: {
|
|
601
|
+
MODE: 3
|
|
602
|
+
},
|
|
603
|
+
name: "AInputGroup",
|
|
604
|
+
inheritAttrs: !1,
|
|
605
|
+
props: {
|
|
606
|
+
prefixCls: String,
|
|
607
|
+
size: {
|
|
608
|
+
type: String
|
|
609
|
+
},
|
|
610
|
+
compact: {
|
|
611
|
+
type: Boolean,
|
|
612
|
+
default: void 0
|
|
613
|
+
}
|
|
614
|
+
},
|
|
615
|
+
setup(e, l) {
|
|
616
|
+
let {
|
|
617
|
+
slots: t,
|
|
618
|
+
attrs: n
|
|
619
|
+
} = l;
|
|
620
|
+
const {
|
|
621
|
+
prefixCls: a,
|
|
622
|
+
direction: m,
|
|
623
|
+
getPrefixCls: d
|
|
624
|
+
} = se("input-group", e), o = ue.useInject();
|
|
625
|
+
ue.useProvide(o, {
|
|
626
|
+
isFormItemInput: !1
|
|
627
|
+
});
|
|
628
|
+
const c = Y(() => d("input")), [s, b] = Ie(c), p = Y(() => {
|
|
629
|
+
const i = a.value;
|
|
630
|
+
return {
|
|
631
|
+
[`${i}`]: !0,
|
|
632
|
+
[b.value]: !0,
|
|
633
|
+
[`${i}-lg`]: e.size === "large",
|
|
634
|
+
[`${i}-sm`]: e.size === "small",
|
|
635
|
+
[`${i}-compact`]: e.compact,
|
|
636
|
+
[`${i}-rtl`]: m.value === "rtl"
|
|
637
|
+
};
|
|
638
|
+
});
|
|
639
|
+
return () => {
|
|
640
|
+
var i;
|
|
641
|
+
return s(y("span", V(V({}, n), {}, {
|
|
642
|
+
class: D(p.value, n.class)
|
|
643
|
+
}), [(i = t.default) === null || i === void 0 ? void 0 : i.call(t)]));
|
|
644
|
+
};
|
|
645
|
+
}
|
|
646
|
+
});
|
|
647
|
+
var pt = function(e, l) {
|
|
648
|
+
var t = {};
|
|
649
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && l.indexOf(n) < 0 && (t[n] = e[n]);
|
|
650
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
|
|
651
|
+
l.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (t[n[a]] = e[n[a]]);
|
|
652
|
+
return t;
|
|
653
|
+
};
|
|
654
|
+
const mt = K({
|
|
655
|
+
compatConfig: {
|
|
656
|
+
MODE: 3
|
|
657
|
+
},
|
|
658
|
+
name: "AInputSearch",
|
|
659
|
+
inheritAttrs: !1,
|
|
660
|
+
props: z(z({}, me()), {
|
|
661
|
+
inputPrefixCls: String,
|
|
662
|
+
// 不能设置默认值 https://github.com/vueComponent/ant-design-vue/issues/1916
|
|
663
|
+
enterButton: X.any,
|
|
664
|
+
onSearch: {
|
|
665
|
+
type: Function
|
|
666
|
+
}
|
|
667
|
+
}),
|
|
668
|
+
setup(e, l) {
|
|
669
|
+
let {
|
|
670
|
+
slots: t,
|
|
671
|
+
attrs: n,
|
|
672
|
+
expose: a,
|
|
673
|
+
emit: m
|
|
674
|
+
} = l;
|
|
675
|
+
const d = U(), o = U(!1);
|
|
676
|
+
a({
|
|
677
|
+
focus: () => {
|
|
678
|
+
var v;
|
|
679
|
+
(v = d.value) === null || v === void 0 || v.focus();
|
|
680
|
+
},
|
|
681
|
+
blur: () => {
|
|
682
|
+
var v;
|
|
683
|
+
(v = d.value) === null || v === void 0 || v.blur();
|
|
684
|
+
}
|
|
685
|
+
});
|
|
686
|
+
const b = (v) => {
|
|
687
|
+
m("update:value", v.target.value), v && v.target && v.type === "click" && m("search", v.target.value, v), m("change", v);
|
|
688
|
+
}, p = (v) => {
|
|
689
|
+
var g;
|
|
690
|
+
document.activeElement === ((g = d.value) === null || g === void 0 ? void 0 : g.input) && v.preventDefault();
|
|
691
|
+
}, i = (v) => {
|
|
692
|
+
var g, r;
|
|
693
|
+
m("search", (r = (g = d.value) === null || g === void 0 ? void 0 : g.input) === null || r === void 0 ? void 0 : r.stateValue, v);
|
|
694
|
+
}, O = (v) => {
|
|
695
|
+
o.value || e.loading || i(v);
|
|
696
|
+
}, A = (v) => {
|
|
697
|
+
o.value = !0, m("compositionstart", v);
|
|
698
|
+
}, _ = (v) => {
|
|
699
|
+
o.value = !1, m("compositionend", v);
|
|
700
|
+
}, {
|
|
701
|
+
prefixCls: f,
|
|
702
|
+
getPrefixCls: B,
|
|
703
|
+
direction: S,
|
|
704
|
+
size: $
|
|
705
|
+
} = se("input-search", e), R = Y(() => B("input", e.inputPrefixCls));
|
|
706
|
+
return () => {
|
|
707
|
+
var v, g, r, w;
|
|
708
|
+
const {
|
|
709
|
+
disabled: C,
|
|
710
|
+
loading: E,
|
|
711
|
+
addonAfter: F = (v = t.addonAfter) === null || v === void 0 ? void 0 : v.call(t),
|
|
712
|
+
suffix: T = (g = t.suffix) === null || g === void 0 ? void 0 : g.call(t)
|
|
713
|
+
} = e, h = pt(e, ["disabled", "loading", "addonAfter", "suffix"]);
|
|
714
|
+
let {
|
|
715
|
+
enterButton: I = (w = (r = t.enterButton) === null || r === void 0 ? void 0 : r.call(t)) !== null && w !== void 0 ? w : !1
|
|
716
|
+
} = e;
|
|
717
|
+
I = I || I === "";
|
|
718
|
+
const N = typeof I == "boolean" ? y(ut, null, null) : null, j = `${f.value}-button`, H = Array.isArray(I) ? I[0] : I;
|
|
719
|
+
let G;
|
|
720
|
+
const u = H.type && et(H.type) && H.type.__ANT_BUTTON;
|
|
721
|
+
if (u || H.tagName === "button")
|
|
722
|
+
G = ee(H, z({
|
|
723
|
+
onMousedown: p,
|
|
724
|
+
onClick: i,
|
|
725
|
+
key: "enterButton"
|
|
726
|
+
}, u ? {
|
|
727
|
+
class: j,
|
|
728
|
+
size: $.value
|
|
729
|
+
} : {}), !1);
|
|
730
|
+
else {
|
|
731
|
+
const P = N && !I;
|
|
732
|
+
G = y(tt, {
|
|
733
|
+
class: j,
|
|
734
|
+
type: I ? "primary" : void 0,
|
|
735
|
+
size: $.value,
|
|
736
|
+
disabled: C,
|
|
737
|
+
key: "enterButton",
|
|
738
|
+
onMousedown: p,
|
|
739
|
+
onClick: i,
|
|
740
|
+
loading: E,
|
|
741
|
+
icon: P ? N : null
|
|
742
|
+
}, {
|
|
743
|
+
default: () => [P ? null : N || I]
|
|
744
|
+
});
|
|
745
|
+
}
|
|
746
|
+
F && (G = [G, F]);
|
|
747
|
+
const x = D(f.value, {
|
|
748
|
+
[`${f.value}-rtl`]: S.value === "rtl",
|
|
749
|
+
[`${f.value}-${$.value}`]: !!$.value,
|
|
750
|
+
[`${f.value}-with-button`]: !!I
|
|
751
|
+
}, n.class);
|
|
752
|
+
return y(k, V(V(V({
|
|
753
|
+
ref: d
|
|
754
|
+
}, Q(h, ["onUpdate:value", "onSearch", "enterButton"])), n), {}, {
|
|
755
|
+
onPressEnter: O,
|
|
756
|
+
onCompositionstart: A,
|
|
757
|
+
onCompositionend: _,
|
|
758
|
+
size: $.value,
|
|
759
|
+
prefixCls: R.value,
|
|
760
|
+
addonAfter: G,
|
|
761
|
+
suffix: T,
|
|
762
|
+
onChange: b,
|
|
763
|
+
class: x,
|
|
764
|
+
disabled: C
|
|
765
|
+
}), t);
|
|
766
|
+
};
|
|
767
|
+
}
|
|
768
|
+
}), Be = (e) => e != null && (Array.isArray(e) ? Te(e).length : !0);
|
|
769
|
+
function gt(e) {
|
|
770
|
+
return Be(e.addonBefore) || Be(e.addonAfter);
|
|
771
|
+
}
|
|
772
|
+
const bt = ["text", "input"], ht = K({
|
|
773
|
+
compatConfig: {
|
|
774
|
+
MODE: 3
|
|
775
|
+
},
|
|
776
|
+
name: "ClearableLabeledInput",
|
|
777
|
+
inheritAttrs: !1,
|
|
778
|
+
props: {
|
|
779
|
+
prefixCls: String,
|
|
780
|
+
inputType: X.oneOf(nt("text", "input")),
|
|
781
|
+
value: J(),
|
|
782
|
+
defaultValue: J(),
|
|
783
|
+
allowClear: {
|
|
784
|
+
type: Boolean,
|
|
785
|
+
default: void 0
|
|
786
|
+
},
|
|
787
|
+
element: J(),
|
|
788
|
+
handleReset: Function,
|
|
789
|
+
disabled: {
|
|
790
|
+
type: Boolean,
|
|
791
|
+
default: void 0
|
|
792
|
+
},
|
|
793
|
+
direction: {
|
|
794
|
+
type: String
|
|
795
|
+
},
|
|
796
|
+
size: {
|
|
797
|
+
type: String
|
|
798
|
+
},
|
|
799
|
+
suffix: J(),
|
|
800
|
+
prefix: J(),
|
|
801
|
+
addonBefore: J(),
|
|
802
|
+
addonAfter: J(),
|
|
803
|
+
readonly: {
|
|
804
|
+
type: Boolean,
|
|
805
|
+
default: void 0
|
|
806
|
+
},
|
|
807
|
+
focused: {
|
|
808
|
+
type: Boolean,
|
|
809
|
+
default: void 0
|
|
810
|
+
},
|
|
811
|
+
bordered: {
|
|
812
|
+
type: Boolean,
|
|
813
|
+
default: !0
|
|
814
|
+
},
|
|
815
|
+
triggerFocus: {
|
|
816
|
+
type: Function
|
|
817
|
+
},
|
|
818
|
+
hidden: Boolean,
|
|
819
|
+
status: String,
|
|
820
|
+
hashId: String
|
|
821
|
+
},
|
|
822
|
+
setup(e, l) {
|
|
823
|
+
let {
|
|
824
|
+
slots: t,
|
|
825
|
+
attrs: n
|
|
826
|
+
} = l;
|
|
827
|
+
const a = ue.useInject(), m = (o) => {
|
|
828
|
+
const {
|
|
829
|
+
value: c,
|
|
830
|
+
disabled: s,
|
|
831
|
+
readonly: b,
|
|
832
|
+
handleReset: p,
|
|
833
|
+
suffix: i = t.suffix
|
|
834
|
+
} = e, O = !s && !b && c, A = `${o}-clear-icon`;
|
|
835
|
+
return y(Me, {
|
|
836
|
+
onClick: p,
|
|
837
|
+
onMousedown: (_) => _.preventDefault(),
|
|
838
|
+
class: D({
|
|
839
|
+
[`${A}-hidden`]: !O,
|
|
840
|
+
[`${A}-has-suffix`]: !!i
|
|
841
|
+
}, A),
|
|
842
|
+
role: "button"
|
|
843
|
+
}, null);
|
|
844
|
+
}, d = (o, c) => {
|
|
845
|
+
const {
|
|
846
|
+
value: s,
|
|
847
|
+
allowClear: b,
|
|
848
|
+
direction: p,
|
|
849
|
+
bordered: i,
|
|
850
|
+
hidden: O,
|
|
851
|
+
status: A,
|
|
852
|
+
addonAfter: _ = t.addonAfter,
|
|
853
|
+
addonBefore: f = t.addonBefore,
|
|
854
|
+
hashId: B
|
|
855
|
+
} = e, {
|
|
856
|
+
status: S,
|
|
857
|
+
hasFeedback: $
|
|
858
|
+
} = a;
|
|
859
|
+
if (!b)
|
|
860
|
+
return ee(c, {
|
|
861
|
+
value: s,
|
|
862
|
+
disabled: e.disabled
|
|
863
|
+
});
|
|
864
|
+
const R = D(`${o}-affix-wrapper`, `${o}-affix-wrapper-textarea-with-clear-btn`, le(`${o}-affix-wrapper`, Se(S, A), $), {
|
|
865
|
+
[`${o}-affix-wrapper-rtl`]: p === "rtl",
|
|
866
|
+
[`${o}-affix-wrapper-borderless`]: !i,
|
|
867
|
+
// className will go to addon wrapper
|
|
868
|
+
[`${n.class}`]: !gt({
|
|
869
|
+
addonAfter: _,
|
|
870
|
+
addonBefore: f
|
|
871
|
+
}) && n.class
|
|
872
|
+
}, B);
|
|
873
|
+
return y("span", {
|
|
874
|
+
class: R,
|
|
875
|
+
style: n.style,
|
|
876
|
+
hidden: O
|
|
877
|
+
}, [ee(c, {
|
|
878
|
+
style: null,
|
|
879
|
+
value: s,
|
|
880
|
+
disabled: e.disabled
|
|
881
|
+
}), m(o)]);
|
|
882
|
+
};
|
|
883
|
+
return () => {
|
|
884
|
+
var o;
|
|
885
|
+
const {
|
|
886
|
+
prefixCls: c,
|
|
887
|
+
inputType: s,
|
|
888
|
+
element: b = (o = t.element) === null || o === void 0 ? void 0 : o.call(t)
|
|
889
|
+
} = e;
|
|
890
|
+
return s === bt[0] ? d(c, b) : null;
|
|
891
|
+
};
|
|
892
|
+
}
|
|
893
|
+
}), xt = `
|
|
894
|
+
min-height:0 !important;
|
|
895
|
+
max-height:none !important;
|
|
896
|
+
height:0 !important;
|
|
897
|
+
visibility:hidden !important;
|
|
898
|
+
overflow:hidden !important;
|
|
899
|
+
position:absolute !important;
|
|
900
|
+
z-index:-1000 !important;
|
|
901
|
+
top:0 !important;
|
|
902
|
+
right:0 !important;
|
|
903
|
+
pointer-events: none !important;
|
|
904
|
+
`, yt = ["letter-spacing", "line-height", "padding-top", "padding-bottom", "font-family", "font-weight", "font-size", "font-variant", "text-rendering", "text-transform", "width", "text-indent", "padding-left", "padding-right", "border-width", "box-sizing", "word-break", "white-space"], ge = {};
|
|
905
|
+
let q;
|
|
906
|
+
function Ct(e) {
|
|
907
|
+
let l = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
908
|
+
const t = e.getAttribute("id") || e.getAttribute("data-reactid") || e.getAttribute("name");
|
|
909
|
+
if (l && ge[t])
|
|
910
|
+
return ge[t];
|
|
911
|
+
const n = window.getComputedStyle(e), a = n.getPropertyValue("box-sizing") || n.getPropertyValue("-moz-box-sizing") || n.getPropertyValue("-webkit-box-sizing"), m = parseFloat(n.getPropertyValue("padding-bottom")) + parseFloat(n.getPropertyValue("padding-top")), d = parseFloat(n.getPropertyValue("border-bottom-width")) + parseFloat(n.getPropertyValue("border-top-width")), c = {
|
|
912
|
+
sizingStyle: yt.map((s) => `${s}:${n.getPropertyValue(s)}`).join(";"),
|
|
913
|
+
paddingSize: m,
|
|
914
|
+
borderSize: d,
|
|
915
|
+
boxSizing: a
|
|
916
|
+
};
|
|
917
|
+
return l && t && (ge[t] = c), c;
|
|
918
|
+
}
|
|
919
|
+
function wt(e) {
|
|
920
|
+
let l = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null;
|
|
921
|
+
q || (q = document.createElement("textarea"), q.setAttribute("tab-index", "-1"), q.setAttribute("aria-hidden", "true"), document.body.appendChild(q)), e.getAttribute("wrap") ? q.setAttribute("wrap", e.getAttribute("wrap")) : q.removeAttribute("wrap");
|
|
922
|
+
const {
|
|
923
|
+
paddingSize: a,
|
|
924
|
+
borderSize: m,
|
|
925
|
+
boxSizing: d,
|
|
926
|
+
sizingStyle: o
|
|
927
|
+
} = Ct(e, l);
|
|
928
|
+
q.setAttribute("style", `${o};${xt}`), q.value = e.value || e.placeholder || "";
|
|
929
|
+
let c, s, b, p = q.scrollHeight;
|
|
930
|
+
if (d === "border-box" ? p += m : d === "content-box" && (p -= a), t !== null || n !== null) {
|
|
931
|
+
q.value = " ";
|
|
932
|
+
const O = q.scrollHeight - a;
|
|
933
|
+
t !== null && (c = O * t, d === "border-box" && (c = c + a + m), p = Math.max(c, p)), n !== null && (s = O * n, d === "border-box" && (s = s + a + m), b = p > s ? "" : "hidden", p = Math.min(s, p));
|
|
934
|
+
}
|
|
935
|
+
const i = {
|
|
936
|
+
height: `${p}px`,
|
|
937
|
+
overflowY: b,
|
|
938
|
+
resize: "none"
|
|
939
|
+
};
|
|
940
|
+
return c && (i.minHeight = `${c}px`), s && (i.maxHeight = `${s}px`), i;
|
|
941
|
+
}
|
|
942
|
+
const be = 0, he = 1, xe = 2, St = K({
|
|
943
|
+
compatConfig: {
|
|
944
|
+
MODE: 3
|
|
945
|
+
},
|
|
946
|
+
name: "ResizableTextArea",
|
|
947
|
+
inheritAttrs: !1,
|
|
948
|
+
props: qe(),
|
|
949
|
+
setup(e, l) {
|
|
950
|
+
let {
|
|
951
|
+
attrs: t,
|
|
952
|
+
emit: n,
|
|
953
|
+
expose: a
|
|
954
|
+
} = l, m, d;
|
|
955
|
+
const o = Z(), c = Z({}), s = Z(xe);
|
|
956
|
+
ye(() => {
|
|
957
|
+
fe.cancel(m), fe.cancel(d);
|
|
958
|
+
});
|
|
959
|
+
const b = () => {
|
|
960
|
+
try {
|
|
961
|
+
if (o.value && document.activeElement === o.value.input) {
|
|
962
|
+
const g = o.value.getSelectionStart(), r = o.value.getSelectionEnd(), w = o.value.getScrollTop();
|
|
963
|
+
o.value.setSelectionRange(g, r), o.value.setScrollTop(w);
|
|
964
|
+
}
|
|
965
|
+
} catch {
|
|
966
|
+
}
|
|
967
|
+
}, p = Z(), i = Z();
|
|
968
|
+
we(() => {
|
|
969
|
+
const g = e.autoSize || e.autosize;
|
|
970
|
+
g ? (p.value = g.minRows, i.value = g.maxRows) : (p.value = void 0, i.value = void 0);
|
|
971
|
+
});
|
|
972
|
+
const O = Y(() => !!(e.autoSize || e.autosize)), A = () => {
|
|
973
|
+
s.value = be;
|
|
974
|
+
};
|
|
975
|
+
ie([() => e.value, p, i, O], () => {
|
|
976
|
+
O.value && A();
|
|
977
|
+
}, {
|
|
978
|
+
immediate: !0
|
|
979
|
+
});
|
|
980
|
+
const _ = Z();
|
|
981
|
+
ie([s, o], () => {
|
|
982
|
+
if (o.value)
|
|
983
|
+
if (s.value === be)
|
|
984
|
+
s.value = he;
|
|
985
|
+
else if (s.value === he) {
|
|
986
|
+
const g = wt(o.value.input, !1, p.value, i.value);
|
|
987
|
+
s.value = xe, _.value = g;
|
|
988
|
+
} else
|
|
989
|
+
b();
|
|
990
|
+
}, {
|
|
991
|
+
immediate: !0,
|
|
992
|
+
flush: "post"
|
|
993
|
+
});
|
|
994
|
+
const f = Le(), B = Z(), S = () => {
|
|
995
|
+
fe.cancel(B.value);
|
|
996
|
+
}, $ = (g) => {
|
|
997
|
+
s.value === xe && (n("resize", g), O.value && (S(), B.value = fe(() => {
|
|
998
|
+
A();
|
|
999
|
+
})));
|
|
1000
|
+
};
|
|
1001
|
+
ye(() => {
|
|
1002
|
+
S();
|
|
1003
|
+
}), a({
|
|
1004
|
+
resizeTextarea: () => {
|
|
1005
|
+
A();
|
|
1006
|
+
},
|
|
1007
|
+
textArea: Y(() => {
|
|
1008
|
+
var g;
|
|
1009
|
+
return (g = o.value) === null || g === void 0 ? void 0 : g.input;
|
|
1010
|
+
}),
|
|
1011
|
+
instance: f
|
|
1012
|
+
}), at(e.autosize === void 0, "Input.TextArea", "autosize is deprecated, please use autoSize instead.");
|
|
1013
|
+
const v = () => {
|
|
1014
|
+
const {
|
|
1015
|
+
prefixCls: g,
|
|
1016
|
+
disabled: r
|
|
1017
|
+
} = e, w = Q(e, ["prefixCls", "onPressEnter", "autoSize", "autosize", "defaultValue", "allowClear", "type", "maxlength", "valueModifiers"]), C = D(g, t.class, {
|
|
1018
|
+
[`${g}-disabled`]: r
|
|
1019
|
+
}), E = O.value ? _.value : null, F = [t.style, c.value, E], T = z(z(z({}, w), t), {
|
|
1020
|
+
style: F,
|
|
1021
|
+
class: C
|
|
1022
|
+
});
|
|
1023
|
+
return (s.value === be || s.value === he) && F.push({
|
|
1024
|
+
overflowX: "hidden",
|
|
1025
|
+
overflowY: "hidden"
|
|
1026
|
+
}), T.autofocus || delete T.autofocus, T.rows === 0 && delete T.rows, y(lt, {
|
|
1027
|
+
onResize: $,
|
|
1028
|
+
disabled: !O.value
|
|
1029
|
+
}, {
|
|
1030
|
+
default: () => [y(We, V(V({}, T), {}, {
|
|
1031
|
+
ref: o,
|
|
1032
|
+
tag: "textarea"
|
|
1033
|
+
}), null)]
|
|
1034
|
+
});
|
|
1035
|
+
};
|
|
1036
|
+
return () => v();
|
|
1037
|
+
}
|
|
1038
|
+
});
|
|
1039
|
+
function Ye(e, l) {
|
|
1040
|
+
return [...e || ""].slice(0, l).join("");
|
|
1041
|
+
}
|
|
1042
|
+
function Ee(e, l, t, n) {
|
|
1043
|
+
let a = t;
|
|
1044
|
+
return e ? a = Ye(t, n) : [...l || ""].length < t.length && [...t || ""].length > n && (a = l), a;
|
|
1045
|
+
}
|
|
1046
|
+
const It = K({
|
|
1047
|
+
compatConfig: {
|
|
1048
|
+
MODE: 3
|
|
1049
|
+
},
|
|
1050
|
+
name: "ATextarea",
|
|
1051
|
+
inheritAttrs: !1,
|
|
1052
|
+
props: qe(),
|
|
1053
|
+
setup(e, l) {
|
|
1054
|
+
let {
|
|
1055
|
+
attrs: t,
|
|
1056
|
+
expose: n,
|
|
1057
|
+
emit: a
|
|
1058
|
+
} = l;
|
|
1059
|
+
var m;
|
|
1060
|
+
const d = Fe(), o = ue.useInject(), c = Y(() => Se(o.status, e.status)), s = U((m = e.value) !== null && m !== void 0 ? m : e.defaultValue), b = U(), p = U(""), {
|
|
1061
|
+
prefixCls: i,
|
|
1062
|
+
size: O,
|
|
1063
|
+
direction: A
|
|
1064
|
+
} = se("input", e), [_, f] = Ie(i), B = je(), S = Y(() => e.showCount === "" || e.showCount || !1), $ = Y(() => Number(e.maxlength) > 0), R = U(!1), v = U(), g = U(0), r = (u) => {
|
|
1065
|
+
R.value = !0, v.value = p.value, g.value = u.currentTarget.selectionStart, a("compositionstart", u);
|
|
1066
|
+
}, w = (u) => {
|
|
1067
|
+
var x;
|
|
1068
|
+
R.value = !1;
|
|
1069
|
+
let P = u.currentTarget.value;
|
|
1070
|
+
if ($.value) {
|
|
1071
|
+
const M = g.value >= e.maxlength + 1 || g.value === ((x = v.value) === null || x === void 0 ? void 0 : x.length);
|
|
1072
|
+
P = Ee(M, v.value, P, e.maxlength);
|
|
1073
|
+
}
|
|
1074
|
+
P !== p.value && (T(P), re(u.currentTarget, u, N, P)), a("compositionend", u);
|
|
1075
|
+
}, C = Le();
|
|
1076
|
+
ie(() => e.value, () => {
|
|
1077
|
+
var u;
|
|
1078
|
+
"value" in C.vnode.props, s.value = (u = e.value) !== null && u !== void 0 ? u : "";
|
|
1079
|
+
});
|
|
1080
|
+
const E = (u) => {
|
|
1081
|
+
var x;
|
|
1082
|
+
He((x = b.value) === null || x === void 0 ? void 0 : x.textArea, u);
|
|
1083
|
+
}, F = () => {
|
|
1084
|
+
var u, x;
|
|
1085
|
+
(x = (u = b.value) === null || u === void 0 ? void 0 : u.textArea) === null || x === void 0 || x.blur();
|
|
1086
|
+
}, T = (u, x) => {
|
|
1087
|
+
s.value !== u && (e.value === void 0 ? s.value = u : pe(() => {
|
|
1088
|
+
var P, M, L;
|
|
1089
|
+
b.value.textArea.value !== p.value && ((L = (P = b.value) === null || P === void 0 ? void 0 : (M = P.instance).update) === null || L === void 0 || L.call(M));
|
|
1090
|
+
}), pe(() => {
|
|
1091
|
+
x && x();
|
|
1092
|
+
}));
|
|
1093
|
+
}, h = (u) => {
|
|
1094
|
+
u.keyCode === 13 && a("pressEnter", u), a("keydown", u);
|
|
1095
|
+
}, I = (u) => {
|
|
1096
|
+
const {
|
|
1097
|
+
onBlur: x
|
|
1098
|
+
} = e;
|
|
1099
|
+
x == null || x(u), d.onFieldBlur();
|
|
1100
|
+
}, N = (u) => {
|
|
1101
|
+
a("update:value", u.target.value), a("change", u), a("input", u), d.onFieldChange();
|
|
1102
|
+
}, j = (u) => {
|
|
1103
|
+
re(b.value.textArea, u, N), T("", () => {
|
|
1104
|
+
E();
|
|
1105
|
+
});
|
|
1106
|
+
}, H = (u) => {
|
|
1107
|
+
let x = u.target.value;
|
|
1108
|
+
if (s.value !== x) {
|
|
1109
|
+
if ($.value) {
|
|
1110
|
+
const P = u.target, M = P.selectionStart >= e.maxlength + 1 || P.selectionStart === x.length || !P.selectionStart;
|
|
1111
|
+
x = Ee(M, p.value, x, e.maxlength);
|
|
1112
|
+
}
|
|
1113
|
+
re(u.currentTarget, u, N, x), T(x);
|
|
1114
|
+
}
|
|
1115
|
+
}, G = () => {
|
|
1116
|
+
var u, x;
|
|
1117
|
+
const {
|
|
1118
|
+
class: P
|
|
1119
|
+
} = t, {
|
|
1120
|
+
bordered: M = !0
|
|
1121
|
+
} = e, L = z(z(z({}, Q(e, ["allowClear"])), t), {
|
|
1122
|
+
class: [{
|
|
1123
|
+
[`${i.value}-borderless`]: !M,
|
|
1124
|
+
[`${P}`]: P && !S.value,
|
|
1125
|
+
[`${i.value}-sm`]: O.value === "small",
|
|
1126
|
+
[`${i.value}-lg`]: O.value === "large"
|
|
1127
|
+
}, le(i.value, c.value), f.value],
|
|
1128
|
+
disabled: B.value,
|
|
1129
|
+
showCount: null,
|
|
1130
|
+
prefixCls: i.value,
|
|
1131
|
+
onInput: H,
|
|
1132
|
+
onChange: H,
|
|
1133
|
+
onBlur: I,
|
|
1134
|
+
onKeydown: h,
|
|
1135
|
+
onCompositionstart: r,
|
|
1136
|
+
onCompositionend: w
|
|
1137
|
+
});
|
|
1138
|
+
return !((u = e.valueModifiers) === null || u === void 0) && u.lazy && delete L.onInput, y(St, V(V({}, L), {}, {
|
|
1139
|
+
id: (x = L == null ? void 0 : L.id) !== null && x !== void 0 ? x : d.id.value,
|
|
1140
|
+
ref: b,
|
|
1141
|
+
maxlength: e.maxlength,
|
|
1142
|
+
lazy: e.lazy
|
|
1143
|
+
}), null);
|
|
1144
|
+
};
|
|
1145
|
+
return n({
|
|
1146
|
+
focus: E,
|
|
1147
|
+
blur: F,
|
|
1148
|
+
resizableTextArea: b
|
|
1149
|
+
}), we(() => {
|
|
1150
|
+
let u = Ce(s.value);
|
|
1151
|
+
!R.value && $.value && (e.value === null || e.value === void 0) && (u = Ye(u, e.maxlength)), p.value = u;
|
|
1152
|
+
}), () => {
|
|
1153
|
+
var u;
|
|
1154
|
+
const {
|
|
1155
|
+
maxlength: x,
|
|
1156
|
+
bordered: P = !0,
|
|
1157
|
+
hidden: M
|
|
1158
|
+
} = e, {
|
|
1159
|
+
style: L,
|
|
1160
|
+
class: ae
|
|
1161
|
+
} = t, de = z(z(z({}, e), t), {
|
|
1162
|
+
prefixCls: i.value,
|
|
1163
|
+
inputType: "text",
|
|
1164
|
+
handleReset: j,
|
|
1165
|
+
direction: A.value,
|
|
1166
|
+
bordered: P,
|
|
1167
|
+
style: S.value ? void 0 : L,
|
|
1168
|
+
hashId: f.value,
|
|
1169
|
+
disabled: (u = e.disabled) !== null && u !== void 0 ? u : B.value
|
|
1170
|
+
});
|
|
1171
|
+
let te = y(ht, V(V({}, de), {}, {
|
|
1172
|
+
value: p.value,
|
|
1173
|
+
status: e.status
|
|
1174
|
+
}), {
|
|
1175
|
+
element: G
|
|
1176
|
+
});
|
|
1177
|
+
if (S.value || o.hasFeedback) {
|
|
1178
|
+
const ce = [...p.value].length;
|
|
1179
|
+
let ne = "";
|
|
1180
|
+
typeof S.value == "object" ? ne = S.value.formatter({
|
|
1181
|
+
value: p.value,
|
|
1182
|
+
count: ce,
|
|
1183
|
+
maxlength: x
|
|
1184
|
+
}) : ne = `${ce}${$.value ? ` / ${x}` : ""}`, te = y("div", {
|
|
1185
|
+
hidden: M,
|
|
1186
|
+
class: D(`${i.value}-textarea`, {
|
|
1187
|
+
[`${i.value}-textarea-rtl`]: A.value === "rtl",
|
|
1188
|
+
[`${i.value}-textarea-show-count`]: S.value,
|
|
1189
|
+
[`${i.value}-textarea-in-form-item`]: o.isFormItemInput
|
|
1190
|
+
}, `${i.value}-textarea-show-count`, ae, f.value),
|
|
1191
|
+
style: L,
|
|
1192
|
+
"data-count": typeof ne != "object" ? ne : void 0
|
|
1193
|
+
}, [te, o.hasFeedback && y("span", {
|
|
1194
|
+
class: `${i.value}-textarea-suffix`
|
|
1195
|
+
}, [o.feedbackIcon])]);
|
|
1196
|
+
}
|
|
1197
|
+
return _(te);
|
|
1198
|
+
};
|
|
1199
|
+
}
|
|
1200
|
+
});
|
|
1201
|
+
var $t = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, name: "eye", theme: "outlined" };
|
|
1202
|
+
function Re(e) {
|
|
1203
|
+
for (var l = 1; l < arguments.length; l++) {
|
|
1204
|
+
var t = arguments[l] != null ? Object(arguments[l]) : {}, n = Object.keys(t);
|
|
1205
|
+
typeof Object.getOwnPropertySymbols == "function" && (n = n.concat(Object.getOwnPropertySymbols(t).filter(function(a) {
|
|
1206
|
+
return Object.getOwnPropertyDescriptor(t, a).enumerable;
|
|
1207
|
+
}))), n.forEach(function(a) {
|
|
1208
|
+
zt(e, a, t[a]);
|
|
1209
|
+
});
|
|
1210
|
+
}
|
|
1211
|
+
return e;
|
|
1212
|
+
}
|
|
1213
|
+
function zt(e, l, t) {
|
|
1214
|
+
return l in e ? Object.defineProperty(e, l, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[l] = t, e;
|
|
1215
|
+
}
|
|
1216
|
+
var ze = function(l, t) {
|
|
1217
|
+
var n = Re({}, l, t.attrs);
|
|
1218
|
+
return y(Ve, Re({}, n, {
|
|
1219
|
+
icon: $t
|
|
1220
|
+
}), null);
|
|
1221
|
+
};
|
|
1222
|
+
ze.displayName = "EyeOutlined";
|
|
1223
|
+
ze.inheritAttrs = !1;
|
|
1224
|
+
var Ot = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z" } }, { tag: "path", attrs: { d: "M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z" } }] }, name: "eye-invisible", theme: "outlined" };
|
|
1225
|
+
function Ne(e) {
|
|
1226
|
+
for (var l = 1; l < arguments.length; l++) {
|
|
1227
|
+
var t = arguments[l] != null ? Object(arguments[l]) : {}, n = Object.keys(t);
|
|
1228
|
+
typeof Object.getOwnPropertySymbols == "function" && (n = n.concat(Object.getOwnPropertySymbols(t).filter(function(a) {
|
|
1229
|
+
return Object.getOwnPropertyDescriptor(t, a).enumerable;
|
|
1230
|
+
}))), n.forEach(function(a) {
|
|
1231
|
+
At(e, a, t[a]);
|
|
1232
|
+
});
|
|
1233
|
+
}
|
|
1234
|
+
return e;
|
|
1235
|
+
}
|
|
1236
|
+
function At(e, l, t) {
|
|
1237
|
+
return l in e ? Object.defineProperty(e, l, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[l] = t, e;
|
|
1238
|
+
}
|
|
1239
|
+
var Oe = function(l, t) {
|
|
1240
|
+
var n = Ne({}, l, t.attrs);
|
|
1241
|
+
return y(Ve, Ne({}, n, {
|
|
1242
|
+
icon: Ot
|
|
1243
|
+
}), null);
|
|
1244
|
+
};
|
|
1245
|
+
Oe.displayName = "EyeInvisibleOutlined";
|
|
1246
|
+
Oe.inheritAttrs = !1;
|
|
1247
|
+
var _t = function(e, l) {
|
|
1248
|
+
var t = {};
|
|
1249
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && l.indexOf(n) < 0 && (t[n] = e[n]);
|
|
1250
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
|
|
1251
|
+
l.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (t[n[a]] = e[n[a]]);
|
|
1252
|
+
return t;
|
|
1253
|
+
};
|
|
1254
|
+
const Pt = {
|
|
1255
|
+
click: "onClick",
|
|
1256
|
+
hover: "onMouseover"
|
|
1257
|
+
}, Bt = (e) => e ? y(ze, null, null) : y(Oe, null, null), Et = K({
|
|
1258
|
+
compatConfig: {
|
|
1259
|
+
MODE: 3
|
|
1260
|
+
},
|
|
1261
|
+
name: "AInputPassword",
|
|
1262
|
+
inheritAttrs: !1,
|
|
1263
|
+
props: z(z({}, me()), {
|
|
1264
|
+
prefixCls: String,
|
|
1265
|
+
inputPrefixCls: String,
|
|
1266
|
+
action: {
|
|
1267
|
+
type: String,
|
|
1268
|
+
default: "click"
|
|
1269
|
+
},
|
|
1270
|
+
visibilityToggle: {
|
|
1271
|
+
type: Boolean,
|
|
1272
|
+
default: !0
|
|
1273
|
+
},
|
|
1274
|
+
visible: {
|
|
1275
|
+
type: Boolean,
|
|
1276
|
+
default: void 0
|
|
1277
|
+
},
|
|
1278
|
+
"onUpdate:visible": Function,
|
|
1279
|
+
iconRender: Function
|
|
1280
|
+
}),
|
|
1281
|
+
setup(e, l) {
|
|
1282
|
+
let {
|
|
1283
|
+
slots: t,
|
|
1284
|
+
attrs: n,
|
|
1285
|
+
expose: a,
|
|
1286
|
+
emit: m
|
|
1287
|
+
} = l;
|
|
1288
|
+
const d = U(!1), o = () => {
|
|
1289
|
+
const {
|
|
1290
|
+
disabled: f
|
|
1291
|
+
} = e;
|
|
1292
|
+
f || (d.value = !d.value, m("update:visible", d.value));
|
|
1293
|
+
};
|
|
1294
|
+
we(() => {
|
|
1295
|
+
e.visible !== void 0 && (d.value = !!e.visible);
|
|
1296
|
+
});
|
|
1297
|
+
const c = U();
|
|
1298
|
+
a({
|
|
1299
|
+
focus: () => {
|
|
1300
|
+
var f;
|
|
1301
|
+
(f = c.value) === null || f === void 0 || f.focus();
|
|
1302
|
+
},
|
|
1303
|
+
blur: () => {
|
|
1304
|
+
var f;
|
|
1305
|
+
(f = c.value) === null || f === void 0 || f.blur();
|
|
1306
|
+
}
|
|
1307
|
+
});
|
|
1308
|
+
const p = (f) => {
|
|
1309
|
+
const {
|
|
1310
|
+
action: B,
|
|
1311
|
+
iconRender: S = t.iconRender || Bt
|
|
1312
|
+
} = e, $ = Pt[B] || "", R = S(d.value), v = {
|
|
1313
|
+
[$]: o,
|
|
1314
|
+
class: `${f}-icon`,
|
|
1315
|
+
key: "passwordIcon",
|
|
1316
|
+
onMousedown: (g) => {
|
|
1317
|
+
g.preventDefault();
|
|
1318
|
+
},
|
|
1319
|
+
onMouseup: (g) => {
|
|
1320
|
+
g.preventDefault();
|
|
1321
|
+
}
|
|
1322
|
+
};
|
|
1323
|
+
return ee(ot(R) ? R : y("span", null, [R]), v);
|
|
1324
|
+
}, {
|
|
1325
|
+
prefixCls: i,
|
|
1326
|
+
getPrefixCls: O
|
|
1327
|
+
} = se("input-password", e), A = Y(() => O("input", e.inputPrefixCls)), _ = () => {
|
|
1328
|
+
const {
|
|
1329
|
+
size: f,
|
|
1330
|
+
visibilityToggle: B
|
|
1331
|
+
} = e, S = _t(e, ["size", "visibilityToggle"]), $ = B && p(i.value), R = D(i.value, n.class, {
|
|
1332
|
+
[`${i.value}-${f}`]: !!f
|
|
1333
|
+
}), v = z(z(z({}, Q(S, ["suffix", "iconRender", "action"])), n), {
|
|
1334
|
+
type: d.value ? "text" : "password",
|
|
1335
|
+
class: R,
|
|
1336
|
+
prefixCls: A.value,
|
|
1337
|
+
suffix: $
|
|
1338
|
+
});
|
|
1339
|
+
return f && (v.size = f), y(k, V({
|
|
1340
|
+
ref: c
|
|
1341
|
+
}, v), t);
|
|
1342
|
+
};
|
|
1343
|
+
return () => _();
|
|
1344
|
+
}
|
|
1345
|
+
});
|
|
1346
|
+
k.Group = vt;
|
|
1347
|
+
k.Search = mt;
|
|
1348
|
+
k.TextArea = It;
|
|
1349
|
+
k.Password = Et;
|
|
1350
|
+
k.install = function(e) {
|
|
1351
|
+
return e.component(k.name, k), e.component(k.Group.name, k.Group), e.component(k.Search.name, k.Search), e.component(k.TextArea.name, k.TextArea), e.component(k.Password.name, k.Password), e;
|
|
1352
|
+
};
|
|
1353
|
+
export {
|
|
1354
|
+
k as I,
|
|
1355
|
+
Et as a
|
|
1356
|
+
};
|