x-next 0.0.0-alpha.74 → 0.0.0-alpha.76
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/dist/_utils/config.d.ts +5 -0
- package/dist/_utils/date.d.ts +40 -0
- package/dist/_utils/pad.d.ts +2 -0
- package/dist/components/_components/render-function/index.d.ts +14 -0
- package/dist/components/button/Button.d.ts +2 -2
- package/dist/components/button/index.d.ts +4 -4
- package/dist/components/drawer/index.d.ts +8 -8
- package/dist/components/drawer/src/Drawer.vue.d.ts +4 -4
- package/dist/components/dropdown/DropdownButton.vue.d.ts +4 -4
- package/dist/components/dropdown/index.d.ts +8 -8
- package/dist/components/form-select/Select.d.ts +5 -5
- package/dist/components/form-select/SelectDropdown.vue.d.ts +11 -11
- package/dist/components/form-textarea/Textarea.vue.d.ts +390 -0
- package/dist/components/form-textarea/index.d.ts +525 -0
- package/dist/components/form-textarea/utils.d.ts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/popconfirm/src/popup.vue.d.ts +4 -4
- package/dist/icons/_ui/alone-left.d.ts +50 -0
- package/dist/icons/_ui/alone-margin-left.d.ts +50 -0
- package/dist/icons/_ui/alone-margin-right.d.ts +50 -0
- package/dist/icons/_ui/alone-right.d.ts +50 -0
- package/dist/icons/_ui/calendar.d.ts +50 -0
- package/dist/icons/_ui/time.d.ts +50 -0
- package/dist/index.es.js +5362 -5002
- package/dist/index.umd.js +3 -2
- package/dist/style.css +1 -1
- package/dist/types.d.ts +1 -0
- package/package.json +4 -3
- package/volar.d.ts +3 -0
- /package/dist/_container/{resize-observer-2.d.ts → resize-observer-v2.d.ts} +0 -0
@@ -0,0 +1,390 @@
|
|
1
|
+
import { CSSProperties, PropType } from 'vue';
|
2
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
3
|
+
/**
|
4
|
+
* @zh 绑定值
|
5
|
+
* @en Value
|
6
|
+
* @vModel
|
7
|
+
*/
|
8
|
+
modelValue: StringConstructor;
|
9
|
+
/**
|
10
|
+
* @zh 默认值(非受控状态)
|
11
|
+
* @en Default value (uncontrolled state)
|
12
|
+
*/
|
13
|
+
defaultValue: {
|
14
|
+
type: StringConstructor;
|
15
|
+
default: string;
|
16
|
+
};
|
17
|
+
/**
|
18
|
+
* @zh 提示文字
|
19
|
+
* @en Placeholder
|
20
|
+
*/
|
21
|
+
placeholder: StringConstructor;
|
22
|
+
/**
|
23
|
+
* @zh 是否禁用
|
24
|
+
* @en Whether to disable
|
25
|
+
*/
|
26
|
+
disabled: {
|
27
|
+
type: BooleanConstructor;
|
28
|
+
default: boolean;
|
29
|
+
};
|
30
|
+
/**
|
31
|
+
* @zh 是否为错误状态
|
32
|
+
* @en Whether it is an error state
|
33
|
+
*/
|
34
|
+
error: {
|
35
|
+
type: BooleanConstructor;
|
36
|
+
default: boolean;
|
37
|
+
};
|
38
|
+
/**
|
39
|
+
* @zh 输入值的最大长度,errorOnly 属性在 2.12.0 版本添加
|
40
|
+
* @en Maximum length of input value, the errorOnly attribute was added in version 2.12.0
|
41
|
+
*/
|
42
|
+
maxLength: {
|
43
|
+
type: PropType<number | {
|
44
|
+
length: number;
|
45
|
+
errorOnly?: boolean;
|
46
|
+
}>;
|
47
|
+
default: number;
|
48
|
+
};
|
49
|
+
/**
|
50
|
+
* @zh 是否显示字数统计
|
51
|
+
* @en Whether to display word count
|
52
|
+
*/
|
53
|
+
showWordLimit: {
|
54
|
+
type: BooleanConstructor;
|
55
|
+
default: boolean;
|
56
|
+
};
|
57
|
+
/**
|
58
|
+
* @zh 是否允许清空文本域
|
59
|
+
* @en Whether to allow clearing the text
|
60
|
+
*/
|
61
|
+
allowClear: {
|
62
|
+
type: BooleanConstructor;
|
63
|
+
default: boolean;
|
64
|
+
};
|
65
|
+
/**
|
66
|
+
* @zh 是否让文本框自适应内容高度
|
67
|
+
* @en Whether to make the textarea adapt to the height of the content
|
68
|
+
*/
|
69
|
+
autoSize: {
|
70
|
+
type: PropType<boolean | {
|
71
|
+
minRows?: number;
|
72
|
+
maxRows?: number;
|
73
|
+
}>;
|
74
|
+
default: boolean;
|
75
|
+
};
|
76
|
+
/**
|
77
|
+
* @zh 字符长度的计算方法
|
78
|
+
* @en Calculation method of word length
|
79
|
+
*/
|
80
|
+
wordLength: {
|
81
|
+
type: PropType<(value: string) => number>;
|
82
|
+
};
|
83
|
+
/**
|
84
|
+
* @zh 字符截取方法,同 wordLength 一起使用
|
85
|
+
* @en Character interception method, used together with wordLength
|
86
|
+
* @version 2.12.0
|
87
|
+
*/
|
88
|
+
wordSlice: {
|
89
|
+
type: PropType<(value: string, maxLength: number) => string>;
|
90
|
+
};
|
91
|
+
/**
|
92
|
+
* @zh 透传给 textarea 的属性
|
93
|
+
* @en Attributes passed to textarea
|
94
|
+
*/
|
95
|
+
textareaAttrs: {
|
96
|
+
type: PropType<Record<string, any>>;
|
97
|
+
};
|
98
|
+
}>, {
|
99
|
+
className: {
|
100
|
+
block: string;
|
101
|
+
element: (className: string) => string;
|
102
|
+
modifier: (className: string) => string;
|
103
|
+
is: (className: string) => string;
|
104
|
+
};
|
105
|
+
wrapperCls: import('vue').ComputedRef<(string | {
|
106
|
+
[x: string]: boolean;
|
107
|
+
})[]>;
|
108
|
+
textareaRef: import('vue').Ref<HTMLInputElement | undefined, HTMLInputElement | undefined>;
|
109
|
+
textareaStyle: import('vue').Ref<CSSProperties | undefined, CSSProperties | undefined>;
|
110
|
+
mirrorRef: import('vue').Ref<HTMLInputElement | undefined, HTMLInputElement | undefined>;
|
111
|
+
mirrorStyle: import('vue').Ref<CSSProperties | undefined, CSSProperties | undefined>;
|
112
|
+
computedValue: import('vue').ComputedRef<string>;
|
113
|
+
showClearBtn: import('vue').ComputedRef<string | false>;
|
114
|
+
valueLength: import('vue').ComputedRef<number>;
|
115
|
+
computedMaxLength: import('vue').ComputedRef<number>;
|
116
|
+
mergedDisabled: import('vue').ComputedRef<boolean>;
|
117
|
+
mergeTextareaAttrs: import('vue').ComputedRef<{
|
118
|
+
[x: string]: any;
|
119
|
+
}>;
|
120
|
+
getWrapperAttrs: (attr: Record<string, any>) => Omit<{
|
121
|
+
[x: string]: unknown;
|
122
|
+
}, string>;
|
123
|
+
getTextareaAttrs: (attr: Record<string, any>) => Pick<{
|
124
|
+
[x: string]: unknown;
|
125
|
+
}, string>;
|
126
|
+
handleInput: (e: Event) => void;
|
127
|
+
handleFocus: (ev: FocusEvent) => void;
|
128
|
+
handleBlur: (ev: FocusEvent) => void;
|
129
|
+
handleComposition: (e: CompositionEvent) => void;
|
130
|
+
handleClear: (ev: MouseEvent) => void;
|
131
|
+
handleResize: () => void;
|
132
|
+
handleMousedown: (e: MouseEvent) => void;
|
133
|
+
}, {}, {}, {
|
134
|
+
/**
|
135
|
+
* @zh 使输入框获取焦点
|
136
|
+
* @en Make the input box focus
|
137
|
+
* @public
|
138
|
+
* @version 2.24.0
|
139
|
+
*/
|
140
|
+
focus(): void;
|
141
|
+
/**
|
142
|
+
* @zh 使输入框失去焦点
|
143
|
+
* @en Make the input box lose focus
|
144
|
+
* @public
|
145
|
+
* @version 2.24.0
|
146
|
+
*/
|
147
|
+
blur(): void;
|
148
|
+
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
149
|
+
'update:modelValue': (value: string) => true;
|
150
|
+
/**
|
151
|
+
* @zh 用户输入时触发
|
152
|
+
* @en Emitted when the user enters
|
153
|
+
* @param {string} value
|
154
|
+
* @param {Event} ev
|
155
|
+
*/
|
156
|
+
input: (value: string, ev: Event) => true;
|
157
|
+
/**
|
158
|
+
* @zh 仅在文本框失焦时触发
|
159
|
+
* @en Only emitted when the textarea is out of focus
|
160
|
+
* @param {string} value
|
161
|
+
* @param {Event} ev
|
162
|
+
*/
|
163
|
+
change: (value: string, ev: Event) => true;
|
164
|
+
/**
|
165
|
+
* @zh 点击清除按钮时触发
|
166
|
+
* @en Emitted when the clear button is clicked
|
167
|
+
* @param {MouseEvent} ev
|
168
|
+
*/
|
169
|
+
clear: (ev: MouseEvent) => true;
|
170
|
+
/**
|
171
|
+
* @zh 文本框获取焦点时触发
|
172
|
+
* @en Emitted when the textarea gets focus
|
173
|
+
* @param {FocusEvent} ev
|
174
|
+
*/
|
175
|
+
focus: (ev: FocusEvent) => true;
|
176
|
+
/**
|
177
|
+
* @zh 文本框失去焦点时触发
|
178
|
+
* @en Emitted when the textarea loses focus
|
179
|
+
* @param {FocusEvent} ev
|
180
|
+
*/
|
181
|
+
blur: (ev: FocusEvent) => true;
|
182
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
183
|
+
/**
|
184
|
+
* @zh 绑定值
|
185
|
+
* @en Value
|
186
|
+
* @vModel
|
187
|
+
*/
|
188
|
+
modelValue: StringConstructor;
|
189
|
+
/**
|
190
|
+
* @zh 默认值(非受控状态)
|
191
|
+
* @en Default value (uncontrolled state)
|
192
|
+
*/
|
193
|
+
defaultValue: {
|
194
|
+
type: StringConstructor;
|
195
|
+
default: string;
|
196
|
+
};
|
197
|
+
/**
|
198
|
+
* @zh 提示文字
|
199
|
+
* @en Placeholder
|
200
|
+
*/
|
201
|
+
placeholder: StringConstructor;
|
202
|
+
/**
|
203
|
+
* @zh 是否禁用
|
204
|
+
* @en Whether to disable
|
205
|
+
*/
|
206
|
+
disabled: {
|
207
|
+
type: BooleanConstructor;
|
208
|
+
default: boolean;
|
209
|
+
};
|
210
|
+
/**
|
211
|
+
* @zh 是否为错误状态
|
212
|
+
* @en Whether it is an error state
|
213
|
+
*/
|
214
|
+
error: {
|
215
|
+
type: BooleanConstructor;
|
216
|
+
default: boolean;
|
217
|
+
};
|
218
|
+
/**
|
219
|
+
* @zh 输入值的最大长度,errorOnly 属性在 2.12.0 版本添加
|
220
|
+
* @en Maximum length of input value, the errorOnly attribute was added in version 2.12.0
|
221
|
+
*/
|
222
|
+
maxLength: {
|
223
|
+
type: PropType<number | {
|
224
|
+
length: number;
|
225
|
+
errorOnly?: boolean;
|
226
|
+
}>;
|
227
|
+
default: number;
|
228
|
+
};
|
229
|
+
/**
|
230
|
+
* @zh 是否显示字数统计
|
231
|
+
* @en Whether to display word count
|
232
|
+
*/
|
233
|
+
showWordLimit: {
|
234
|
+
type: BooleanConstructor;
|
235
|
+
default: boolean;
|
236
|
+
};
|
237
|
+
/**
|
238
|
+
* @zh 是否允许清空文本域
|
239
|
+
* @en Whether to allow clearing the text
|
240
|
+
*/
|
241
|
+
allowClear: {
|
242
|
+
type: BooleanConstructor;
|
243
|
+
default: boolean;
|
244
|
+
};
|
245
|
+
/**
|
246
|
+
* @zh 是否让文本框自适应内容高度
|
247
|
+
* @en Whether to make the textarea adapt to the height of the content
|
248
|
+
*/
|
249
|
+
autoSize: {
|
250
|
+
type: PropType<boolean | {
|
251
|
+
minRows?: number;
|
252
|
+
maxRows?: number;
|
253
|
+
}>;
|
254
|
+
default: boolean;
|
255
|
+
};
|
256
|
+
/**
|
257
|
+
* @zh 字符长度的计算方法
|
258
|
+
* @en Calculation method of word length
|
259
|
+
*/
|
260
|
+
wordLength: {
|
261
|
+
type: PropType<(value: string) => number>;
|
262
|
+
};
|
263
|
+
/**
|
264
|
+
* @zh 字符截取方法,同 wordLength 一起使用
|
265
|
+
* @en Character interception method, used together with wordLength
|
266
|
+
* @version 2.12.0
|
267
|
+
*/
|
268
|
+
wordSlice: {
|
269
|
+
type: PropType<(value: string, maxLength: number) => string>;
|
270
|
+
};
|
271
|
+
/**
|
272
|
+
* @zh 透传给 textarea 的属性
|
273
|
+
* @en Attributes passed to textarea
|
274
|
+
*/
|
275
|
+
textareaAttrs: {
|
276
|
+
type: PropType<Record<string, any>>;
|
277
|
+
};
|
278
|
+
}>> & Readonly<{
|
279
|
+
onFocus?: ((ev: FocusEvent) => any) | undefined;
|
280
|
+
onInput?: ((value: string, ev: Event) => any) | undefined;
|
281
|
+
onClear?: ((ev: MouseEvent) => any) | undefined;
|
282
|
+
onBlur?: ((ev: FocusEvent) => any) | undefined;
|
283
|
+
onChange?: ((value: string, ev: Event) => any) | undefined;
|
284
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
285
|
+
}>, {
|
286
|
+
error: boolean;
|
287
|
+
disabled: boolean;
|
288
|
+
defaultValue: string;
|
289
|
+
maxLength: number | {
|
290
|
+
length: number;
|
291
|
+
errorOnly?: boolean;
|
292
|
+
};
|
293
|
+
allowClear: boolean;
|
294
|
+
showWordLimit: boolean;
|
295
|
+
autoSize: boolean | {
|
296
|
+
minRows?: number;
|
297
|
+
maxRows?: number;
|
298
|
+
};
|
299
|
+
}, {}, {
|
300
|
+
ResizeObserver: import('vue').DefineComponent<{}, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
301
|
+
[key: string]: any;
|
302
|
+
}>[] | undefined, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "resize"[], "resize", import('vue').PublicProps, Readonly<{}> & Readonly<{
|
303
|
+
onResize?: ((...args: any[]) => any) | undefined;
|
304
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
305
|
+
IconHover: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
306
|
+
prefix: {
|
307
|
+
type: StringConstructor;
|
308
|
+
};
|
309
|
+
size: {
|
310
|
+
type: PropType<"mini" | "small" | "medium" | "large" | "huge">;
|
311
|
+
default: string;
|
312
|
+
};
|
313
|
+
disabled: {
|
314
|
+
type: BooleanConstructor;
|
315
|
+
default: boolean;
|
316
|
+
};
|
317
|
+
}>, {
|
318
|
+
className: {
|
319
|
+
block: string;
|
320
|
+
element: (className: string) => string;
|
321
|
+
modifier: (className: string) => string;
|
322
|
+
is: (className: string) => string;
|
323
|
+
};
|
324
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
325
|
+
prefix: {
|
326
|
+
type: StringConstructor;
|
327
|
+
};
|
328
|
+
size: {
|
329
|
+
type: PropType<"mini" | "small" | "medium" | "large" | "huge">;
|
330
|
+
default: string;
|
331
|
+
};
|
332
|
+
disabled: {
|
333
|
+
type: BooleanConstructor;
|
334
|
+
default: boolean;
|
335
|
+
};
|
336
|
+
}>> & Readonly<{}>, {
|
337
|
+
size: "mini" | "small" | "medium" | "large" | "huge";
|
338
|
+
disabled: boolean;
|
339
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
340
|
+
IconClose: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
341
|
+
size: {
|
342
|
+
type: (StringConstructor | NumberConstructor)[];
|
343
|
+
default: undefined;
|
344
|
+
};
|
345
|
+
rotate: {
|
346
|
+
type: NumberConstructor;
|
347
|
+
default: undefined;
|
348
|
+
};
|
349
|
+
spin: {
|
350
|
+
type: BooleanConstructor;
|
351
|
+
default: boolean;
|
352
|
+
};
|
353
|
+
color: {
|
354
|
+
type: StringConstructor;
|
355
|
+
default: undefined;
|
356
|
+
};
|
357
|
+
fillColor: {
|
358
|
+
type: ArrayConstructor;
|
359
|
+
default: undefined;
|
360
|
+
};
|
361
|
+
}>, () => VNode, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
362
|
+
size: {
|
363
|
+
type: (StringConstructor | NumberConstructor)[];
|
364
|
+
default: undefined;
|
365
|
+
};
|
366
|
+
rotate: {
|
367
|
+
type: NumberConstructor;
|
368
|
+
default: undefined;
|
369
|
+
};
|
370
|
+
spin: {
|
371
|
+
type: BooleanConstructor;
|
372
|
+
default: boolean;
|
373
|
+
};
|
374
|
+
color: {
|
375
|
+
type: StringConstructor;
|
376
|
+
default: undefined;
|
377
|
+
};
|
378
|
+
fillColor: {
|
379
|
+
type: ArrayConstructor;
|
380
|
+
default: undefined;
|
381
|
+
};
|
382
|
+
}>> & Readonly<{}>, {
|
383
|
+
size: string | number;
|
384
|
+
rotate: number;
|
385
|
+
spin: boolean;
|
386
|
+
color: string;
|
387
|
+
fillColor: unknown[];
|
388
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
389
|
+
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
390
|
+
export default _default;
|