fast-element-plus 1.0.0-alpha.9 → 1.0.1
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/index.full.js +3180 -4581
- package/dist/index.full.js.map +1 -1
- package/dist/index.full.min.js +5 -5
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +5 -5
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +3180 -4581
- package/dist/index.full.mjs.map +1 -1
- package/dist/styles/index.css +2 -2
- package/es/components/avatar/index.d.ts +1 -1
- package/es/components/avatar/index.mjs.map +1 -1
- package/es/components/avatar/src/avatar.d.ts +18 -102
- package/es/components/avatar/src/avatar.mjs +1 -2
- package/es/components/avatar/src/avatar.mjs.map +1 -1
- package/es/components/button/index.d.ts +1 -1
- package/es/components/button/index.mjs.map +1 -1
- package/es/components/button/src/button.d.ts +35 -180
- package/es/components/button/src/button.mjs +14 -4
- package/es/components/button/src/button.mjs.map +1 -1
- package/es/components/carNumber/src/carNumber.d.ts +58 -194
- package/es/components/contextMenu/src/contextMenu.mjs +1 -1
- package/es/components/contextMenu/src/contextMenu.mjs.map +1 -1
- package/es/components/dialog/src/dialog.d.ts +45 -297
- package/es/components/drawer/src/drawer.d.ts +72 -450
- package/es/components/form/src/form.d.ts +28 -133
- package/es/components/form/src/formItem.d.ts +32 -137
- package/es/components/iconSelector/src/iconSelector.mjs +2 -2
- package/es/components/iconSelector/src/iconSelector.mjs.map +1 -1
- package/es/components/image/src/image.d.ts +43 -253
- package/es/components/select/src/select.d.ts +25 -81
- package/es/components/select/src/select.mjs +1 -0
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/selectPage/src/selectPage.d.ts +19 -61
- package/es/components/selectV2/src/selectV2.d.ts +25 -81
- package/es/components/selectV2/src/selectV2.mjs +1 -0
- package/es/components/selectV2/src/selectV2.mjs.map +1 -1
- package/es/components/table/src/table.d.ts +5 -12
- package/es/components/table/src/table.mjs +4 -6
- package/es/components/table/src/table.mjs.map +1 -1
- package/es/components/table/src/table.state.d.ts +1 -1
- package/es/components/table/src/table.type.d.ts +4 -1
- package/es/components/table/src/table.type.mjs.map +1 -1
- package/es/components/table/src/tableColumn.d.ts +1 -1
- package/es/components/table/src/tableColumn.mjs +7 -7
- package/es/components/table/src/tableColumn.mjs.map +1 -1
- package/es/components/table/src/tableSearchForm.d.ts +6 -4
- package/es/components/table/src/tableSearchForm.mjs +2 -2
- package/es/components/table/src/tableSearchForm.mjs.map +1 -1
- package/es/components/table/src/useTable.mjs +3 -3
- package/es/components/table/src/useTable.mjs.map +1 -1
- package/es/components/tree/src/tree.d.ts +23 -653
- package/es/components/tree/src/tree.mjs +1 -1
- package/es/components/tree/src/tree.mjs.map +1 -1
- package/es/components/tree/src/tree.type.d.ts +1 -1
- package/es/components/treeSelect/src/treeSelect.d.ts +20 -62
- package/es/components/treeSelect/src/treeSelect.mjs +1 -0
- package/es/components/treeSelect/src/treeSelect.mjs.map +1 -1
- package/es/components/upload/src/upload.d.ts +298 -460
- package/es/components/upload/src/useUpload.mjs +2 -2
- package/es/components/upload/src/useUpload.mjs.map +1 -1
- package/es/components/uploadImage/src/uploadImage.d.ts +295 -394
- package/es/components/uploadImage/src/uploadImage.mjs +1 -1
- package/es/components/uploadImage/src/uploadImage.mjs.map +1 -1
- package/es/components/uploadImages/src/uploadImages.d.ts +300 -420
- package/es/components/uploadImages/src/uploadImages.mjs +4 -4
- package/es/components/uploadImages/src/uploadImages.mjs.map +1 -1
- package/es/constants/regex.mjs +13 -13
- package/es/constants/regex.mjs.map +1 -1
- package/es/directive.d.ts +1 -1
- package/es/directives/click-copy/index.d.ts +1 -1
- package/es/directives/click-debounce/index.d.ts +1 -1
- package/es/directives/click-draggable/index.d.ts +1 -1
- package/es/directives/click-icon-copy/index.d.ts +1 -1
- package/es/directives/click-longpress/index.d.ts +1 -1
- package/es/directives/click-throttle/index.d.ts +1 -1
- package/es/element-plus.mjs +1 -1
- package/es/element-plus.mjs.map +1 -1
- package/es/make-installer.mjs +4 -0
- package/es/make-installer.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/avatar/index.d.ts +1 -1
- package/lib/components/avatar/index.js.map +1 -1
- package/lib/components/avatar/src/avatar.d.ts +18 -102
- package/lib/components/avatar/src/avatar.js +1 -1
- package/lib/components/avatar/src/avatar.js.map +1 -1
- package/lib/components/button/index.d.ts +1 -1
- package/lib/components/button/index.js.map +1 -1
- package/lib/components/button/src/button.d.ts +35 -180
- package/lib/components/button/src/button.js +1 -1
- package/lib/components/button/src/button.js.map +1 -1
- package/lib/components/carNumber/src/carNumber.d.ts +58 -194
- package/lib/components/contextMenu/src/contextMenu.js +1 -1
- package/lib/components/contextMenu/src/contextMenu.js.map +1 -1
- package/lib/components/dialog/src/dialog.d.ts +45 -297
- package/lib/components/drawer/src/drawer.d.ts +72 -450
- package/lib/components/form/src/form.d.ts +28 -133
- package/lib/components/form/src/formItem.d.ts +32 -137
- package/lib/components/image/src/image.d.ts +43 -253
- package/lib/components/select/src/select.d.ts +25 -81
- package/lib/components/select/src/select.js +1 -1
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/selectPage/src/selectPage.d.ts +19 -61
- package/lib/components/selectV2/src/selectV2.d.ts +25 -81
- package/lib/components/selectV2/src/selectV2.js +1 -1
- package/lib/components/selectV2/src/selectV2.js.map +1 -1
- package/lib/components/table/src/table.d.ts +5 -12
- package/lib/components/table/src/table.js +1 -1
- package/lib/components/table/src/table.js.map +1 -1
- package/lib/components/table/src/table.state.d.ts +1 -1
- package/lib/components/table/src/table.type.d.ts +4 -1
- package/lib/components/table/src/table.type.js.map +1 -1
- package/lib/components/table/src/tableColumn.d.ts +1 -1
- package/lib/components/table/src/tableColumn.js +1 -1
- package/lib/components/table/src/tableColumn.js.map +1 -1
- package/lib/components/table/src/tableSearchForm.d.ts +6 -4
- package/lib/components/table/src/tableSearchForm.js +1 -1
- package/lib/components/table/src/tableSearchForm.js.map +1 -1
- package/lib/components/table/src/useTable.js +1 -1
- package/lib/components/table/src/useTable.js.map +1 -1
- package/lib/components/tree/src/tree.d.ts +23 -653
- package/lib/components/tree/src/tree.js +1 -1
- package/lib/components/tree/src/tree.js.map +1 -1
- package/lib/components/tree/src/tree.type.d.ts +1 -1
- package/lib/components/treeSelect/src/treeSelect.d.ts +20 -62
- package/lib/components/treeSelect/src/treeSelect.js +1 -1
- package/lib/components/treeSelect/src/treeSelect.js.map +1 -1
- package/lib/components/upload/src/upload.d.ts +298 -460
- package/lib/components/upload/src/useUpload.js +1 -1
- package/lib/components/upload/src/useUpload.js.map +1 -1
- package/lib/components/uploadImage/src/uploadImage.d.ts +295 -394
- package/lib/components/uploadImage/src/uploadImage.js +1 -1
- package/lib/components/uploadImage/src/uploadImage.js.map +1 -1
- package/lib/components/uploadImages/src/uploadImages.d.ts +300 -420
- package/lib/components/uploadImages/src/uploadImages.js +1 -1
- package/lib/components/uploadImages/src/uploadImages.js.map +1 -1
- package/lib/constants/regex.js +1 -1
- package/lib/constants/regex.js.map +1 -1
- package/lib/directive.d.ts +1 -1
- package/lib/directives/click-copy/index.d.ts +1 -1
- package/lib/directives/click-debounce/index.d.ts +1 -1
- package/lib/directives/click-draggable/index.d.ts +1 -1
- package/lib/directives/click-icon-copy/index.d.ts +1 -1
- package/lib/directives/click-longpress/index.d.ts +1 -1
- package/lib/directives/click-throttle/index.d.ts +1 -1
- package/lib/element-plus.js +1 -1
- package/lib/element-plus.js.map +1 -1
- package/lib/make-installer.js +1 -1
- package/lib/make-installer.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +8 -8
- package/styles/components/contextMenu.scss +2 -2
package/dist/styles/index.css
CHANGED
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
border: none;
|
|
161
161
|
}
|
|
162
162
|
.fa-context-menu .el-dropdown-menu .el-dropdown-menu__item {
|
|
163
|
-
font-size: var(--el-font-size-
|
|
163
|
+
font-size: var(--el-font-size-small);
|
|
164
164
|
}
|
|
165
165
|
.fa-context-menu .el-dropdown-menu .el-dropdown-menu__item .fa-icon {
|
|
166
166
|
margin-right: 5px;
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
.fa-context-menu-small .el-dropdown-menu .el-dropdown-menu__item {
|
|
177
|
-
font-size:
|
|
177
|
+
font-size: var(--el-font-size-extra-small);
|
|
178
178
|
}
|
|
179
179
|
.fa-context-menu-small .el-dropdown-menu .el-dropdown-menu__item .fa-icon {
|
|
180
180
|
margin-right: 3px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../packages/components/avatar/index.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../packages/components/avatar/index.ts"],"sourcesContent":["import { withInstall } from \"@fast-china/utils\";\nimport Avatar from \"./src/avatar\";\nimport type { faAvatarEmits, faAvatarProps } from \"./src/avatar\";\nimport type { ExtractPropTypes } from \"vue\";\n\nexport const FaAvatar = withInstall(Avatar);\nexport default FaAvatar;\n\nexport { faAvatarProps as faAvatarProps, faAvatarEmits as faAvatarEmits };\n\nexport type FaAvatarInstance = InstanceType<typeof Avatar>;\n\nexport type FaAvatarProps = ExtractPropTypes<typeof faAvatarProps>;\n\nexport type FaAvatarEmits = typeof faAvatarEmits;\n"],"names":[],"mappings":";;AAKO,MAAM,WAAW,YAAY,MAAM;"}
|
|
@@ -3,7 +3,7 @@ export declare const faAvatarProps: {
|
|
|
3
3
|
/** @description representation type to icon, more info on icon component. */
|
|
4
4
|
icon: {
|
|
5
5
|
type: import('vue').PropType<string | Component>;
|
|
6
|
-
default: () =>
|
|
6
|
+
default: () => string | Component;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
9
|
* @description 原图
|
|
@@ -15,40 +15,12 @@ export declare const faAvatarProps: {
|
|
|
15
15
|
small: BooleanConstructor;
|
|
16
16
|
/** @description 缩略图 */
|
|
17
17
|
thumb: BooleanConstructor;
|
|
18
|
-
size:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
22
|
-
__epPropKey: true;
|
|
23
|
-
} & {
|
|
24
|
-
readonly default: "";
|
|
25
|
-
};
|
|
26
|
-
shape: {
|
|
27
|
-
readonly type: import('vue').PropType<"circle" | "square">;
|
|
28
|
-
readonly required: false;
|
|
29
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
30
|
-
__epPropKey: true;
|
|
31
|
-
} & {
|
|
32
|
-
readonly default: "circle";
|
|
33
|
-
};
|
|
34
|
-
src: {
|
|
35
|
-
readonly type: import('vue').PropType<string>;
|
|
36
|
-
readonly required: false;
|
|
37
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
38
|
-
__epPropKey: true;
|
|
39
|
-
} & {
|
|
40
|
-
readonly default: "";
|
|
41
|
-
};
|
|
18
|
+
size: import('element-plus/es/utils/index.mjs').EpPropFinalized<readonly [NumberConstructor, StringConstructor], "" | "small" | "default" | "large", number, "", boolean>;
|
|
19
|
+
shape: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, "circle" | "square", unknown, "circle", boolean>;
|
|
20
|
+
src: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
42
21
|
alt: StringConstructor;
|
|
43
22
|
srcSet: StringConstructor;
|
|
44
|
-
fit:
|
|
45
|
-
readonly type: import('vue').PropType<any>;
|
|
46
|
-
readonly required: false;
|
|
47
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
48
|
-
__epPropKey: true;
|
|
49
|
-
} & {
|
|
50
|
-
readonly default: "cover";
|
|
51
|
-
};
|
|
23
|
+
fit: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => "fill" | "contain" | "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "none" | "cover" | "scale-down") | (() => ObjectFitProperty) | ((new (...args: any[]) => "fill" | "contain" | "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "none" | "cover" | "scale-down") | (() => ObjectFitProperty))[], unknown, unknown, "cover", boolean>;
|
|
52
24
|
};
|
|
53
25
|
export declare const faAvatarEmits: {
|
|
54
26
|
error: (evt: Event) => boolean;
|
|
@@ -63,7 +35,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
63
35
|
/** @description representation type to icon, more info on icon component. */
|
|
64
36
|
icon: {
|
|
65
37
|
type: import('vue').PropType<string | Component>;
|
|
66
|
-
default: () =>
|
|
38
|
+
default: () => string | Component;
|
|
67
39
|
};
|
|
68
40
|
/**
|
|
69
41
|
* @description 原图
|
|
@@ -75,40 +47,12 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
75
47
|
small: BooleanConstructor;
|
|
76
48
|
/** @description 缩略图 */
|
|
77
49
|
thumb: BooleanConstructor;
|
|
78
|
-
size:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
82
|
-
__epPropKey: true;
|
|
83
|
-
} & {
|
|
84
|
-
readonly default: "";
|
|
85
|
-
};
|
|
86
|
-
shape: {
|
|
87
|
-
readonly type: import('vue').PropType<"circle" | "square">;
|
|
88
|
-
readonly required: false;
|
|
89
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
90
|
-
__epPropKey: true;
|
|
91
|
-
} & {
|
|
92
|
-
readonly default: "circle";
|
|
93
|
-
};
|
|
94
|
-
src: {
|
|
95
|
-
readonly type: import('vue').PropType<string>;
|
|
96
|
-
readonly required: false;
|
|
97
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
98
|
-
__epPropKey: true;
|
|
99
|
-
} & {
|
|
100
|
-
readonly default: "";
|
|
101
|
-
};
|
|
50
|
+
size: import('element-plus/es/utils/index.mjs').EpPropFinalized<readonly [NumberConstructor, StringConstructor], "" | "small" | "default" | "large", number, "", boolean>;
|
|
51
|
+
shape: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, "circle" | "square", unknown, "circle", boolean>;
|
|
52
|
+
src: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
102
53
|
alt: StringConstructor;
|
|
103
54
|
srcSet: StringConstructor;
|
|
104
|
-
fit:
|
|
105
|
-
readonly type: import('vue').PropType<any>;
|
|
106
|
-
readonly required: false;
|
|
107
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
108
|
-
__epPropKey: true;
|
|
109
|
-
} & {
|
|
110
|
-
readonly default: "cover";
|
|
111
|
-
};
|
|
55
|
+
fit: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => "fill" | "contain" | "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "none" | "cover" | "scale-down") | (() => ObjectFitProperty) | ((new (...args: any[]) => "fill" | "contain" | "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "none" | "cover" | "scale-down") | (() => ObjectFitProperty))[], unknown, unknown, "cover", boolean>;
|
|
112
56
|
}>, {
|
|
113
57
|
/** @description 图片路径 */
|
|
114
58
|
src: string;
|
|
@@ -118,7 +62,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
118
62
|
/** @description representation type to icon, more info on icon component. */
|
|
119
63
|
icon: {
|
|
120
64
|
type: import('vue').PropType<string | Component>;
|
|
121
|
-
default: () =>
|
|
65
|
+
default: () => string | Component;
|
|
122
66
|
};
|
|
123
67
|
/**
|
|
124
68
|
* @description 原图
|
|
@@ -130,50 +74,22 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
130
74
|
small: BooleanConstructor;
|
|
131
75
|
/** @description 缩略图 */
|
|
132
76
|
thumb: BooleanConstructor;
|
|
133
|
-
size:
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
137
|
-
__epPropKey: true;
|
|
138
|
-
} & {
|
|
139
|
-
readonly default: "";
|
|
140
|
-
};
|
|
141
|
-
shape: {
|
|
142
|
-
readonly type: import('vue').PropType<"circle" | "square">;
|
|
143
|
-
readonly required: false;
|
|
144
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
145
|
-
__epPropKey: true;
|
|
146
|
-
} & {
|
|
147
|
-
readonly default: "circle";
|
|
148
|
-
};
|
|
149
|
-
src: {
|
|
150
|
-
readonly type: import('vue').PropType<string>;
|
|
151
|
-
readonly required: false;
|
|
152
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
153
|
-
__epPropKey: true;
|
|
154
|
-
} & {
|
|
155
|
-
readonly default: "";
|
|
156
|
-
};
|
|
77
|
+
size: import('element-plus/es/utils/index.mjs').EpPropFinalized<readonly [NumberConstructor, StringConstructor], "" | "small" | "default" | "large", number, "", boolean>;
|
|
78
|
+
shape: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, "circle" | "square", unknown, "circle", boolean>;
|
|
79
|
+
src: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
157
80
|
alt: StringConstructor;
|
|
158
81
|
srcSet: StringConstructor;
|
|
159
|
-
fit:
|
|
160
|
-
readonly type: import('vue').PropType<any>;
|
|
161
|
-
readonly required: false;
|
|
162
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
163
|
-
__epPropKey: true;
|
|
164
|
-
} & {
|
|
165
|
-
readonly default: "cover";
|
|
166
|
-
};
|
|
82
|
+
fit: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => "fill" | "contain" | "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "none" | "cover" | "scale-down") | (() => ObjectFitProperty) | ((new (...args: any[]) => "fill" | "contain" | "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "none" | "cover" | "scale-down") | (() => ObjectFitProperty))[], unknown, unknown, "cover", boolean>;
|
|
167
83
|
}>> & Readonly<{
|
|
168
84
|
onError?: (evt: Event) => any;
|
|
169
85
|
}>, {
|
|
170
86
|
small: boolean;
|
|
171
|
-
size:
|
|
172
|
-
icon:
|
|
87
|
+
size: import('element-plus/es/utils/index.mjs').EpPropMergeType<readonly [NumberConstructor, StringConstructor], "" | "small" | "default" | "large", number>;
|
|
88
|
+
icon: string | Component;
|
|
173
89
|
original: boolean;
|
|
174
90
|
normal: boolean;
|
|
175
91
|
thumb: boolean;
|
|
176
|
-
shape: "circle" | "square"
|
|
92
|
+
shape: import('element-plus/es/utils/index.mjs').EpPropMergeType<StringConstructor, "circle" | "square", unknown>;
|
|
177
93
|
src: string;
|
|
178
94
|
fit: any;
|
|
179
95
|
}, import('vue').SlotsType<Partial<import('@fast-china/utils').MakeSlots<FaAvatarSlots>>>, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { defineComponent, reactive, computed, createVNode, mergeProps } from "vue";
|
|
2
|
+
import { avatarProps, avatarEmits, ElAvatar } from "element-plus";
|
|
2
3
|
import { Picture } from "@element-plus/icons-vue";
|
|
3
4
|
import { definePropType, useProps, useRender, useExpose, makeSlots } from "@fast-china/utils";
|
|
4
|
-
import { avatarProps, avatarEmits, ElAvatar } from "element-plus";
|
|
5
5
|
const faAvatarProps = {
|
|
6
6
|
...avatarProps,
|
|
7
7
|
/** @description representation type to icon, more info on icon component. */
|
|
8
8
|
icon: {
|
|
9
9
|
type: definePropType([String, Object, Function]),
|
|
10
|
-
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
11
10
|
default: () => Picture
|
|
12
11
|
},
|
|
13
12
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.mjs","sources":["../../../../../packages/components/avatar/src/avatar.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"avatar.mjs","sources":["../../../../../packages/components/avatar/src/avatar.tsx"],"sourcesContent":["import { computed, defineComponent, reactive } from \"vue\";\nimport { ElAvatar, avatarEmits, avatarProps } from \"element-plus\";\nimport { Picture } from \"@element-plus/icons-vue\";\nimport { definePropType, makeSlots, useExpose, useProps, useRender } from \"@fast-china/utils\";\nimport type { Component } from \"vue\";\n\nexport const faAvatarProps = {\n\t...avatarProps,\n\t/** @description representation type to icon, more info on icon component. */\n\ticon: {\n\t\ttype: definePropType<string | Component>([String, Object, Function]),\n\t\tdefault: (): string | Component => Picture,\n\t},\n\t/**\n\t * @description 原图\n\t */\n\toriginal: Boolean,\n\t/** @description 标准 */\n\tnormal: Boolean,\n\t/** @description 小图 */\n\tsmall: Boolean,\n\t/** @description 缩略图 */\n\tthumb: Boolean,\n};\n\nexport const faAvatarEmits = {\n\t...avatarEmits,\n};\n\ntype FaAvatarSlots = {\n\t/** @description 默认内容插槽 */\n\tdefault: { src: string };\n};\n\nexport default defineComponent({\n\tname: \"FaAvatar\",\n\tprops: faAvatarProps,\n\temits: faAvatarEmits,\n\tslots: makeSlots<FaAvatarSlots>(),\n\tsetup(props, { attrs, slots, emit, expose }) {\n\t\tconst state = reactive({\n\t\t\tsrc: computed(() => {\n\t\t\t\tif (props.src) {\n\t\t\t\t\tif (props.original) {\n\t\t\t\t\t\treturn props.src;\n\t\t\t\t\t} else if (props.normal) {\n\t\t\t\t\t\treturn `${props.src}@!normal`;\n\t\t\t\t\t} else if (props.small) {\n\t\t\t\t\t\treturn `${props.src}@!small`;\n\t\t\t\t\t} else if (props.thumb) {\n\t\t\t\t\t\treturn `${props.src}@!thumb`;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// 默认使用缩略图\n\t\t\t\t\t\treturn `${props.src}@!thumb`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn undefined;\n\t\t\t}),\n\t\t});\n\n\t\tconst elAvatarProps = useProps(props, avatarProps, [\"src\"]);\n\n\t\tuseRender(() => (\n\t\t\t<ElAvatar {...elAvatarProps.value} class=\"fa-avatar\" src={state.src} onError={(evt: Event) => emit(\"error\", evt)}>\n\t\t\t\t{slots.default && slots.default({ src: state.src })}\n\t\t\t</ElAvatar>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 图片路径 */\n\t\t\tsrc: state.src,\n\t\t});\n\t},\n});\n"],"names":["faAvatarProps","avatarProps","icon","type","definePropType","String","Object","Function","default","Picture","original","Boolean","normal","small","thumb","faAvatarEmits","avatarEmits","name","props","emits","slots","makeSlots","setup","attrs","emit","expose","state","reactive","src","computed","undefined","elAvatarProps","useProps","useRender","_createVNode","ElAvatar","_mergeProps","value","evt","useExpose"],"mappings":";;;;AAMO,MAAMA,gBAAgB;AAAA,EAC5B,GAAGC;AAAAA;AAAAA,EAEHC,MAAM;AAAA,IACLC,MAAMC,eAAmC,CAACC,QAAQC,QAAQC,QAAQ,CAAC;AAAA,IACnEC,SAASA,MAA0BC;AAAAA;;;;EAKpCC,UAAUC;AAAAA;AAAAA,EAEVC,QAAQD;AAAAA;AAAAA,EAERE,OAAOF;AAAAA;AAAAA,EAEPG,OAAOH;AACR;AAEO,MAAMI,gBAAgB;AAAA,EAC5B,GAAGC;AACJ;AAOA,MAAA,yCAA+B;AAAA,EAC9BC,MAAM;AAAA,EACNC,OAAOlB;AAAAA,EACPmB,OAAOJ;AAAAA,EACPK,OAAOC,UAAS;AAAA,EAChBC,MAAMJ,OAAO;AAAA,IAAEK;AAAAA,IAAOH;AAAAA,IAAOI;AAAAA,IAAMC;AAAAA,EAAO,GAAG;AAC5C,UAAMC,QAAQC,SAAS;AAAA,MACtBC,KAAKC,SAAS,MAAM;AACnB,YAAIX,MAAMU,KAAK;AACd,cAAIV,MAAMR,UAAU;AACnB,mBAAOQ,MAAMU;AAAAA,UACd,WAAWV,MAAMN,QAAQ;AACxB,mBAAO,GAAGM,MAAMU,GAAG;AAAA,UACpB,WAAWV,MAAML,OAAO;AACvB,mBAAO,GAAGK,MAAMU,GAAG;AAAA,UACpB,WAAWV,MAAMJ,OAAO;AACvB,mBAAO,GAAGI,MAAMU,GAAG;AAAA,UACpB,OAAO;AAEN,mBAAO,GAAGV,MAAMU,GAAG;AAAA,UACpB;AAAA,QACD;AACA,eAAOE;AAAAA,MACR,CAAC;AAAA,IACF,CAAC;AAED,UAAMC,gBAAgBC,SAASd,OAAOjB,aAAa,CAAC,KAAK,CAAC;AAE1DgC,cAAU,MAAAC,YAAAC,UAAAC,WACKL,cAAcM,OAAK;AAAA,MAAA,SAAA;AAAA,MAAA,OAAyBX,MAAME;AAAAA,MAAG,WAAYU,SAAed,KAAK,SAASc,GAAG;AAAA,IAAC,CAAA,GAAA;AAAA,MAAA9B,SAAAA,MAAA,CAC9GY,MAAMZ,WAAWY,MAAMZ,QAAQ;AAAA,QAAEoB,KAAKF,MAAME;AAAAA,MAAI,CAAC,CAAC;AAAA,IAAA,CAAA,CAEpD;AAED,WAAOW,UAAUd,QAAQ;AAAA;AAAA,MAExBG,KAAKF,MAAME;AAAAA,IACZ,CAAC;AAAA,EACF;AACD,CAAC;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ExtractPropTypes } from "vue";
|
|
2
1
|
import { TSXWithInstall } from "@fast-china/utils";
|
|
3
2
|
import { default as Button } from "./src/button";
|
|
4
3
|
import type { faButtonEmits, faButtonProps } from "./src/button";
|
|
4
|
+
import type { ExtractPropTypes } from "vue";
|
|
5
5
|
|
|
6
6
|
export declare const FaButton: TSXWithInstall<typeof Button>;
|
|
7
7
|
export default Button;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../packages/components/button/index.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../packages/components/button/index.ts"],"sourcesContent":["import { withInstall } from \"@fast-china/utils\";\nimport Button, { faButtonEmits, faButtonProps } from \"./src/button\";\nimport type { ExtractPropTypes } from \"vue\";\n\nexport const FaButton = withInstall(Button);\nexport default Button;\n\nexport { faButtonProps, faButtonEmits };\n\nexport type FaButtonInstance = InstanceType<typeof Button>;\n\nexport type FaButtonProps = ExtractPropTypes<typeof faButtonProps>;\n\nexport type FaButtonEmits = typeof faButtonEmits;\n"],"names":[],"mappings":";;;AAIO,MAAM,WAAW,YAAY,MAAM;"}
|
|
@@ -11,81 +11,32 @@ export declare const faButtonProps: {
|
|
|
11
11
|
/** @description 禁用加载 */
|
|
12
12
|
disabledLoading: BooleanConstructor;
|
|
13
13
|
size: {
|
|
14
|
-
readonly type: import('vue').PropType<"" | "small" | "default" | "large"
|
|
14
|
+
readonly type: import('vue').PropType<import('element-plus/es/utils/index.mjs').EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never>>;
|
|
15
15
|
readonly required: false;
|
|
16
16
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
17
17
|
__epPropKey: true;
|
|
18
18
|
};
|
|
19
19
|
disabled: BooleanConstructor;
|
|
20
|
-
type:
|
|
21
|
-
readonly type: import('vue').PropType<"" | "default" | "text" | "primary" | "success" | "warning" | "info" | "danger">;
|
|
22
|
-
readonly required: false;
|
|
23
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
24
|
-
__epPropKey: true;
|
|
25
|
-
} & {
|
|
26
|
-
readonly default: "";
|
|
27
|
-
};
|
|
20
|
+
type: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, "" | "text" | "default" | "primary" | "success" | "warning" | "info" | "danger", unknown, "", boolean>;
|
|
28
21
|
icon: {
|
|
29
|
-
readonly type: import('vue').PropType<unknown
|
|
22
|
+
readonly type: import('vue').PropType<import('element-plus/es/utils/index.mjs').EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | ((new (...args: any[]) => (string | Component) & {}) | (() => string | Component))[], unknown, unknown>>;
|
|
30
23
|
readonly required: false;
|
|
31
24
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
32
25
|
__epPropKey: true;
|
|
33
26
|
};
|
|
34
|
-
nativeType:
|
|
35
|
-
readonly type: import('vue').PropType<"button" | "reset" | "submit">;
|
|
36
|
-
readonly required: false;
|
|
37
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
38
|
-
__epPropKey: true;
|
|
39
|
-
} & {
|
|
40
|
-
readonly default: "button";
|
|
41
|
-
};
|
|
27
|
+
nativeType: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, "button" | "reset" | "submit", unknown, "button", boolean>;
|
|
42
28
|
loading: BooleanConstructor;
|
|
43
|
-
plain:
|
|
44
|
-
|
|
45
|
-
readonly required: false;
|
|
46
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
47
|
-
__epPropKey: true;
|
|
48
|
-
} & {
|
|
49
|
-
readonly default: undefined;
|
|
50
|
-
};
|
|
51
|
-
text: {
|
|
52
|
-
readonly type: import('vue').PropType<boolean>;
|
|
53
|
-
readonly required: false;
|
|
54
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
55
|
-
__epPropKey: true;
|
|
56
|
-
} & {
|
|
57
|
-
readonly default: undefined;
|
|
58
|
-
};
|
|
29
|
+
plain: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
30
|
+
text: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
59
31
|
link: BooleanConstructor;
|
|
60
32
|
bg: BooleanConstructor;
|
|
61
33
|
autofocus: BooleanConstructor;
|
|
62
|
-
round:
|
|
63
|
-
readonly type: import('vue').PropType<boolean>;
|
|
64
|
-
readonly required: false;
|
|
65
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
66
|
-
__epPropKey: true;
|
|
67
|
-
} & {
|
|
68
|
-
readonly default: undefined;
|
|
69
|
-
};
|
|
34
|
+
round: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
70
35
|
circle: BooleanConstructor;
|
|
71
36
|
color: StringConstructor;
|
|
72
37
|
dark: BooleanConstructor;
|
|
73
|
-
autoInsertSpace:
|
|
74
|
-
|
|
75
|
-
readonly required: false;
|
|
76
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
77
|
-
__epPropKey: true;
|
|
78
|
-
} & {
|
|
79
|
-
readonly default: undefined;
|
|
80
|
-
};
|
|
81
|
-
tag: {
|
|
82
|
-
readonly type: import('vue').PropType<unknown>;
|
|
83
|
-
readonly required: false;
|
|
84
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
85
|
-
__epPropKey: true;
|
|
86
|
-
} & {
|
|
87
|
-
readonly default: "button";
|
|
88
|
-
};
|
|
38
|
+
autoInsertSpace: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
39
|
+
tag: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | ((new (...args: any[]) => (string | Component) & {}) | (() => string | Component))[], unknown, unknown, "button", boolean>;
|
|
89
40
|
};
|
|
90
41
|
export declare const faButtonEmits: {
|
|
91
42
|
/**
|
|
@@ -114,81 +65,32 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
114
65
|
/** @description 禁用加载 */
|
|
115
66
|
disabledLoading: BooleanConstructor;
|
|
116
67
|
size: {
|
|
117
|
-
readonly type: import('vue').PropType<"" | "small" | "default" | "large"
|
|
68
|
+
readonly type: import('vue').PropType<import('element-plus/es/utils/index.mjs').EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never>>;
|
|
118
69
|
readonly required: false;
|
|
119
70
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
120
71
|
__epPropKey: true;
|
|
121
72
|
};
|
|
122
73
|
disabled: BooleanConstructor;
|
|
123
|
-
type:
|
|
124
|
-
readonly type: import('vue').PropType<"" | "default" | "text" | "primary" | "success" | "warning" | "info" | "danger">;
|
|
125
|
-
readonly required: false;
|
|
126
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
127
|
-
__epPropKey: true;
|
|
128
|
-
} & {
|
|
129
|
-
readonly default: "";
|
|
130
|
-
};
|
|
74
|
+
type: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, "" | "text" | "default" | "primary" | "success" | "warning" | "info" | "danger", unknown, "", boolean>;
|
|
131
75
|
icon: {
|
|
132
|
-
readonly type: import('vue').PropType<unknown
|
|
76
|
+
readonly type: import('vue').PropType<import('element-plus/es/utils/index.mjs').EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | ((new (...args: any[]) => (string | Component) & {}) | (() => string | Component))[], unknown, unknown>>;
|
|
133
77
|
readonly required: false;
|
|
134
78
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
135
79
|
__epPropKey: true;
|
|
136
80
|
};
|
|
137
|
-
nativeType:
|
|
138
|
-
readonly type: import('vue').PropType<"button" | "reset" | "submit">;
|
|
139
|
-
readonly required: false;
|
|
140
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
141
|
-
__epPropKey: true;
|
|
142
|
-
} & {
|
|
143
|
-
readonly default: "button";
|
|
144
|
-
};
|
|
81
|
+
nativeType: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, "button" | "reset" | "submit", unknown, "button", boolean>;
|
|
145
82
|
loading: BooleanConstructor;
|
|
146
|
-
plain:
|
|
147
|
-
|
|
148
|
-
readonly required: false;
|
|
149
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
150
|
-
__epPropKey: true;
|
|
151
|
-
} & {
|
|
152
|
-
readonly default: undefined;
|
|
153
|
-
};
|
|
154
|
-
text: {
|
|
155
|
-
readonly type: import('vue').PropType<boolean>;
|
|
156
|
-
readonly required: false;
|
|
157
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
158
|
-
__epPropKey: true;
|
|
159
|
-
} & {
|
|
160
|
-
readonly default: undefined;
|
|
161
|
-
};
|
|
83
|
+
plain: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
84
|
+
text: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
162
85
|
link: BooleanConstructor;
|
|
163
86
|
bg: BooleanConstructor;
|
|
164
87
|
autofocus: BooleanConstructor;
|
|
165
|
-
round:
|
|
166
|
-
readonly type: import('vue').PropType<boolean>;
|
|
167
|
-
readonly required: false;
|
|
168
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
169
|
-
__epPropKey: true;
|
|
170
|
-
} & {
|
|
171
|
-
readonly default: undefined;
|
|
172
|
-
};
|
|
88
|
+
round: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
173
89
|
circle: BooleanConstructor;
|
|
174
90
|
color: StringConstructor;
|
|
175
91
|
dark: BooleanConstructor;
|
|
176
|
-
autoInsertSpace:
|
|
177
|
-
|
|
178
|
-
readonly required: false;
|
|
179
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
180
|
-
__epPropKey: true;
|
|
181
|
-
} & {
|
|
182
|
-
readonly default: undefined;
|
|
183
|
-
};
|
|
184
|
-
tag: {
|
|
185
|
-
readonly type: import('vue').PropType<unknown>;
|
|
186
|
-
readonly required: false;
|
|
187
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
188
|
-
__epPropKey: true;
|
|
189
|
-
} & {
|
|
190
|
-
readonly default: "button";
|
|
191
|
-
};
|
|
92
|
+
autoInsertSpace: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
93
|
+
tag: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | ((new (...args: any[]) => (string | Component) & {}) | (() => string | Component))[], unknown, unknown, "button", boolean>;
|
|
192
94
|
}>, {
|
|
193
95
|
/** @description 按钮 html 元素 */
|
|
194
96
|
ref: import('vue').ComputedRef<HTMLButtonElement>;
|
|
@@ -202,6 +104,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
202
104
|
shouldAddSpace: import('vue').ComputedRef<boolean>;
|
|
203
105
|
/** @description 加载状态 */
|
|
204
106
|
loading: import('vue').ComputedRef<boolean>;
|
|
107
|
+
/** @description 按钮加载 */
|
|
108
|
+
doLoading: (loadingFunction: () => void | Promise<void>) => void;
|
|
205
109
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
206
110
|
/**
|
|
207
111
|
* @description 点击事件
|
|
@@ -220,99 +124,50 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
220
124
|
/** @description 禁用加载 */
|
|
221
125
|
disabledLoading: BooleanConstructor;
|
|
222
126
|
size: {
|
|
223
|
-
readonly type: import('vue').PropType<"" | "small" | "default" | "large"
|
|
127
|
+
readonly type: import('vue').PropType<import('element-plus/es/utils/index.mjs').EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never>>;
|
|
224
128
|
readonly required: false;
|
|
225
129
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
226
130
|
__epPropKey: true;
|
|
227
131
|
};
|
|
228
132
|
disabled: BooleanConstructor;
|
|
229
|
-
type:
|
|
230
|
-
readonly type: import('vue').PropType<"" | "default" | "text" | "primary" | "success" | "warning" | "info" | "danger">;
|
|
231
|
-
readonly required: false;
|
|
232
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
233
|
-
__epPropKey: true;
|
|
234
|
-
} & {
|
|
235
|
-
readonly default: "";
|
|
236
|
-
};
|
|
133
|
+
type: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, "" | "text" | "default" | "primary" | "success" | "warning" | "info" | "danger", unknown, "", boolean>;
|
|
237
134
|
icon: {
|
|
238
|
-
readonly type: import('vue').PropType<unknown
|
|
239
|
-
readonly required: false;
|
|
240
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
241
|
-
__epPropKey: true;
|
|
242
|
-
};
|
|
243
|
-
nativeType: {
|
|
244
|
-
readonly type: import('vue').PropType<"button" | "reset" | "submit">;
|
|
135
|
+
readonly type: import('vue').PropType<import('element-plus/es/utils/index.mjs').EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | ((new (...args: any[]) => (string | Component) & {}) | (() => string | Component))[], unknown, unknown>>;
|
|
245
136
|
readonly required: false;
|
|
246
137
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
247
138
|
__epPropKey: true;
|
|
248
|
-
} & {
|
|
249
|
-
readonly default: "button";
|
|
250
139
|
};
|
|
140
|
+
nativeType: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, "button" | "reset" | "submit", unknown, "button", boolean>;
|
|
251
141
|
loading: BooleanConstructor;
|
|
252
|
-
plain:
|
|
253
|
-
|
|
254
|
-
readonly required: false;
|
|
255
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
256
|
-
__epPropKey: true;
|
|
257
|
-
} & {
|
|
258
|
-
readonly default: undefined;
|
|
259
|
-
};
|
|
260
|
-
text: {
|
|
261
|
-
readonly type: import('vue').PropType<boolean>;
|
|
262
|
-
readonly required: false;
|
|
263
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
264
|
-
__epPropKey: true;
|
|
265
|
-
} & {
|
|
266
|
-
readonly default: undefined;
|
|
267
|
-
};
|
|
142
|
+
plain: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
143
|
+
text: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
268
144
|
link: BooleanConstructor;
|
|
269
145
|
bg: BooleanConstructor;
|
|
270
146
|
autofocus: BooleanConstructor;
|
|
271
|
-
round:
|
|
272
|
-
readonly type: import('vue').PropType<boolean>;
|
|
273
|
-
readonly required: false;
|
|
274
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
275
|
-
__epPropKey: true;
|
|
276
|
-
} & {
|
|
277
|
-
readonly default: undefined;
|
|
278
|
-
};
|
|
147
|
+
round: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
279
148
|
circle: BooleanConstructor;
|
|
280
149
|
color: StringConstructor;
|
|
281
150
|
dark: BooleanConstructor;
|
|
282
|
-
autoInsertSpace:
|
|
283
|
-
|
|
284
|
-
readonly required: false;
|
|
285
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
286
|
-
__epPropKey: true;
|
|
287
|
-
} & {
|
|
288
|
-
readonly default: undefined;
|
|
289
|
-
};
|
|
290
|
-
tag: {
|
|
291
|
-
readonly type: import('vue').PropType<unknown>;
|
|
292
|
-
readonly required: false;
|
|
293
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
294
|
-
__epPropKey: true;
|
|
295
|
-
} & {
|
|
296
|
-
readonly default: "button";
|
|
297
|
-
};
|
|
151
|
+
autoInsertSpace: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
152
|
+
tag: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | ((new (...args: any[]) => (string | Component) & {}) | (() => string | Component))[], unknown, unknown, "button", boolean>;
|
|
298
153
|
}>> & Readonly<{
|
|
299
154
|
onClick?: (event: MouseEvent, done?: () => void) => any;
|
|
300
155
|
}>, {
|
|
301
|
-
type: "" | "default" | "text" | "primary" | "success" | "warning" | "info" | "danger"
|
|
156
|
+
type: import('element-plus/es/utils/index.mjs').EpPropMergeType<StringConstructor, "" | "default" | "text" | "primary" | "success" | "warning" | "info" | "danger", unknown>;
|
|
302
157
|
circle: boolean;
|
|
303
158
|
link: boolean;
|
|
304
|
-
text:
|
|
305
|
-
plain:
|
|
159
|
+
text: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
160
|
+
plain: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
306
161
|
loading: boolean;
|
|
307
162
|
loadingIcon: string | Component;
|
|
308
163
|
disabledLoading: boolean;
|
|
309
164
|
disabled: boolean;
|
|
310
|
-
nativeType: "button" | "reset" | "submit"
|
|
165
|
+
nativeType: import('element-plus/es/utils/index.mjs').EpPropMergeType<StringConstructor, "button" | "reset" | "submit", unknown>;
|
|
311
166
|
bg: boolean;
|
|
312
167
|
autofocus: boolean;
|
|
313
|
-
round:
|
|
168
|
+
round: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
314
169
|
dark: boolean;
|
|
315
|
-
autoInsertSpace:
|
|
170
|
+
autoInsertSpace: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
316
171
|
tag: "button";
|
|
317
172
|
}, import('vue').SlotsType<Partial<import('@fast-china/utils').MakeSlots<FaButtonSlots>>>, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
318
173
|
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent, reactive, ref, watch, createVNode, mergeProps, withModifiers, computed } from "vue";
|
|
2
|
+
import { buttonProps, buttonEmits, ElButton } from "element-plus";
|
|
2
3
|
import { Eleme } from "@element-plus/icons-vue";
|
|
3
4
|
import "../../../hooks/index.mjs";
|
|
4
|
-
import { definePropType, useProps, useRender, useExpose, makeSlots } from "@fast-china/utils";
|
|
5
|
-
import { buttonProps, buttonEmits, ElButton } from "element-plus";
|
|
5
|
+
import { definePropType, execFunction, consoleError, useProps, useRender, useExpose, makeSlots } from "@fast-china/utils";
|
|
6
6
|
import { isFunction } from "lodash-unified";
|
|
7
7
|
import { useOverlay } from "../../../hooks/use-overlay/index.mjs";
|
|
8
8
|
const faButtonProps = {
|
|
@@ -24,7 +24,7 @@ const faButtonEmits = {
|
|
|
24
24
|
* @description 点击事件
|
|
25
25
|
* @param done 需要手动隐藏Loading
|
|
26
26
|
*/
|
|
27
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
28
28
|
click: (event, done = () => {
|
|
29
29
|
}) => event instanceof MouseEvent && isFunction(done)
|
|
30
30
|
};
|
|
@@ -51,6 +51,14 @@ const Button = /* @__PURE__ */ defineComponent({
|
|
|
51
51
|
state.loading = false;
|
|
52
52
|
useOverlay.hide();
|
|
53
53
|
};
|
|
54
|
+
const handleLoading = (loadingFunction) => {
|
|
55
|
+
state.loading = true;
|
|
56
|
+
execFunction(loadingFunction).then().catch((error) => {
|
|
57
|
+
consoleError("FaButton", error);
|
|
58
|
+
}).finally(() => {
|
|
59
|
+
state.loading = false;
|
|
60
|
+
});
|
|
61
|
+
};
|
|
54
62
|
const handleClick = (event) => {
|
|
55
63
|
if (props.disabledLoading) {
|
|
56
64
|
emit("click", event);
|
|
@@ -96,7 +104,9 @@ const Button = /* @__PURE__ */ defineComponent({
|
|
|
96
104
|
/** @description 是否在两个字符之间插入空格 */
|
|
97
105
|
shouldAddSpace: computed(() => buttonRef.value?.shouldAddSpace),
|
|
98
106
|
/** @description 加载状态 */
|
|
99
|
-
loading: computed(() => state.loading)
|
|
107
|
+
loading: computed(() => state.loading),
|
|
108
|
+
/** @description 按钮加载 */
|
|
109
|
+
doLoading: handleLoading
|
|
100
110
|
});
|
|
101
111
|
}
|
|
102
112
|
});
|