rayyy-vue-table-components 2.0.22 → 2.0.25

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.
@@ -1,549 +0,0 @@
1
- type __VLS_Props = {
2
- modelValue: string[];
3
- type?: string;
4
- validateRule?: (inputString: string) => boolean;
5
- };
6
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
7
- "update:modelValue": (val: string[]) => any;
8
- inputError: () => any;
9
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
10
- "onUpdate:modelValue"?: ((val: string[]) => any) | undefined;
11
- onInputError?: (() => any) | undefined;
12
- }>, {
13
- type: string;
14
- validateRule: (inputString: string) => boolean;
15
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
16
- InputRef: ({
17
- $: import('vue').ComponentInternalInstance;
18
- $data: {};
19
- $props: Partial<{
20
- readonly disabled: boolean;
21
- readonly id: string;
22
- readonly type: string;
23
- readonly modelValue: string | number | null | undefined;
24
- readonly tabindex: string | number;
25
- readonly readonly: boolean;
26
- readonly autosize: import('element-plus').InputAutoSize;
27
- readonly autocomplete: string;
28
- readonly containerRole: string;
29
- readonly validateEvent: boolean;
30
- readonly inputStyle: import('vue').StyleValue;
31
- readonly rows: number;
32
- readonly inputmode: "none" | "search" | "text" | "url" | "email" | "tel" | "numeric" | "decimal" | undefined;
33
- readonly clearable: boolean;
34
- readonly showPassword: boolean;
35
- readonly showWordLimit: boolean;
36
- readonly autofocus: boolean;
37
- }> & Omit<{
38
- readonly type: string;
39
- readonly disabled: boolean;
40
- readonly autofocus: boolean;
41
- readonly modelValue: string | number | null;
42
- readonly showPassword: boolean;
43
- readonly readonly: boolean;
44
- readonly autocomplete: string;
45
- readonly autosize: import('element-plus').InputAutoSize;
46
- readonly clearable: boolean;
47
- readonly showWordLimit: boolean;
48
- readonly tabindex: string | number;
49
- readonly validateEvent: boolean;
50
- readonly inputStyle: string | false | import('vue').CSSProperties | import('vue').StyleValue[] | null;
51
- readonly rows: number;
52
- readonly resize?: ("none" | "horizontal" | "vertical" | "both") | undefined;
53
- readonly size?: ("" | "default" | "small" | "large") | undefined;
54
- readonly id?: string | undefined;
55
- readonly ariaLabel?: string | undefined;
56
- readonly placeholder?: string | undefined;
57
- readonly formatter?: Function | undefined;
58
- readonly form?: string | undefined;
59
- readonly maxlength?: (string | number) | undefined;
60
- readonly inputmode?: "none" | "search" | "text" | "url" | "email" | "tel" | "numeric" | "decimal" | undefined;
61
- readonly name?: string | undefined;
62
- readonly minlength?: (string | number) | undefined;
63
- readonly parser?: Function | undefined;
64
- readonly clearIcon?: (string | import('vue').Component) | undefined;
65
- readonly suffixIcon?: (string | import('vue').Component) | undefined;
66
- readonly prefixIcon?: (string | import('vue').Component) | undefined;
67
- readonly containerRole?: string | undefined;
68
- "onUpdate:modelValue"?: ((value: string) => any) | undefined | undefined;
69
- onChange?: ((value: string) => any) | undefined | undefined;
70
- onCompositionend?: ((evt: CompositionEvent) => any) | undefined | undefined;
71
- onCompositionstart?: ((evt: CompositionEvent) => any) | undefined | undefined;
72
- onCompositionupdate?: ((evt: CompositionEvent) => any) | undefined | undefined;
73
- onFocus?: ((evt: FocusEvent) => any) | undefined | undefined;
74
- onBlur?: ((evt: FocusEvent) => any) | undefined | undefined;
75
- onInput?: ((value: string) => any) | undefined | undefined;
76
- onKeydown?: ((evt: Event | KeyboardEvent) => any) | undefined | undefined;
77
- onMouseenter?: ((evt: MouseEvent) => any) | undefined | undefined;
78
- onMouseleave?: ((evt: MouseEvent) => any) | undefined | undefined;
79
- onClear?: (() => any) | undefined | undefined;
80
- } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "type" | "disabled" | "id" | "autofocus" | "modelValue" | "showPassword" | "readonly" | "autocomplete" | "inputmode" | "autosize" | "clearable" | "showWordLimit" | "containerRole" | "tabindex" | "validateEvent" | "inputStyle" | "rows">;
81
- $attrs: {
82
- [x: string]: unknown;
83
- };
84
- $refs: {
85
- [x: string]: unknown;
86
- };
87
- $slots: Readonly<{
88
- [name: string]: import('vue').Slot<any> | undefined;
89
- }>;
90
- $root: import('vue').ComponentPublicInstance | null;
91
- $parent: import('vue').ComponentPublicInstance | null;
92
- $host: Element | null;
93
- $emit: ((event: "blur", evt: FocusEvent) => void) & ((event: "change", value: string) => void) & ((event: "compositionend", evt: CompositionEvent) => void) & ((event: "compositionstart", evt: CompositionEvent) => void) & ((event: "compositionupdate", evt: CompositionEvent) => void) & ((event: "focus", evt: FocusEvent) => void) & ((event: "input", value: string) => void) & ((event: "keydown", evt: Event | KeyboardEvent) => void) & ((event: "mouseenter", evt: MouseEvent) => void) & ((event: "mouseleave", evt: MouseEvent) => void) & ((event: "clear") => void) & ((event: "update:modelValue", value: string) => void);
94
- $el: any;
95
- $options: import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
96
- readonly inputmode: {
97
- readonly type: import('vue').PropType<"none" | "search" | "text" | "url" | "email" | "tel" | "numeric" | "decimal" | undefined>;
98
- readonly required: false;
99
- readonly validator: ((val: unknown) => boolean) | undefined;
100
- __epPropKey: true;
101
- } & {
102
- readonly default: undefined;
103
- };
104
- readonly name: StringConstructor;
105
- readonly ariaLabel: StringConstructor;
106
- readonly id: {
107
- readonly type: import('vue').PropType<string>;
108
- readonly required: false;
109
- readonly validator: ((val: unknown) => boolean) | undefined;
110
- __epPropKey: true;
111
- } & {
112
- readonly default: undefined;
113
- };
114
- readonly size: {
115
- readonly type: import('vue').PropType<"" | "default" | "small" | "large">;
116
- readonly required: false;
117
- readonly validator: ((val: unknown) => boolean) | undefined;
118
- __epPropKey: true;
119
- };
120
- readonly disabled: BooleanConstructor;
121
- readonly modelValue: {
122
- readonly type: import('vue').PropType<string | number | null | undefined>;
123
- readonly required: false;
124
- readonly validator: ((val: unknown) => boolean) | undefined;
125
- __epPropKey: true;
126
- } & {
127
- readonly default: "";
128
- };
129
- readonly maxlength: {
130
- readonly type: import('vue').PropType<string | number>;
131
- readonly required: false;
132
- readonly validator: ((val: unknown) => boolean) | undefined;
133
- __epPropKey: true;
134
- };
135
- readonly minlength: {
136
- readonly type: import('vue').PropType<string | number>;
137
- readonly required: false;
138
- readonly validator: ((val: unknown) => boolean) | undefined;
139
- __epPropKey: true;
140
- };
141
- readonly type: {
142
- readonly type: import('vue').PropType<string>;
143
- readonly required: false;
144
- readonly validator: ((val: unknown) => boolean) | undefined;
145
- __epPropKey: true;
146
- } & {
147
- readonly default: "text";
148
- };
149
- readonly resize: {
150
- readonly type: import('vue').PropType<"none" | "horizontal" | "vertical" | "both">;
151
- readonly required: false;
152
- readonly validator: ((val: unknown) => boolean) | undefined;
153
- __epPropKey: true;
154
- };
155
- readonly autosize: {
156
- readonly type: import('vue').PropType<import('element-plus').InputAutoSize>;
157
- readonly required: false;
158
- readonly validator: ((val: unknown) => boolean) | undefined;
159
- __epPropKey: true;
160
- } & {
161
- readonly default: false;
162
- };
163
- readonly autocomplete: {
164
- readonly type: import('vue').PropType<string>;
165
- readonly required: false;
166
- readonly validator: ((val: unknown) => boolean) | undefined;
167
- __epPropKey: true;
168
- } & {
169
- readonly default: "off";
170
- };
171
- readonly formatter: {
172
- readonly type: import('vue').PropType<Function>;
173
- readonly required: false;
174
- readonly validator: ((val: unknown) => boolean) | undefined;
175
- __epPropKey: true;
176
- };
177
- readonly parser: {
178
- readonly type: import('vue').PropType<Function>;
179
- readonly required: false;
180
- readonly validator: ((val: unknown) => boolean) | undefined;
181
- __epPropKey: true;
182
- };
183
- readonly placeholder: {
184
- readonly type: import('vue').PropType<string>;
185
- readonly required: false;
186
- readonly validator: ((val: unknown) => boolean) | undefined;
187
- __epPropKey: true;
188
- };
189
- readonly form: {
190
- readonly type: import('vue').PropType<string>;
191
- readonly required: false;
192
- readonly validator: ((val: unknown) => boolean) | undefined;
193
- __epPropKey: true;
194
- };
195
- readonly readonly: BooleanConstructor;
196
- readonly clearable: BooleanConstructor;
197
- readonly clearIcon: {
198
- readonly type: import('vue').PropType<string | import('vue').Component>;
199
- readonly required: false;
200
- readonly validator: ((val: unknown) => boolean) | undefined;
201
- __epPropKey: true;
202
- };
203
- readonly showPassword: BooleanConstructor;
204
- readonly showWordLimit: BooleanConstructor;
205
- readonly suffixIcon: {
206
- readonly type: import('vue').PropType<string | import('vue').Component>;
207
- readonly required: false;
208
- readonly validator: ((val: unknown) => boolean) | undefined;
209
- __epPropKey: true;
210
- };
211
- readonly prefixIcon: {
212
- readonly type: import('vue').PropType<string | import('vue').Component>;
213
- readonly required: false;
214
- readonly validator: ((val: unknown) => boolean) | undefined;
215
- __epPropKey: true;
216
- };
217
- readonly containerRole: {
218
- readonly type: import('vue').PropType<string>;
219
- readonly required: false;
220
- readonly validator: ((val: unknown) => boolean) | undefined;
221
- __epPropKey: true;
222
- } & {
223
- readonly default: undefined;
224
- };
225
- readonly tabindex: {
226
- readonly type: import('vue').PropType<string | number>;
227
- readonly required: false;
228
- readonly validator: ((val: unknown) => boolean) | undefined;
229
- __epPropKey: true;
230
- } & {
231
- readonly default: 0;
232
- };
233
- readonly validateEvent: {
234
- readonly type: import('vue').PropType<boolean>;
235
- readonly required: false;
236
- readonly validator: ((val: unknown) => boolean) | undefined;
237
- __epPropKey: true;
238
- } & {
239
- readonly default: true;
240
- };
241
- readonly inputStyle: {
242
- readonly type: import('vue').PropType<import('vue').StyleValue>;
243
- readonly required: false;
244
- readonly validator: ((val: unknown) => boolean) | undefined;
245
- __epPropKey: true;
246
- } & {
247
- readonly default: () => {};
248
- };
249
- readonly autofocus: BooleanConstructor;
250
- readonly rows: {
251
- readonly type: import('vue').PropType<number>;
252
- readonly required: false;
253
- readonly validator: ((val: unknown) => boolean) | undefined;
254
- __epPropKey: true;
255
- } & {
256
- readonly default: 2;
257
- };
258
- }>> & {
259
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
260
- onChange?: ((value: string) => any) | undefined;
261
- onCompositionend?: ((evt: CompositionEvent) => any) | undefined;
262
- onCompositionstart?: ((evt: CompositionEvent) => any) | undefined;
263
- onCompositionupdate?: ((evt: CompositionEvent) => any) | undefined;
264
- onFocus?: ((evt: FocusEvent) => any) | undefined;
265
- onBlur?: ((evt: FocusEvent) => any) | undefined;
266
- onInput?: ((value: string) => any) | undefined;
267
- onKeydown?: ((evt: Event | KeyboardEvent) => any) | undefined;
268
- onMouseenter?: ((evt: MouseEvent) => any) | undefined;
269
- onMouseleave?: ((evt: MouseEvent) => any) | undefined;
270
- onClear?: (() => any) | undefined;
271
- }, {
272
- input: import('vue').ShallowRef<HTMLInputElement | undefined>;
273
- textarea: import('vue').ShallowRef<HTMLTextAreaElement | undefined>;
274
- ref: import('vue').ComputedRef<HTMLInputElement | HTMLTextAreaElement | undefined>;
275
- textareaStyle: import('vue').ComputedRef<import('vue').StyleValue>;
276
- autosize: import('vue').Ref<import('element-plus').InputAutoSize>;
277
- isComposing: import('vue').Ref<boolean>;
278
- focus: () => void | undefined;
279
- blur: () => void | undefined;
280
- select: () => void;
281
- clear: () => void;
282
- resizeTextarea: () => void;
283
- }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
284
- input: (value: string) => void;
285
- clear: () => void;
286
- "update:modelValue": (value: string) => void;
287
- change: (value: string) => void;
288
- blur: (evt: FocusEvent) => void;
289
- compositionend: (evt: CompositionEvent) => void;
290
- compositionstart: (evt: CompositionEvent) => void;
291
- compositionupdate: (evt: CompositionEvent) => void;
292
- focus: (evt: FocusEvent) => void;
293
- keydown: (evt: Event | KeyboardEvent) => void;
294
- mouseenter: (evt: MouseEvent) => void;
295
- mouseleave: (evt: MouseEvent) => void;
296
- }, string, {
297
- readonly disabled: boolean;
298
- readonly id: string;
299
- readonly type: string;
300
- readonly modelValue: string | number | null | undefined;
301
- readonly tabindex: string | number;
302
- readonly readonly: boolean;
303
- readonly autosize: import('element-plus').InputAutoSize;
304
- readonly autocomplete: string;
305
- readonly containerRole: string;
306
- readonly validateEvent: boolean;
307
- readonly inputStyle: import('vue').StyleValue;
308
- readonly rows: number;
309
- readonly inputmode: "none" | "search" | "text" | "url" | "email" | "tel" | "numeric" | "decimal" | undefined;
310
- readonly clearable: boolean;
311
- readonly showPassword: boolean;
312
- readonly showWordLimit: boolean;
313
- readonly autofocus: boolean;
314
- }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
315
- beforeCreate?: (() => void) | (() => void)[];
316
- created?: (() => void) | (() => void)[];
317
- beforeMount?: (() => void) | (() => void)[];
318
- mounted?: (() => void) | (() => void)[];
319
- beforeUpdate?: (() => void) | (() => void)[];
320
- updated?: (() => void) | (() => void)[];
321
- activated?: (() => void) | (() => void)[];
322
- deactivated?: (() => void) | (() => void)[];
323
- beforeDestroy?: (() => void) | (() => void)[];
324
- beforeUnmount?: (() => void) | (() => void)[];
325
- destroyed?: (() => void) | (() => void)[];
326
- unmounted?: (() => void) | (() => void)[];
327
- renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
328
- renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
329
- errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
330
- };
331
- $forceUpdate: () => void;
332
- $nextTick: typeof import('vue').nextTick;
333
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
334
- } & Readonly<{
335
- readonly disabled: boolean;
336
- readonly id: string;
337
- readonly type: string;
338
- readonly modelValue: string | number | null | undefined;
339
- readonly tabindex: string | number;
340
- readonly readonly: boolean;
341
- readonly autosize: import('element-plus').InputAutoSize;
342
- readonly autocomplete: string;
343
- readonly containerRole: string;
344
- readonly validateEvent: boolean;
345
- readonly inputStyle: import('vue').StyleValue;
346
- readonly rows: number;
347
- readonly inputmode: "none" | "search" | "text" | "url" | "email" | "tel" | "numeric" | "decimal" | undefined;
348
- readonly clearable: boolean;
349
- readonly showPassword: boolean;
350
- readonly showWordLimit: boolean;
351
- readonly autofocus: boolean;
352
- }> & Omit<Readonly<import('vue').ExtractPropTypes<{
353
- readonly inputmode: {
354
- readonly type: import('vue').PropType<"none" | "search" | "text" | "url" | "email" | "tel" | "numeric" | "decimal" | undefined>;
355
- readonly required: false;
356
- readonly validator: ((val: unknown) => boolean) | undefined;
357
- __epPropKey: true;
358
- } & {
359
- readonly default: undefined;
360
- };
361
- readonly name: StringConstructor;
362
- readonly ariaLabel: StringConstructor;
363
- readonly id: {
364
- readonly type: import('vue').PropType<string>;
365
- readonly required: false;
366
- readonly validator: ((val: unknown) => boolean) | undefined;
367
- __epPropKey: true;
368
- } & {
369
- readonly default: undefined;
370
- };
371
- readonly size: {
372
- readonly type: import('vue').PropType<"" | "default" | "small" | "large">;
373
- readonly required: false;
374
- readonly validator: ((val: unknown) => boolean) | undefined;
375
- __epPropKey: true;
376
- };
377
- readonly disabled: BooleanConstructor;
378
- readonly modelValue: {
379
- readonly type: import('vue').PropType<string | number | null | undefined>;
380
- readonly required: false;
381
- readonly validator: ((val: unknown) => boolean) | undefined;
382
- __epPropKey: true;
383
- } & {
384
- readonly default: "";
385
- };
386
- readonly maxlength: {
387
- readonly type: import('vue').PropType<string | number>;
388
- readonly required: false;
389
- readonly validator: ((val: unknown) => boolean) | undefined;
390
- __epPropKey: true;
391
- };
392
- readonly minlength: {
393
- readonly type: import('vue').PropType<string | number>;
394
- readonly required: false;
395
- readonly validator: ((val: unknown) => boolean) | undefined;
396
- __epPropKey: true;
397
- };
398
- readonly type: {
399
- readonly type: import('vue').PropType<string>;
400
- readonly required: false;
401
- readonly validator: ((val: unknown) => boolean) | undefined;
402
- __epPropKey: true;
403
- } & {
404
- readonly default: "text";
405
- };
406
- readonly resize: {
407
- readonly type: import('vue').PropType<"none" | "horizontal" | "vertical" | "both">;
408
- readonly required: false;
409
- readonly validator: ((val: unknown) => boolean) | undefined;
410
- __epPropKey: true;
411
- };
412
- readonly autosize: {
413
- readonly type: import('vue').PropType<import('element-plus').InputAutoSize>;
414
- readonly required: false;
415
- readonly validator: ((val: unknown) => boolean) | undefined;
416
- __epPropKey: true;
417
- } & {
418
- readonly default: false;
419
- };
420
- readonly autocomplete: {
421
- readonly type: import('vue').PropType<string>;
422
- readonly required: false;
423
- readonly validator: ((val: unknown) => boolean) | undefined;
424
- __epPropKey: true;
425
- } & {
426
- readonly default: "off";
427
- };
428
- readonly formatter: {
429
- readonly type: import('vue').PropType<Function>;
430
- readonly required: false;
431
- readonly validator: ((val: unknown) => boolean) | undefined;
432
- __epPropKey: true;
433
- };
434
- readonly parser: {
435
- readonly type: import('vue').PropType<Function>;
436
- readonly required: false;
437
- readonly validator: ((val: unknown) => boolean) | undefined;
438
- __epPropKey: true;
439
- };
440
- readonly placeholder: {
441
- readonly type: import('vue').PropType<string>;
442
- readonly required: false;
443
- readonly validator: ((val: unknown) => boolean) | undefined;
444
- __epPropKey: true;
445
- };
446
- readonly form: {
447
- readonly type: import('vue').PropType<string>;
448
- readonly required: false;
449
- readonly validator: ((val: unknown) => boolean) | undefined;
450
- __epPropKey: true;
451
- };
452
- readonly readonly: BooleanConstructor;
453
- readonly clearable: BooleanConstructor;
454
- readonly clearIcon: {
455
- readonly type: import('vue').PropType<string | import('vue').Component>;
456
- readonly required: false;
457
- readonly validator: ((val: unknown) => boolean) | undefined;
458
- __epPropKey: true;
459
- };
460
- readonly showPassword: BooleanConstructor;
461
- readonly showWordLimit: BooleanConstructor;
462
- readonly suffixIcon: {
463
- readonly type: import('vue').PropType<string | import('vue').Component>;
464
- readonly required: false;
465
- readonly validator: ((val: unknown) => boolean) | undefined;
466
- __epPropKey: true;
467
- };
468
- readonly prefixIcon: {
469
- readonly type: import('vue').PropType<string | import('vue').Component>;
470
- readonly required: false;
471
- readonly validator: ((val: unknown) => boolean) | undefined;
472
- __epPropKey: true;
473
- };
474
- readonly containerRole: {
475
- readonly type: import('vue').PropType<string>;
476
- readonly required: false;
477
- readonly validator: ((val: unknown) => boolean) | undefined;
478
- __epPropKey: true;
479
- } & {
480
- readonly default: undefined;
481
- };
482
- readonly tabindex: {
483
- readonly type: import('vue').PropType<string | number>;
484
- readonly required: false;
485
- readonly validator: ((val: unknown) => boolean) | undefined;
486
- __epPropKey: true;
487
- } & {
488
- readonly default: 0;
489
- };
490
- readonly validateEvent: {
491
- readonly type: import('vue').PropType<boolean>;
492
- readonly required: false;
493
- readonly validator: ((val: unknown) => boolean) | undefined;
494
- __epPropKey: true;
495
- } & {
496
- readonly default: true;
497
- };
498
- readonly inputStyle: {
499
- readonly type: import('vue').PropType<import('vue').StyleValue>;
500
- readonly required: false;
501
- readonly validator: ((val: unknown) => boolean) | undefined;
502
- __epPropKey: true;
503
- } & {
504
- readonly default: () => {};
505
- };
506
- readonly autofocus: BooleanConstructor;
507
- readonly rows: {
508
- readonly type: import('vue').PropType<number>;
509
- readonly required: false;
510
- readonly validator: ((val: unknown) => boolean) | undefined;
511
- __epPropKey: true;
512
- } & {
513
- readonly default: 2;
514
- };
515
- }>> & {
516
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
517
- onChange?: ((value: string) => any) | undefined;
518
- onCompositionend?: ((evt: CompositionEvent) => any) | undefined;
519
- onCompositionstart?: ((evt: CompositionEvent) => any) | undefined;
520
- onCompositionupdate?: ((evt: CompositionEvent) => any) | undefined;
521
- onFocus?: ((evt: FocusEvent) => any) | undefined;
522
- onBlur?: ((evt: FocusEvent) => any) | undefined;
523
- onInput?: ((value: string) => any) | undefined;
524
- onKeydown?: ((evt: Event | KeyboardEvent) => any) | undefined;
525
- onMouseenter?: ((evt: MouseEvent) => any) | undefined;
526
- onMouseleave?: ((evt: MouseEvent) => any) | undefined;
527
- onClear?: (() => any) | undefined;
528
- }, "blur" | "focus" | "input" | "select" | "ref" | "type" | "disabled" | "id" | "textarea" | "autofocus" | "clear" | "modelValue" | "showPassword" | "readonly" | "autocomplete" | "inputmode" | "autosize" | "clearable" | "showWordLimit" | "containerRole" | "tabindex" | "validateEvent" | "inputStyle" | "rows" | "textareaStyle" | "isComposing" | "resizeTextarea"> & import('vue').ShallowUnwrapRef<{
529
- input: import('vue').ShallowRef<HTMLInputElement | undefined>;
530
- textarea: import('vue').ShallowRef<HTMLTextAreaElement | undefined>;
531
- ref: import('vue').ComputedRef<HTMLInputElement | HTMLTextAreaElement | undefined>;
532
- textareaStyle: import('vue').ComputedRef<import('vue').StyleValue>;
533
- autosize: import('vue').Ref<import('element-plus').InputAutoSize>;
534
- isComposing: import('vue').Ref<boolean>;
535
- focus: () => void | undefined;
536
- blur: () => void | undefined;
537
- select: () => void;
538
- clear: () => void;
539
- resizeTextarea: () => void;
540
- }> & {} & import('vue').ComponentCustomProperties & {} & {
541
- $slots: {
542
- prepend?(_: {}): any;
543
- prefix?(_: {}): any;
544
- suffix?(_: {}): any;
545
- append?(_: {}): any;
546
- };
547
- }) | null;
548
- }, HTMLDivElement>;
549
- export default _default;
@@ -1,112 +0,0 @@
1
- <script setup lang="ts">
2
- import { ref, useAttrs } from 'vue'
3
- import type { ElInput } from 'element-plus'
4
-
5
- const inputValue = ref<string>('')
6
- const InputRef = ref<InstanceType<typeof ElInput>>()
7
-
8
- const props = withDefaults(
9
- defineProps<{
10
- modelValue: string[]
11
- type?: string
12
- validateRule?: (inputString: string) => boolean
13
- }>(),
14
- {
15
- type: 'textarea',
16
- validateRule: () => true,
17
- },
18
- )
19
-
20
- // 獲取所有非 props 屬性
21
- const attrs = useAttrs()
22
-
23
- const emits = defineEmits<{
24
- (e: 'update:modelValue', val: string[]): void
25
- (e: 'inputError'): void
26
- }>()
27
-
28
- const remove = (position: number) => {
29
- emits(
30
- 'update:modelValue',
31
- props.modelValue.filter((input, index) => index !== position),
32
- )
33
- }
34
-
35
- const handleInputConfirm = () => {
36
- const inputString = inputValue.value
37
- if (!inputString) {
38
- return
39
- }
40
- if (!props.validateRule(inputString)) {
41
- emits('inputError')
42
- return
43
- }
44
- if (!props.modelValue.includes(inputString)) {
45
- emits('update:modelValue', props.modelValue.concat(inputValue.value))
46
- }
47
-
48
- inputValue.value = ''
49
- }
50
-
51
- const focusInput = () => {
52
- InputRef.value?.focus()
53
- }
54
-
55
- const deleteLastTag = () => {
56
- if (inputValue.value) {
57
- return
58
- }
59
- emits('update:modelValue', props.modelValue.slice(0, -1))
60
- }
61
- </script>
62
-
63
- <template>
64
- <div v-bind="attrs" class="w-full border border-t rounded" @click="focusInput">
65
- <el-tag
66
- v-for="(tag, position) in props.modelValue"
67
- :key="tag"
68
- class="m-0.5 break-all whitespace-pre-line"
69
- closable
70
- @close="() => remove(position)"
71
- >
72
- {{ tag }}
73
- </el-tag>
74
- <el-input
75
- ref="InputRef"
76
- v-model="inputValue"
77
- :type="props.type"
78
- class="shadow-none"
79
- autosize
80
- resize="none"
81
- @keydown.enter.prevent="handleInputConfirm"
82
- @blur="handleInputConfirm"
83
- @keydown.delete.stop="deleteLastTag"
84
- />
85
- </div>
86
- </template>
87
-
88
- <style scoped lang="scss">
89
- :deep(.el-input) {
90
- --el-input-border-color: transparent;
91
- --el-input-focus-border-color: transparent;
92
- --el-border-color-hover: transparent;
93
- }
94
-
95
- :deep(.el-input__inner) {
96
- box-shadow: none !important;
97
- }
98
-
99
- :deep(.el-input__inner:hover) {
100
- box-shadow: none !important;
101
- }
102
-
103
- :deep(.el-input)::-webkit-outer-spin-button,
104
- :deep(.el-input)::-webkit-inner-spin-button {
105
- -webkit-appearance: none;
106
- margin: 0;
107
- }
108
-
109
- :deep(.el-input[type='number']) {
110
- -moz-appearance: textfield;
111
- }
112
- </style>