x-next 0.0.0-alpha.51 → 0.0.0-alpha.53
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 +28 -21
- package/dist/_hooks/_types.d.ts +6 -0
- package/dist/_hooks/use-cursor.d.ts +2 -0
- package/dist/_hooks/use-form-item.d.ts +16 -0
- package/dist/_hooks/use-trigger.d.ts +13 -0
- package/dist/_utils/get-value-by-path.d.ts +5 -0
- package/dist/_utils/keycode.d.ts +36 -0
- package/dist/_utils/pick.d.ts +1 -0
- package/dist/_utils/responsive-observe.d.ts +24 -0
- package/dist/_utils/vue-eco.d.ts +4 -0
- package/dist/components/button/Button.d.ts +11 -5
- package/dist/components/button/ButtonGroup.vue.d.ts +90 -0
- package/dist/components/button/context.d.ts +11 -0
- package/dist/components/button/index.d.ts +143 -29
- package/dist/components/button/props.d.ts +10 -6
- package/dist/components/dialog/Dialog.d.ts +3 -3
- package/dist/components/dialog/index.d.ts +11 -11
- package/dist/components/drawer/index.d.ts +225 -133
- package/dist/components/drawer/src/Drawer.vue.d.ts +111 -65
- package/dist/components/dropdown/Dropdown.vue.d.ts +1143 -0
- package/dist/components/dropdown/DropdownButton.vue.d.ts +1612 -0
- package/dist/components/dropdown/DropdownGroup.vue.d.ts +21 -0
- package/dist/components/dropdown/DropdownOption.vue.d.ts +63 -0
- package/dist/components/dropdown/DropdownSubmenu.vue.d.ts +1234 -0
- package/dist/components/dropdown/context.d.ts +6 -0
- package/dist/components/dropdown/dropdown-panel.vue.d.ts +432 -0
- package/dist/components/dropdown/index.d.ts +7614 -0
- package/dist/components/dropdown/interface.d.ts +33 -0
- package/dist/components/dropdown/utils.d.ts +5 -0
- package/dist/components/empty/Empty.d.ts +44 -0
- package/dist/components/empty/index.d.ts +43 -0
- package/dist/components/form/Form.vue.d.ts +313 -0
- package/dist/components/form/FormItem.vue.d.ts +2218 -0
- package/dist/components/form/context.d.ts +49 -0
- package/dist/components/form/form-item-label.vue.d.ts +1435 -0
- package/dist/components/form/form-item-message.vue.d.ts +24 -0
- package/dist/components/form/index.d.ts +4189 -0
- package/dist/components/form/interface.d.ts +185 -0
- package/dist/components/form/utils.d.ts +9 -0
- package/dist/components/form/validateMessages.d.ts +46 -0
- package/dist/components/grid/Col.vue.d.ts +188 -0
- package/dist/components/grid/Grid.vue.d.ts +108 -0
- package/dist/components/grid/GridItem.vue.d.ts +78 -0
- package/dist/components/grid/Row.vue.d.ts +102 -0
- package/dist/components/grid/context.d.ts +19 -0
- package/dist/components/grid/hook/use-responsive-state.d.ts +3 -0
- package/dist/components/grid/hook/use-responsive-value.d.ts +24 -0
- package/dist/components/grid/index.d.ts +562 -0
- package/dist/components/grid/interface.d.ts +80 -0
- package/dist/components/grid/utils/index.d.ts +11 -0
- package/dist/components/image/Image.vue.d.ts +2179 -0
- package/dist/components/image/ImagePreview.vue.d.ts +1879 -0
- package/dist/components/image/ImagePreviewAction.d.ts +15 -15
- package/dist/components/image/ImagePreviewGroup.vue.d.ts +1975 -0
- package/dist/components/image/index.d.ts +14126 -0
- package/dist/components/image/interface.d.ts +8 -0
- package/dist/components/image/preview-toolbar.vue.d.ts +16 -22
- package/dist/components/index.d.ts +6 -1
- package/dist/components/input/Input.d.ts +233 -161
- package/dist/components/input/InputGroup.vue.d.ts +9 -0
- package/dist/components/input/InputPassword.vue.d.ts +337 -0
- package/dist/components/input/InputSearch.d.ts +123 -0
- package/dist/components/input/index.d.ts +927 -270
- package/dist/components/message/Message.d.ts +1 -1
- package/dist/components/message/MessageVue.vue.d.ts +1 -1
- package/dist/components/message/index.d.ts +5 -5
- package/dist/components/message-box/index.d.ts +2 -2
- package/dist/components/notification/index.d.ts +2 -2
- package/dist/components/popconfirm/index.d.ts +8 -8
- package/dist/components/popconfirm/src/Popconfirm.d.ts +2 -2
- package/dist/components/popconfirm/src/popup.vue.d.ts +18 -9
- package/dist/components/popup/Popup.d.ts +3 -3
- package/dist/components/popup/index.d.ts +11 -11
- package/dist/components/{scrollbar/src → scrollbar-v2}/Scrollbar.vue.d.ts +96 -28
- package/dist/components/{scrollbar → scrollbar-v2}/index.d.ts +94 -57
- package/dist/components/{scrollbar/src/types.d.ts → scrollbar-v2/interface.d.ts} +0 -2
- package/dist/components/scrollbar-v2/thumb.vue.d.ts +62 -0
- package/dist/components/space/index.d.ts +2 -2
- package/dist/components/tabs/index.d.ts +3 -3
- package/dist/components/tabs/tabs-nav.d.ts +1 -1
- package/dist/components/tabs/tabs-tab.vue.d.ts +1 -1
- package/dist/components/tag/index.d.ts +2 -2
- package/dist/components/timeline/index.d.ts +2 -2
- package/dist/components/timeline-item/index.d.ts +2 -2
- package/dist/components/tooltip/Tooltip.vue.d.ts +7 -7
- package/dist/components/tooltip/index.d.ts +17 -17
- package/dist/components/trend-chart/index.d.ts +2 -2
- package/dist/components/trigger/index.d.ts +6 -6
- package/dist/components/trigger/src/trigger.d.ts +2 -2
- package/dist/components/trigger-v2/index.d.ts +6 -6
- package/dist/components/trigger-v2/trigger.d.ts +2 -2
- package/dist/icons/_self/empty-better.d.ts +50 -0
- package/dist/icons/_self/empty.d.ts +50 -0
- package/dist/icons/_self/eye-invisible.d.ts +50 -0
- package/dist/icons/_self/eye.d.ts +50 -0
- package/dist/icons/_self/more-dot.d.ts +50 -0
- package/dist/icons/_self/question-message.d.ts +50 -0
- package/dist/icons/_self/search.d.ts +50 -0
- package/dist/index.es.js +7166 -3475
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +38 -21
- package/package.json +5 -3
- package/volar.d.ts +38 -21
- package/dist/components/form/constants.d.ts +0 -4
- package/dist/components/form/form-item.d.ts +0 -31
- package/dist/components/form/form.d.ts +0 -39
- package/dist/components/form/hooks.d.ts +0 -4
- package/dist/components/form/types.d.ts +0 -31
- package/dist/components/input/props.d.ts +0 -95
- package/dist/components/input/utils.d.ts +0 -6
- package/dist/components/scrollbar/src/constant.d.ts +0 -1
- package/dist/components/scrollbar/src/scrollbar.d.ts +0 -24
- package/dist/components/scrollbar/src/thumb.d.ts +0 -20
- package/dist/components/scrollbar/src/thumb.vue.d.ts +0 -47
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Slot } from 'vue';
|
2
|
+
import { RenderFunc } from '../../_container/render-function.ts';
|
2
3
|
export interface ImageProps {
|
3
4
|
src?: string;
|
4
5
|
width?: string | number;
|
@@ -43,3 +44,10 @@ export interface ImagePreviewGroupProps extends Omit<ImagePreviewProps, 'src' |
|
|
43
44
|
onChange?: (index: number, preIndex: number) => void;
|
44
45
|
onPreviewVisibleChange?: (visible: boolean) => void;
|
45
46
|
}
|
47
|
+
export interface ActionType {
|
48
|
+
key: string;
|
49
|
+
name: string;
|
50
|
+
content: RenderFunc;
|
51
|
+
onClick: () => void;
|
52
|
+
disabled?: boolean;
|
53
|
+
}
|
@@ -1,12 +1,6 @@
|
|
1
1
|
import { PropType } from 'vue';
|
2
2
|
import { RenderFunc } from '../../_container/render-function';
|
3
|
-
|
4
|
-
key: string;
|
5
|
-
name: string;
|
6
|
-
content: RenderFunc;
|
7
|
-
onClick: () => void;
|
8
|
-
disabled?: boolean;
|
9
|
-
}
|
3
|
+
import { ActionType } from './interface.ts';
|
10
4
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
11
5
|
actions: {
|
12
6
|
type: PropType<ActionType[]>;
|
@@ -125,7 +119,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
125
119
|
popupVisibleChange: (visible: boolean) => true;
|
126
120
|
}, import('vue').PublicProps, {
|
127
121
|
mini: boolean;
|
128
|
-
position: "br" | "rt" | "tr" | "
|
122
|
+
position: "br" | "rt" | "tr" | "top" | "tl" | "bottom" | "bl" | "left" | "lt" | "lb" | "right" | "rb";
|
129
123
|
popupVisible: boolean;
|
130
124
|
defaultPopupVisible: boolean;
|
131
125
|
}, true, {}, {}, {
|
@@ -288,11 +282,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
288
282
|
}, import('vue').PublicProps, {
|
289
283
|
disabled: boolean;
|
290
284
|
animationName: string;
|
291
|
-
position: "br" | "rt" | "tr" | "
|
285
|
+
position: "br" | "rt" | "tr" | "top" | "tl" | "bottom" | "bl" | "left" | "lt" | "lb" | "right" | "rb";
|
292
286
|
autoFitPosition: boolean;
|
293
287
|
popupVisible: boolean;
|
294
288
|
defaultPopupVisible: boolean;
|
295
|
-
trigger: "click" | "
|
289
|
+
trigger: "click" | "hover" | "focus" | "contextMenu" | ("click" | "hover" | "focus" | "contextMenu")[];
|
296
290
|
popupOffset: number;
|
297
291
|
showArrow: boolean;
|
298
292
|
alignPoint: boolean;
|
@@ -473,11 +467,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
473
467
|
}>, () => any, {}, {}, {}, {
|
474
468
|
disabled: boolean;
|
475
469
|
animationName: string;
|
476
|
-
position: "br" | "rt" | "tr" | "
|
470
|
+
position: "br" | "rt" | "tr" | "top" | "tl" | "bottom" | "bl" | "left" | "lt" | "lb" | "right" | "rb";
|
477
471
|
autoFitPosition: boolean;
|
478
472
|
popupVisible: boolean;
|
479
473
|
defaultPopupVisible: boolean;
|
480
|
-
trigger: "click" | "
|
474
|
+
trigger: "click" | "hover" | "focus" | "contextMenu" | ("click" | "hover" | "focus" | "contextMenu")[];
|
481
475
|
popupOffset: number;
|
482
476
|
showArrow: boolean;
|
483
477
|
alignPoint: boolean;
|
@@ -661,11 +655,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
661
655
|
}, string, {
|
662
656
|
disabled: boolean;
|
663
657
|
animationName: string;
|
664
|
-
position: "br" | "rt" | "tr" | "
|
658
|
+
position: "br" | "rt" | "tr" | "top" | "tl" | "bottom" | "bl" | "left" | "lt" | "lb" | "right" | "rb";
|
665
659
|
autoFitPosition: boolean;
|
666
660
|
popupVisible: boolean;
|
667
661
|
defaultPopupVisible: boolean;
|
668
|
-
trigger: "click" | "
|
662
|
+
trigger: "click" | "hover" | "focus" | "contextMenu" | ("click" | "hover" | "focus" | "contextMenu")[];
|
669
663
|
popupOffset: number;
|
670
664
|
showArrow: boolean;
|
671
665
|
alignPoint: boolean;
|
@@ -751,7 +745,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
751
745
|
handlePopupVisibleChange: (visible: boolean) => void;
|
752
746
|
}, {}, {}, {}, {
|
753
747
|
mini: boolean;
|
754
|
-
position: "br" | "rt" | "tr" | "
|
748
|
+
position: "br" | "rt" | "tr" | "top" | "tl" | "bottom" | "bl" | "left" | "lt" | "lb" | "right" | "rb";
|
755
749
|
popupVisible: boolean;
|
756
750
|
defaultPopupVisible: boolean;
|
757
751
|
}>;
|
@@ -815,7 +809,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
815
809
|
popupVisibleChange: (visible: boolean) => true;
|
816
810
|
}, string, {
|
817
811
|
mini: boolean;
|
818
|
-
position: "br" | "rt" | "tr" | "
|
812
|
+
position: "br" | "rt" | "tr" | "top" | "tl" | "bottom" | "bl" | "left" | "lt" | "lb" | "right" | "rb";
|
819
813
|
popupVisible: boolean;
|
820
814
|
defaultPopupVisible: boolean;
|
821
815
|
}, {}, string, {}, {
|
@@ -978,11 +972,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
978
972
|
}, import('vue').PublicProps, {
|
979
973
|
disabled: boolean;
|
980
974
|
animationName: string;
|
981
|
-
position: "br" | "rt" | "tr" | "
|
975
|
+
position: "br" | "rt" | "tr" | "top" | "tl" | "bottom" | "bl" | "left" | "lt" | "lb" | "right" | "rb";
|
982
976
|
autoFitPosition: boolean;
|
983
977
|
popupVisible: boolean;
|
984
978
|
defaultPopupVisible: boolean;
|
985
|
-
trigger: "click" | "
|
979
|
+
trigger: "click" | "hover" | "focus" | "contextMenu" | ("click" | "hover" | "focus" | "contextMenu")[];
|
986
980
|
popupOffset: number;
|
987
981
|
showArrow: boolean;
|
988
982
|
alignPoint: boolean;
|
@@ -1163,11 +1157,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
1163
1157
|
}>, () => any, {}, {}, {}, {
|
1164
1158
|
disabled: boolean;
|
1165
1159
|
animationName: string;
|
1166
|
-
position: "br" | "rt" | "tr" | "
|
1160
|
+
position: "br" | "rt" | "tr" | "top" | "tl" | "bottom" | "bl" | "left" | "lt" | "lb" | "right" | "rb";
|
1167
1161
|
autoFitPosition: boolean;
|
1168
1162
|
popupVisible: boolean;
|
1169
1163
|
defaultPopupVisible: boolean;
|
1170
|
-
trigger: "click" | "
|
1164
|
+
trigger: "click" | "hover" | "focus" | "contextMenu" | ("click" | "hover" | "focus" | "contextMenu")[];
|
1171
1165
|
popupOffset: number;
|
1172
1166
|
showArrow: boolean;
|
1173
1167
|
alignPoint: boolean;
|
@@ -1351,11 +1345,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
1351
1345
|
}, string, {
|
1352
1346
|
disabled: boolean;
|
1353
1347
|
animationName: string;
|
1354
|
-
position: "br" | "rt" | "tr" | "
|
1348
|
+
position: "br" | "rt" | "tr" | "top" | "tl" | "bottom" | "bl" | "left" | "lt" | "lb" | "right" | "rb";
|
1355
1349
|
autoFitPosition: boolean;
|
1356
1350
|
popupVisible: boolean;
|
1357
1351
|
defaultPopupVisible: boolean;
|
1358
|
-
trigger: "click" | "
|
1352
|
+
trigger: "click" | "hover" | "focus" | "contextMenu" | ("click" | "hover" | "focus" | "contextMenu")[];
|
1359
1353
|
popupOffset: number;
|
1360
1354
|
showArrow: boolean;
|
1361
1355
|
alignPoint: boolean;
|
@@ -1,13 +1,18 @@
|
|
1
1
|
export * from './button';
|
2
2
|
export * from './dialog';
|
3
3
|
export * from './drawer';
|
4
|
+
export * from './dropdown';
|
5
|
+
export * from './empty';
|
6
|
+
export * from './form';
|
7
|
+
export * from './grid';
|
4
8
|
export * from './image';
|
9
|
+
export * from './input';
|
5
10
|
export * from './message';
|
6
11
|
export * from './message-box';
|
7
12
|
export * from './notification';
|
8
13
|
export * from './popconfirm';
|
9
14
|
export * from './popup';
|
10
|
-
export * from './scrollbar';
|
15
|
+
export * from './scrollbar-v2';
|
11
16
|
export * from './space';
|
12
17
|
export * from './tabs';
|
13
18
|
export * from './tag';
|
@@ -1,220 +1,292 @@
|
|
1
|
+
import { PropType } from 'vue';
|
2
|
+
import { Size } from '../../_utils/constant';
|
1
3
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
/**
|
5
|
+
* @zh 绑定值
|
6
|
+
* @en Value
|
7
|
+
*/
|
8
|
+
modelValue: StringConstructor;
|
9
|
+
/**
|
10
|
+
* @zh 默认值(非受控状态)
|
11
|
+
* @en Default value (uncontrolled state)
|
12
|
+
*/
|
13
|
+
defaultValue: {
|
7
14
|
type: StringConstructor;
|
8
15
|
default: string;
|
9
16
|
};
|
10
|
-
|
11
|
-
|
12
|
-
|
17
|
+
/**
|
18
|
+
* @zh 输入框大小
|
19
|
+
* @en Input size
|
20
|
+
* @values 'mini','small','medium','large'
|
21
|
+
* @defaultValue 'medium'
|
22
|
+
*/
|
23
|
+
size: {
|
24
|
+
type: PropType<Size>;
|
13
25
|
};
|
14
|
-
|
26
|
+
/**
|
27
|
+
* @zh 是否允许清空输入框
|
28
|
+
* @en Whether to allow the input to be cleared
|
29
|
+
*/
|
30
|
+
allowClear: {
|
15
31
|
type: BooleanConstructor;
|
16
32
|
default: boolean;
|
17
33
|
};
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
modelValue: {
|
23
|
-
type: (NumberConstructor | StringConstructor)[];
|
24
|
-
default: undefined;
|
25
|
-
};
|
26
|
-
type: {
|
27
|
-
type: import('vue').PropType<"text" | "textarea">;
|
28
|
-
default: string;
|
29
|
-
};
|
30
|
-
placeholder: {
|
31
|
-
type: StringConstructor;
|
32
|
-
default: string;
|
33
|
-
};
|
34
|
+
/**
|
35
|
+
* @zh 是否禁用
|
36
|
+
* @en Whether to disable
|
37
|
+
*/
|
34
38
|
disabled: {
|
35
39
|
type: BooleanConstructor;
|
36
40
|
default: boolean;
|
37
41
|
};
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
42
|
+
/**
|
43
|
+
* @zh 是否为只读状态
|
44
|
+
* @en Whether it is read-only
|
45
|
+
*/
|
46
|
+
readonly: {
|
43
47
|
type: BooleanConstructor;
|
44
48
|
default: boolean;
|
45
49
|
};
|
46
|
-
|
50
|
+
/**
|
51
|
+
* @zh 是否为错误状态
|
52
|
+
* @en Whether it is an error state
|
53
|
+
*/
|
54
|
+
error: {
|
47
55
|
type: BooleanConstructor;
|
48
56
|
default: boolean;
|
49
57
|
};
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
58
|
+
/**
|
59
|
+
* @zh 提示文字
|
60
|
+
* @en Prompt text
|
61
|
+
*/
|
62
|
+
placeholder: StringConstructor;
|
63
|
+
/**
|
64
|
+
* @zh 输入值的最大长度,errorOnly 属性在 2.12.0 版本添加
|
65
|
+
* @en Enter the maximum length of the value, the errorOnly attribute was added in version 2.12.0
|
66
|
+
*/
|
67
|
+
maxLength: {
|
68
|
+
type: PropType<number | {
|
69
|
+
length: number;
|
70
|
+
errorOnly?: boolean;
|
62
71
|
}>;
|
63
|
-
default:
|
64
|
-
};
|
65
|
-
formatter: {
|
66
|
-
type: FunctionConstructor;
|
67
|
-
default: undefined;
|
68
|
-
};
|
69
|
-
validateEvent: {
|
70
|
-
type: BooleanConstructor;
|
71
|
-
default: boolean;
|
72
|
-
};
|
73
|
-
clearable: {
|
74
|
-
type: BooleanConstructor;
|
75
|
-
default: boolean;
|
76
|
-
};
|
77
|
-
card: {
|
78
|
-
type: BooleanConstructor;
|
79
|
-
default: boolean;
|
80
|
-
};
|
81
|
-
maxlength: {
|
82
|
-
type: (NumberConstructor | StringConstructor)[];
|
83
|
-
default: undefined;
|
72
|
+
default: number;
|
84
73
|
};
|
74
|
+
/**
|
75
|
+
* @zh 是否显示字数统计
|
76
|
+
* @en Whether to display word count
|
77
|
+
*/
|
85
78
|
showWordLimit: {
|
86
79
|
type: BooleanConstructor;
|
87
80
|
default: boolean;
|
88
81
|
};
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
type: StringConstructor;
|
112
|
-
default: undefined;
|
113
|
-
};
|
114
|
-
modelValue: {
|
115
|
-
type: (NumberConstructor | StringConstructor)[];
|
116
|
-
default: undefined;
|
82
|
+
/**
|
83
|
+
* @zh 字符长度的计算方法
|
84
|
+
* @en Calculation method of word length
|
85
|
+
*/
|
86
|
+
wordLength: {
|
87
|
+
type: PropType<(value: string) => number>;
|
88
|
+
};
|
89
|
+
/**
|
90
|
+
* @zh 字符截取方法,同 wordLength 一起使用
|
91
|
+
* @en Character interception method, used together with wordLength
|
92
|
+
* @version 2.12.0
|
93
|
+
*/
|
94
|
+
wordSlice: {
|
95
|
+
type: PropType<(value: string, maxLength: number) => string>;
|
96
|
+
};
|
97
|
+
/**
|
98
|
+
* @zh 内部 input 元素的属性
|
99
|
+
* @en Attributes of inner input elements
|
100
|
+
* @version 2.27.0
|
101
|
+
*/
|
102
|
+
inputAttrs: {
|
103
|
+
type: ObjectConstructor;
|
117
104
|
};
|
118
105
|
type: {
|
119
|
-
type:
|
106
|
+
type: PropType<"text" | "password">;
|
120
107
|
default: string;
|
121
108
|
};
|
122
|
-
|
109
|
+
}>, {
|
110
|
+
inputRef: import('vue').Ref<HTMLInputElement | undefined, HTMLInputElement | undefined>;
|
111
|
+
render: () => any;
|
112
|
+
}, {}, {}, {
|
113
|
+
/**
|
114
|
+
* @zh 使输入框获取焦点
|
115
|
+
* @en Make the input box focus
|
116
|
+
* @public
|
117
|
+
*/
|
118
|
+
focus(): void;
|
119
|
+
/**
|
120
|
+
* @zh 使输入框失去焦点
|
121
|
+
* @en Make the input box lose focus
|
122
|
+
* @public
|
123
|
+
*/
|
124
|
+
blur(): void;
|
125
|
+
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
126
|
+
'update:modelValue': (value: string) => true;
|
127
|
+
/**
|
128
|
+
* @zh 用户输入时触发
|
129
|
+
* @en Triggered when the user enters
|
130
|
+
* @param {string} value
|
131
|
+
* @param {Event} ev
|
132
|
+
*/
|
133
|
+
input: (value: string, ev: Event) => true;
|
134
|
+
/**
|
135
|
+
* @zh 仅在输入框失焦或按下回车时触发
|
136
|
+
* @en Only triggered when the input box is out of focus or when you press Enter
|
137
|
+
* @param {string} value
|
138
|
+
* @param {Event} ev
|
139
|
+
*/
|
140
|
+
change: (value: string, ev: Event) => true;
|
141
|
+
/**
|
142
|
+
* @zh 用户按下回车时触发
|
143
|
+
* @en Triggered when the user presses enter
|
144
|
+
* @param {KeyboardEvent} ev
|
145
|
+
*/
|
146
|
+
pressEnter: (ev: KeyboardEvent) => true;
|
147
|
+
/**
|
148
|
+
* @zh 用户点击清除按钮时触发
|
149
|
+
* @en Triggered when the user clicks the clear button
|
150
|
+
* @param {MouseEvent} ev
|
151
|
+
*/
|
152
|
+
clear: (ev: MouseEvent) => true;
|
153
|
+
/**
|
154
|
+
* @zh 输入框获取焦点时触发
|
155
|
+
* @en Triggered when the input box gets focus
|
156
|
+
* @param {FocusEvent} ev
|
157
|
+
*/
|
158
|
+
focus: (ev: FocusEvent) => true;
|
159
|
+
/**
|
160
|
+
* @zh 输入框失去焦点时触发
|
161
|
+
* @en Triggered when the input box loses focus
|
162
|
+
* @param {FocusEvent} ev
|
163
|
+
*/
|
164
|
+
blur: (ev: FocusEvent) => true;
|
165
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
166
|
+
/**
|
167
|
+
* @zh 绑定值
|
168
|
+
* @en Value
|
169
|
+
*/
|
170
|
+
modelValue: StringConstructor;
|
171
|
+
/**
|
172
|
+
* @zh 默认值(非受控状态)
|
173
|
+
* @en Default value (uncontrolled state)
|
174
|
+
*/
|
175
|
+
defaultValue: {
|
123
176
|
type: StringConstructor;
|
124
177
|
default: string;
|
125
178
|
};
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
179
|
+
/**
|
180
|
+
* @zh 输入框大小
|
181
|
+
* @en Input size
|
182
|
+
* @values 'mini','small','medium','large'
|
183
|
+
* @defaultValue 'medium'
|
184
|
+
*/
|
130
185
|
size: {
|
131
|
-
type:
|
132
|
-
default: string;
|
186
|
+
type: PropType<Size>;
|
133
187
|
};
|
134
|
-
|
188
|
+
/**
|
189
|
+
* @zh 是否允许清空输入框
|
190
|
+
* @en Whether to allow the input to be cleared
|
191
|
+
*/
|
192
|
+
allowClear: {
|
135
193
|
type: BooleanConstructor;
|
136
194
|
default: boolean;
|
137
195
|
};
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
type: StringConstructor;
|
144
|
-
default: string;
|
145
|
-
};
|
146
|
-
suffixIcon: {
|
147
|
-
type: StringConstructor;
|
148
|
-
default: string;
|
149
|
-
};
|
150
|
-
autosize: {
|
151
|
-
type: import('vue').PropType<boolean | {
|
152
|
-
minRows: number;
|
153
|
-
maxRows: number;
|
154
|
-
}>;
|
155
|
-
default: boolean;
|
156
|
-
};
|
157
|
-
formatter: {
|
158
|
-
type: FunctionConstructor;
|
159
|
-
default: undefined;
|
160
|
-
};
|
161
|
-
validateEvent: {
|
196
|
+
/**
|
197
|
+
* @zh 是否禁用
|
198
|
+
* @en Whether to disable
|
199
|
+
*/
|
200
|
+
disabled: {
|
162
201
|
type: BooleanConstructor;
|
163
202
|
default: boolean;
|
164
203
|
};
|
165
|
-
|
204
|
+
/**
|
205
|
+
* @zh 是否为只读状态
|
206
|
+
* @en Whether it is read-only
|
207
|
+
*/
|
208
|
+
readonly: {
|
166
209
|
type: BooleanConstructor;
|
167
210
|
default: boolean;
|
168
211
|
};
|
169
|
-
|
212
|
+
/**
|
213
|
+
* @zh 是否为错误状态
|
214
|
+
* @en Whether it is an error state
|
215
|
+
*/
|
216
|
+
error: {
|
170
217
|
type: BooleanConstructor;
|
171
218
|
default: boolean;
|
172
219
|
};
|
173
|
-
|
174
|
-
|
175
|
-
|
220
|
+
/**
|
221
|
+
* @zh 提示文字
|
222
|
+
* @en Prompt text
|
223
|
+
*/
|
224
|
+
placeholder: StringConstructor;
|
225
|
+
/**
|
226
|
+
* @zh 输入值的最大长度,errorOnly 属性在 2.12.0 版本添加
|
227
|
+
* @en Enter the maximum length of the value, the errorOnly attribute was added in version 2.12.0
|
228
|
+
*/
|
229
|
+
maxLength: {
|
230
|
+
type: PropType<number | {
|
231
|
+
length: number;
|
232
|
+
errorOnly?: boolean;
|
233
|
+
}>;
|
234
|
+
default: number;
|
176
235
|
};
|
236
|
+
/**
|
237
|
+
* @zh 是否显示字数统计
|
238
|
+
* @en Whether to display word count
|
239
|
+
*/
|
177
240
|
showWordLimit: {
|
178
241
|
type: BooleanConstructor;
|
179
242
|
default: boolean;
|
180
243
|
};
|
181
|
-
|
182
|
-
|
244
|
+
/**
|
245
|
+
* @zh 字符长度的计算方法
|
246
|
+
* @en Calculation method of word length
|
247
|
+
*/
|
248
|
+
wordLength: {
|
249
|
+
type: PropType<(value: string) => number>;
|
250
|
+
};
|
251
|
+
/**
|
252
|
+
* @zh 字符截取方法,同 wordLength 一起使用
|
253
|
+
* @en Character interception method, used together with wordLength
|
254
|
+
* @version 2.12.0
|
255
|
+
*/
|
256
|
+
wordSlice: {
|
257
|
+
type: PropType<(value: string, maxLength: number) => string>;
|
258
|
+
};
|
259
|
+
/**
|
260
|
+
* @zh 内部 input 元素的属性
|
261
|
+
* @en Attributes of inner input elements
|
262
|
+
* @version 2.27.0
|
263
|
+
*/
|
264
|
+
inputAttrs: {
|
265
|
+
type: ObjectConstructor;
|
266
|
+
};
|
267
|
+
type: {
|
268
|
+
type: PropType<"text" | "password">;
|
183
269
|
default: string;
|
184
270
|
};
|
185
271
|
}>> & Readonly<{
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
onPressEnter?: ((
|
272
|
+
onInput?: ((value: string, ev: Event) => any) | undefined;
|
273
|
+
onClear?: ((ev: MouseEvent) => any) | undefined;
|
274
|
+
onFocus?: ((ev: FocusEvent) => any) | undefined;
|
275
|
+
onBlur?: ((ev: FocusEvent) => any) | undefined;
|
276
|
+
onChange?: ((value: string, ev: Event) => any) | undefined;
|
277
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
278
|
+
onPressEnter?: ((ev: KeyboardEvent) => any) | undefined;
|
193
279
|
}>, {
|
194
|
-
|
195
|
-
name: string;
|
196
|
-
type: "text" | "textarea";
|
197
|
-
form: string;
|
280
|
+
type: "text" | "password";
|
198
281
|
disabled: boolean;
|
199
|
-
|
200
|
-
modelValue: string | number;
|
201
|
-
autocomplete: "on" | "off";
|
202
|
-
autofocus: boolean;
|
203
|
-
maxlength: string | number;
|
282
|
+
error: boolean;
|
204
283
|
readonly: boolean;
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
autosize: boolean | {
|
212
|
-
minRows: number;
|
213
|
-
maxRows: number;
|
214
|
-
};
|
215
|
-
formatter: Function;
|
216
|
-
validateEvent: boolean;
|
284
|
+
defaultValue: string;
|
285
|
+
maxLength: number | {
|
286
|
+
length: number;
|
287
|
+
errorOnly?: boolean;
|
288
|
+
};
|
289
|
+
allowClear: boolean;
|
217
290
|
showWordLimit: boolean;
|
218
|
-
valueType: "string" | "number";
|
219
291
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
220
292
|
export default _default;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {
|
2
|
+
className: {
|
3
|
+
block: string;
|
4
|
+
element: (className: string) => string;
|
5
|
+
modifier: (className: string) => string;
|
6
|
+
is: (className: string) => string;
|
7
|
+
};
|
8
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
9
|
+
export default _default;
|