@keyblade/pro-components 1.13.8-alpha.34 → 1.13.8-alpha.36

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.
Files changed (87) hide show
  1. package/es/components.d.ts +2 -0
  2. package/es/global-props.d.ts +12 -6
  3. package/es/index.d.ts +2 -0
  4. package/es/index.js +46 -38
  5. package/es/inerface.d.ts +4 -2
  6. package/es/pro-calendar/calendar.vue.d.ts +4 -4
  7. package/es/pro-calendar/header.vue.d.ts +1 -1
  8. package/es/pro-calendar/index.d.ts +21 -21
  9. package/es/pro-calendar/month.vue.d.ts +1 -1
  10. package/es/pro-calendar/week.vue.d.ts +1 -1
  11. package/es/pro-calendar/year.vue.d.ts +1 -1
  12. package/es/pro-date-range-picker/index.d.ts +12 -11
  13. package/es/pro-date-range-picker/pro-date-range-picker.vue.d.ts +3 -2
  14. package/es/pro-date-range-picker/pro-date-range-picker.vue.js +2 -2
  15. package/es/pro-date-range-picker/pro-date-range-picker.vue2.js +68 -64
  16. package/es/pro-dates-picker/index.d.ts +6 -6
  17. package/es/pro-dates-picker/index.vue.d.ts +2 -2
  18. package/es/pro-find-password/enum.d.ts +8 -0
  19. package/es/pro-find-password/enum.js +4 -0
  20. package/es/pro-find-password/index.d.ts +9 -0
  21. package/es/pro-find-password/index.js +12 -0
  22. package/es/pro-find-password/index.vue.d.ts +3695 -0
  23. package/es/pro-find-password/index.vue.js +178 -0
  24. package/es/pro-find-password/index.vue3.js +5 -0
  25. package/es/pro-find-password/interface.d.ts +45 -0
  26. package/es/pro-find-password/reset-password.vue.d.ts +400 -0
  27. package/es/pro-find-password/reset-password.vue.js +181 -0
  28. package/es/pro-find-password/reset-password.vue2.js +4 -0
  29. package/es/pro-find-password/verify-user-name.vue.d.ts +413 -0
  30. package/es/pro-find-password/verify-user-name.vue.js +114 -0
  31. package/es/pro-find-password/verify-user-name.vue3.js +5 -0
  32. package/es/pro-footer-bar/index.d.ts +3 -3
  33. package/es/pro-footer-bar/index.vue.d.ts +1 -1
  34. package/es/pro-footer-bar/index.vue.js +2 -2
  35. package/es/pro-form-group/index.d.ts +6 -6
  36. package/es/pro-form-group/index.vue.d.ts +2 -2
  37. package/es/pro-form-group/index.vue.js +1 -1
  38. package/es/pro-image-upload/image-upload.vue.d.ts +1 -1
  39. package/es/pro-image-upload/index.d.ts +3 -3
  40. package/es/pro-layout/index.d.ts +5 -3
  41. package/es/pro-layout/pro-layout.vue.d.ts +3 -1
  42. package/es/pro-layout/pro-layout.vue.js +92 -89
  43. package/es/pro-loader/index.d.ts +3 -3
  44. package/es/pro-loader/index.vue.d.ts +1 -1
  45. package/es/pro-login/enum.d.ts +6 -0
  46. package/es/pro-login/enum.js +4 -0
  47. package/es/pro-login/form-mobile.vue.d.ts +415 -0
  48. package/es/pro-login/form-mobile.vue.js +148 -0
  49. package/es/pro-login/form-mobile.vue2.js +4 -0
  50. package/es/pro-login/form-password.vue.d.ts +393 -0
  51. package/es/pro-login/form-password.vue.js +101 -0
  52. package/es/pro-login/form-password.vue2.js +4 -0
  53. package/es/pro-login/index.d.ts +9 -0
  54. package/es/pro-login/index.js +12 -0
  55. package/es/pro-login/index.vue.d.ts +3665 -0
  56. package/es/pro-login/index.vue.js +107 -0
  57. package/es/pro-login/index.vue3.js +5 -0
  58. package/es/pro-login/interface.d.ts +72 -0
  59. package/es/pro-login/regexp.d.ts +17 -0
  60. package/es/pro-login/regexp.js +28 -0
  61. package/es/pro-page-container/constant.d.ts +2 -0
  62. package/es/pro-page-container/constant.js +9 -0
  63. package/es/pro-page-container/index.d.ts +6 -33
  64. package/es/pro-page-container/interface.d.ts +12 -0
  65. package/es/pro-page-container/pro-page-container.vue.d.ts +4 -19
  66. package/es/pro-page-container/pro-page-container.vue.js +51 -38
  67. package/es/pro-page-header/constant.d.ts +2 -0
  68. package/es/pro-page-header/constant.js +13 -0
  69. package/es/pro-page-header/index.d.ts +3 -153
  70. package/es/pro-page-header/interface.d.ts +21 -0
  71. package/es/pro-page-header/pro-page-header.vue.d.ts +2 -105
  72. package/es/pro-page-header/pro-page-header.vue.js +140 -126
  73. package/es/pro-reuse-tabs/index.d.ts +3 -3
  74. package/es/pro-reuse-tabs/pro-reuse-tabs.vue.d.ts +1 -1
  75. package/es/pro-table/index.d.ts +9 -9
  76. package/es/pro-table/index.vue.d.ts +3 -3
  77. package/es/pro-textarea/index.d.ts +4 -4
  78. package/es/pro-textarea/index.vue.d.ts +1 -1
  79. package/es/pro-textarea/index.vue.js +2 -2
  80. package/es/pro-textarea/{inerface.d.ts → interface.d.ts} +19 -18
  81. package/es/style.css +1 -1
  82. package/package.json +2 -1
  83. package/es/pro-page-container/inerface.d.ts +0 -12
  84. /package/es/pro-calendar/{inerface.d.ts → interface.d.ts} +0 -0
  85. /package/es/pro-date-range-picker/{inerface.d.ts → interface.d.ts} +0 -0
  86. /package/es/pro-dates-picker/{inerface.d.ts → interface.d.ts} +0 -0
  87. /package/es/pro-footer-bar/{inerface.d.ts → interface.d.ts} +0 -0
@@ -1,8 +1,8 @@
1
1
  import { App } from 'vue';
2
2
  declare const ProLoader: {
3
3
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./interface').IProLoader> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
4
- loading: boolean;
5
4
  size: number | string;
5
+ loading: boolean;
6
6
  animation: import('./interface').IProLoaderAnimation;
7
7
  tip: string;
8
8
  }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
@@ -15,8 +15,8 @@ declare const ProLoader: {
15
15
  M: {};
16
16
  Defaults: {};
17
17
  }, Readonly<import('./interface').IProLoader> & Readonly<{}>, {}, {}, {}, {}, {
18
- loading: boolean;
19
18
  size: number | string;
19
+ loading: boolean;
20
20
  animation: import('./interface').IProLoaderAnimation;
21
21
  tip: string;
22
22
  }>;
@@ -24,8 +24,8 @@ declare const ProLoader: {
24
24
  __isTeleport?: never;
25
25
  __isSuspense?: never;
26
26
  } & import('vue').ComponentOptionsBase<Readonly<import('./interface').IProLoader> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
27
- loading: boolean;
28
27
  size: number | string;
28
+ loading: boolean;
29
29
  animation: import('./interface').IProLoaderAnimation;
30
30
  tip: string;
31
31
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
@@ -12,8 +12,8 @@ declare function __VLS_template(): {
12
12
  };
13
13
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
14
  declare const __VLS_component: import('vue').DefineComponent<IProLoader, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IProLoader> & Readonly<{}>, {
15
- loading: boolean;
16
15
  size: number | string;
16
+ loading: boolean;
17
17
  animation: import('./interface').IProLoaderAnimation;
18
18
  tip: string;
19
19
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
@@ -0,0 +1,6 @@
1
+ export declare enum EProLoginType {
2
+ /** 短信登录 */
3
+ mobile = 1,
4
+ /** 密码登录 */
5
+ password = 2
6
+ }
@@ -0,0 +1,4 @@
1
+ var a = /* @__PURE__ */ ((s) => (s[s.mobile = 1] = "mobile", s[s.password = 2] = "password", s))(a || {});
2
+ export {
3
+ a as EProLoginType
4
+ };
@@ -0,0 +1,415 @@
1
+ import { IProLoginByMobile, MobileFormField } from './interface';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ 'area-code'?(_: {}): any;
6
+ };
7
+ refs: {
8
+ formRef: unknown;
9
+ };
10
+ rootEl: any;
11
+ };
12
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
+ declare const __VLS_component: import('vue').DefineComponent<IProLoginByMobile, {
14
+ formRef: import('vue').Ref<import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
15
+ model: {
16
+ type: ObjectConstructor;
17
+ required: true;
18
+ };
19
+ layout: {
20
+ type: import('vue').PropType<"horizontal" | "vertical" | "inline">;
21
+ default: string;
22
+ };
23
+ size: {
24
+ type: import('vue').PropType<"mini" | "small" | "medium" | "large">;
25
+ };
26
+ labelColProps: {
27
+ type: ObjectConstructor;
28
+ default: () => {
29
+ span: number;
30
+ offset: number;
31
+ };
32
+ };
33
+ wrapperColProps: {
34
+ type: ObjectConstructor;
35
+ default: () => {
36
+ span: number;
37
+ offset: number;
38
+ };
39
+ };
40
+ labelColStyle: ObjectConstructor;
41
+ wrapperColStyle: ObjectConstructor;
42
+ labelAlign: {
43
+ type: import('vue').PropType<"left" | "right">;
44
+ default: string;
45
+ };
46
+ disabled: {
47
+ type: BooleanConstructor;
48
+ default: undefined;
49
+ };
50
+ rules: {
51
+ type: import('vue').PropType<Record<string, import('@arco-design/web-vue').FieldRule<any> | import('@arco-design/web-vue').FieldRule<any>[]>>;
52
+ };
53
+ autoLabelWidth: {
54
+ type: BooleanConstructor;
55
+ default: boolean;
56
+ };
57
+ id: {
58
+ type: StringConstructor;
59
+ };
60
+ scrollToFirstError: {
61
+ type: BooleanConstructor;
62
+ default: boolean;
63
+ };
64
+ }>> & Readonly<{
65
+ onSubmit?: ((data: {
66
+ values: Record<string, any>;
67
+ errors: Record<string, import('@arco-design/web-vue').ValidatedError> | undefined;
68
+ }, ev: Event) => any) | undefined;
69
+ onSubmitSuccess?: ((values: Record<string, any>, ev: Event) => any) | undefined;
70
+ onSubmitFailed?: ((data: {
71
+ values: Record<string, any>;
72
+ errors: Record<string, import('@arco-design/web-vue').ValidatedError>;
73
+ }, ev: Event) => any) | undefined;
74
+ }>, {
75
+ cls: import('vue').ComputedRef<(string | {
76
+ [x: string]: boolean;
77
+ })[]>;
78
+ formRef: import('vue').Ref<HTMLFormElement | undefined, HTMLFormElement | undefined>;
79
+ handleSubmit: (e: Event) => void;
80
+ innerValidate: (callback?: ((errors: undefined | Record<string, import('@arco-design/web-vue').ValidatedError>) => void) | undefined) => Promise<undefined | Record<string, import('@arco-design/web-vue').ValidatedError>>;
81
+ innerValidateField: (field: string | string[], callback?: ((errors: undefined | Record<string, import('@arco-design/web-vue').ValidatedError>) => void) | undefined) => Promise<Record<string, import('@arco-design/web-vue').ValidatedError> | undefined>;
82
+ innerResetFields: (field?: string | string[] | undefined) => void;
83
+ innerClearValidate: (field?: string | string[] | undefined) => void;
84
+ innerSetFields: (data: Record<string, import('@arco-design/web-vue/es/form/interface').FieldData>) => void;
85
+ innerScrollToField: (field: string, options?: import('../../node_modules/scroll-into-view-if-needed').Options<any> | undefined) => void;
86
+ }, {}, {}, {
87
+ validate(callback?: ((errors: undefined | Record<string, import('@arco-design/web-vue').ValidatedError>) => void) | undefined): Promise<undefined | Record<string, import('@arco-design/web-vue').ValidatedError>>;
88
+ validateField(field: string | string[], callback?: ((errors: undefined | Record<string, import('@arco-design/web-vue').ValidatedError>) => void) | undefined): Promise<undefined | Record<string, import('@arco-design/web-vue').ValidatedError>>;
89
+ resetFields(field?: string | string[] | undefined): void;
90
+ clearValidate(field?: string | string[] | undefined): void;
91
+ setFields(data: Record<string, import('@arco-design/web-vue/es/form/interface').FieldData>): void;
92
+ scrollToField(field: string): void;
93
+ }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
94
+ submit: (data: {
95
+ values: Record<string, any>;
96
+ errors: Record<string, import('@arco-design/web-vue').ValidatedError> | undefined;
97
+ }, ev: Event) => true;
98
+ submitSuccess: (values: Record<string, any>, ev: Event) => true;
99
+ submitFailed: (data: {
100
+ values: Record<string, any>;
101
+ errors: Record<string, import('@arco-design/web-vue').ValidatedError>;
102
+ }, ev: Event) => true;
103
+ }, import('vue').PublicProps, {
104
+ disabled: boolean;
105
+ layout: "horizontal" | "vertical" | "inline";
106
+ labelColProps: Record<string, any>;
107
+ wrapperColProps: Record<string, any>;
108
+ labelAlign: "left" | "right";
109
+ autoLabelWidth: boolean;
110
+ scrollToFirstError: boolean;
111
+ }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
112
+ P: {};
113
+ B: {};
114
+ D: {};
115
+ C: {};
116
+ M: {};
117
+ Defaults: {};
118
+ }, Readonly<import('vue').ExtractPropTypes<{
119
+ model: {
120
+ type: ObjectConstructor;
121
+ required: true;
122
+ };
123
+ layout: {
124
+ type: import('vue').PropType<"horizontal" | "vertical" | "inline">;
125
+ default: string;
126
+ };
127
+ size: {
128
+ type: import('vue').PropType<"mini" | "small" | "medium" | "large">;
129
+ };
130
+ labelColProps: {
131
+ type: ObjectConstructor;
132
+ default: () => {
133
+ span: number;
134
+ offset: number;
135
+ };
136
+ };
137
+ wrapperColProps: {
138
+ type: ObjectConstructor;
139
+ default: () => {
140
+ span: number;
141
+ offset: number;
142
+ };
143
+ };
144
+ labelColStyle: ObjectConstructor;
145
+ wrapperColStyle: ObjectConstructor;
146
+ labelAlign: {
147
+ type: import('vue').PropType<"left" | "right">;
148
+ default: string;
149
+ };
150
+ disabled: {
151
+ type: BooleanConstructor;
152
+ default: undefined;
153
+ };
154
+ rules: {
155
+ type: import('vue').PropType<Record<string, import('@arco-design/web-vue').FieldRule<any> | import('@arco-design/web-vue').FieldRule<any>[]>>;
156
+ };
157
+ autoLabelWidth: {
158
+ type: BooleanConstructor;
159
+ default: boolean;
160
+ };
161
+ id: {
162
+ type: StringConstructor;
163
+ };
164
+ scrollToFirstError: {
165
+ type: BooleanConstructor;
166
+ default: boolean;
167
+ };
168
+ }>> & Readonly<{
169
+ onSubmit?: ((data: {
170
+ values: Record<string, any>;
171
+ errors: Record<string, import('@arco-design/web-vue').ValidatedError> | undefined;
172
+ }, ev: Event) => any) | undefined;
173
+ onSubmitSuccess?: ((values: Record<string, any>, ev: Event) => any) | undefined;
174
+ onSubmitFailed?: ((data: {
175
+ values: Record<string, any>;
176
+ errors: Record<string, import('@arco-design/web-vue').ValidatedError>;
177
+ }, ev: Event) => any) | undefined;
178
+ }>, {
179
+ cls: import('vue').ComputedRef<(string | {
180
+ [x: string]: boolean;
181
+ })[]>;
182
+ formRef: import('vue').Ref<HTMLFormElement | undefined, HTMLFormElement | undefined>;
183
+ handleSubmit: (e: Event) => void;
184
+ innerValidate: (callback?: ((errors: undefined | Record<string, import('@arco-design/web-vue').ValidatedError>) => void) | undefined) => Promise<undefined | Record<string, import('@arco-design/web-vue').ValidatedError>>;
185
+ innerValidateField: (field: string | string[], callback?: ((errors: undefined | Record<string, import('@arco-design/web-vue').ValidatedError>) => void) | undefined) => Promise<Record<string, import('@arco-design/web-vue').ValidatedError> | undefined>;
186
+ innerResetFields: (field?: string | string[] | undefined) => void;
187
+ innerClearValidate: (field?: string | string[] | undefined) => void;
188
+ innerSetFields: (data: Record<string, import('@arco-design/web-vue/es/form/interface').FieldData>) => void;
189
+ innerScrollToField: (field: string, options?: import('../../node_modules/scroll-into-view-if-needed').Options<any> | undefined) => void;
190
+ }, {}, {}, {
191
+ validate(callback?: ((errors: undefined | Record<string, import('@arco-design/web-vue').ValidatedError>) => void) | undefined): Promise<undefined | Record<string, import('@arco-design/web-vue').ValidatedError>>;
192
+ validateField(field: string | string[], callback?: ((errors: undefined | Record<string, import('@arco-design/web-vue').ValidatedError>) => void) | undefined): Promise<undefined | Record<string, import('@arco-design/web-vue').ValidatedError>>;
193
+ resetFields(field?: string | string[] | undefined): void;
194
+ clearValidate(field?: string | string[] | undefined): void;
195
+ setFields(data: Record<string, import('@arco-design/web-vue/es/form/interface').FieldData>): void;
196
+ scrollToField(field: string): void;
197
+ }, {
198
+ disabled: boolean;
199
+ layout: "horizontal" | "vertical" | "inline";
200
+ labelColProps: Record<string, any>;
201
+ wrapperColProps: Record<string, any>;
202
+ labelAlign: "left" | "right";
203
+ autoLabelWidth: boolean;
204
+ scrollToFirstError: boolean;
205
+ }> | undefined, import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
206
+ model: {
207
+ type: ObjectConstructor;
208
+ required: true;
209
+ };
210
+ layout: {
211
+ type: import('vue').PropType<"horizontal" | "vertical" | "inline">;
212
+ default: string;
213
+ };
214
+ size: {
215
+ type: import('vue').PropType<"mini" | "small" | "medium" | "large">;
216
+ };
217
+ labelColProps: {
218
+ type: ObjectConstructor;
219
+ default: () => {
220
+ span: number;
221
+ offset: number;
222
+ };
223
+ };
224
+ wrapperColProps: {
225
+ type: ObjectConstructor;
226
+ default: () => {
227
+ span: number;
228
+ offset: number;
229
+ };
230
+ };
231
+ labelColStyle: ObjectConstructor;
232
+ wrapperColStyle: ObjectConstructor;
233
+ labelAlign: {
234
+ type: import('vue').PropType<"left" | "right">;
235
+ default: string;
236
+ };
237
+ disabled: {
238
+ type: BooleanConstructor;
239
+ default: undefined;
240
+ };
241
+ rules: {
242
+ type: import('vue').PropType<Record<string, import('@arco-design/web-vue').FieldRule<any> | import('@arco-design/web-vue').FieldRule<any>[]>>;
243
+ };
244
+ autoLabelWidth: {
245
+ type: BooleanConstructor;
246
+ default: boolean;
247
+ };
248
+ id: {
249
+ type: StringConstructor;
250
+ };
251
+ scrollToFirstError: {
252
+ type: BooleanConstructor;
253
+ default: boolean;
254
+ };
255
+ }>> & Readonly<{
256
+ onSubmit?: ((data: {
257
+ values: Record<string, any>;
258
+ errors: Record<string, import('@arco-design/web-vue').ValidatedError> | undefined;
259
+ }, ev: Event) => any) | undefined;
260
+ onSubmitSuccess?: ((values: Record<string, any>, ev: Event) => any) | undefined;
261
+ onSubmitFailed?: ((data: {
262
+ values: Record<string, any>;
263
+ errors: Record<string, import('@arco-design/web-vue').ValidatedError>;
264
+ }, ev: Event) => any) | undefined;
265
+ }>, {
266
+ cls: import('vue').ComputedRef<(string | {
267
+ [x: string]: boolean;
268
+ })[]>;
269
+ formRef: import('vue').Ref<HTMLFormElement | undefined, HTMLFormElement | undefined>;
270
+ handleSubmit: (e: Event) => void;
271
+ innerValidate: (callback?: ((errors: undefined | Record<string, import('@arco-design/web-vue').ValidatedError>) => void) | undefined) => Promise<undefined | Record<string, import('@arco-design/web-vue').ValidatedError>>;
272
+ innerValidateField: (field: string | string[], callback?: ((errors: undefined | Record<string, import('@arco-design/web-vue').ValidatedError>) => void) | undefined) => Promise<Record<string, import('@arco-design/web-vue').ValidatedError> | undefined>;
273
+ innerResetFields: (field?: string | string[] | undefined) => void;
274
+ innerClearValidate: (field?: string | string[] | undefined) => void;
275
+ innerSetFields: (data: Record<string, import('@arco-design/web-vue/es/form/interface').FieldData>) => void;
276
+ innerScrollToField: (field: string, options?: import('../../node_modules/scroll-into-view-if-needed').Options<any> | undefined) => void;
277
+ }, {}, {}, {
278
+ validate(callback?: ((errors: undefined | Record<string, import('@arco-design/web-vue').ValidatedError>) => void) | undefined): Promise<undefined | Record<string, import('@arco-design/web-vue').ValidatedError>>;
279
+ validateField(field: string | string[], callback?: ((errors: undefined | Record<string, import('@arco-design/web-vue').ValidatedError>) => void) | undefined): Promise<undefined | Record<string, import('@arco-design/web-vue').ValidatedError>>;
280
+ resetFields(field?: string | string[] | undefined): void;
281
+ clearValidate(field?: string | string[] | undefined): void;
282
+ setFields(data: Record<string, import('@arco-design/web-vue/es/form/interface').FieldData>): void;
283
+ scrollToField(field: string): void;
284
+ }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
285
+ submit: (data: {
286
+ values: Record<string, any>;
287
+ errors: Record<string, import('@arco-design/web-vue').ValidatedError> | undefined;
288
+ }, ev: Event) => true;
289
+ submitSuccess: (values: Record<string, any>, ev: Event) => true;
290
+ submitFailed: (data: {
291
+ values: Record<string, any>;
292
+ errors: Record<string, import('@arco-design/web-vue').ValidatedError>;
293
+ }, ev: Event) => true;
294
+ }, import('vue').PublicProps, {
295
+ disabled: boolean;
296
+ layout: "horizontal" | "vertical" | "inline";
297
+ labelColProps: Record<string, any>;
298
+ wrapperColProps: Record<string, any>;
299
+ labelAlign: "left" | "right";
300
+ autoLabelWidth: boolean;
301
+ scrollToFirstError: boolean;
302
+ }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
303
+ P: {};
304
+ B: {};
305
+ D: {};
306
+ C: {};
307
+ M: {};
308
+ Defaults: {};
309
+ }, Readonly<import('vue').ExtractPropTypes<{
310
+ model: {
311
+ type: ObjectConstructor;
312
+ required: true;
313
+ };
314
+ layout: {
315
+ type: import('vue').PropType<"horizontal" | "vertical" | "inline">;
316
+ default: string;
317
+ };
318
+ size: {
319
+ type: import('vue').PropType<"mini" | "small" | "medium" | "large">;
320
+ };
321
+ labelColProps: {
322
+ type: ObjectConstructor;
323
+ default: () => {
324
+ span: number;
325
+ offset: number;
326
+ };
327
+ };
328
+ wrapperColProps: {
329
+ type: ObjectConstructor;
330
+ default: () => {
331
+ span: number;
332
+ offset: number;
333
+ };
334
+ };
335
+ labelColStyle: ObjectConstructor;
336
+ wrapperColStyle: ObjectConstructor;
337
+ labelAlign: {
338
+ type: import('vue').PropType<"left" | "right">;
339
+ default: string;
340
+ };
341
+ disabled: {
342
+ type: BooleanConstructor;
343
+ default: undefined;
344
+ };
345
+ rules: {
346
+ type: import('vue').PropType<Record<string, import('@arco-design/web-vue').FieldRule<any> | import('@arco-design/web-vue').FieldRule<any>[]>>;
347
+ };
348
+ autoLabelWidth: {
349
+ type: BooleanConstructor;
350
+ default: boolean;
351
+ };
352
+ id: {
353
+ type: StringConstructor;
354
+ };
355
+ scrollToFirstError: {
356
+ type: BooleanConstructor;
357
+ default: boolean;
358
+ };
359
+ }>> & Readonly<{
360
+ onSubmit?: ((data: {
361
+ values: Record<string, any>;
362
+ errors: Record<string, import('@arco-design/web-vue').ValidatedError> | undefined;
363
+ }, ev: Event) => any) | undefined;
364
+ onSubmitSuccess?: ((values: Record<string, any>, ev: Event) => any) | undefined;
365
+ onSubmitFailed?: ((data: {
366
+ values: Record<string, any>;
367
+ errors: Record<string, import('@arco-design/web-vue').ValidatedError>;
368
+ }, ev: Event) => any) | undefined;
369
+ }>, {
370
+ cls: import('vue').ComputedRef<(string | {
371
+ [x: string]: boolean;
372
+ })[]>;
373
+ formRef: import('vue').Ref<HTMLFormElement | undefined, HTMLFormElement | undefined>;
374
+ handleSubmit: (e: Event) => void;
375
+ innerValidate: (callback?: ((errors: undefined | Record<string, import('@arco-design/web-vue').ValidatedError>) => void) | undefined) => Promise<undefined | Record<string, import('@arco-design/web-vue').ValidatedError>>;
376
+ innerValidateField: (field: string | string[], callback?: ((errors: undefined | Record<string, import('@arco-design/web-vue').ValidatedError>) => void) | undefined) => Promise<Record<string, import('@arco-design/web-vue').ValidatedError> | undefined>;
377
+ innerResetFields: (field?: string | string[] | undefined) => void;
378
+ innerClearValidate: (field?: string | string[] | undefined) => void;
379
+ innerSetFields: (data: Record<string, import('@arco-design/web-vue/es/form/interface').FieldData>) => void;
380
+ innerScrollToField: (field: string, options?: import('../../node_modules/scroll-into-view-if-needed').Options<any> | undefined) => void;
381
+ }, {}, {}, {
382
+ validate(callback?: ((errors: undefined | Record<string, import('@arco-design/web-vue').ValidatedError>) => void) | undefined): Promise<undefined | Record<string, import('@arco-design/web-vue').ValidatedError>>;
383
+ validateField(field: string | string[], callback?: ((errors: undefined | Record<string, import('@arco-design/web-vue').ValidatedError>) => void) | undefined): Promise<undefined | Record<string, import('@arco-design/web-vue').ValidatedError>>;
384
+ resetFields(field?: string | string[] | undefined): void;
385
+ clearValidate(field?: string | string[] | undefined): void;
386
+ setFields(data: Record<string, import('@arco-design/web-vue/es/form/interface').FieldData>): void;
387
+ scrollToField(field: string): void;
388
+ }, {
389
+ disabled: boolean;
390
+ layout: "horizontal" | "vertical" | "inline";
391
+ labelColProps: Record<string, any>;
392
+ wrapperColProps: Record<string, any>;
393
+ labelAlign: "left" | "right";
394
+ autoLabelWidth: boolean;
395
+ scrollToFirstError: boolean;
396
+ }> | undefined>;
397
+ resetTime: () => void;
398
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
399
+ submit: (value: MobileFormField) => any;
400
+ "send-sms-code": (value: string) => any;
401
+ }, string, import('vue').PublicProps, Readonly<IProLoginByMobile> & Readonly<{
402
+ onSubmit?: ((value: MobileFormField) => any) | undefined;
403
+ "onSend-sms-code"?: ((value: string) => any) | undefined;
404
+ }>, {
405
+ countdown: number;
406
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
407
+ formRef: unknown;
408
+ }, any>;
409
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
410
+ export default _default;
411
+ type __VLS_WithTemplateSlots<T, S> = T & {
412
+ new (): {
413
+ $slots: S;
414
+ };
415
+ };
@@ -0,0 +1,148 @@
1
+ import { defineComponent as x, ref as r, useSlots as T, onBeforeUnmount as D, resolveComponent as d, createBlock as g, openBlock as u, normalizeClass as p, withCtx as t, createVNode as n, mergeProps as f, renderSlot as E, createElementBlock as k, unref as F, createTextVNode as I, toDisplayString as K, normalizeProps as j, guardReactiveProps as A } from "vue";
2
+ import { regexp as V, message as N } from "./regexp.js";
3
+ const G = { key: 1 }, L = /* @__PURE__ */ x({
4
+ __name: "form-mobile",
5
+ props: {
6
+ inputProps: {},
7
+ formItemProps: {},
8
+ countdown: { default: 60 },
9
+ onSendSmsCode: {},
10
+ onSubmitSuccess: {},
11
+ "update:activeKey": {},
12
+ prefixClsName: {}
13
+ },
14
+ emits: ["submit", "send-sms-code"],
15
+ setup(_, { expose: $, emit: w }) {
16
+ const v = _, C = w, m = r(), a = r({
17
+ mobile: "",
18
+ validCode: ""
19
+ }), z = T(), s = r(v.countdown), i = r(), B = {
20
+ mobile: [{
21
+ required: !0,
22
+ message: "手机号不能为空"
23
+ }, {
24
+ validator: (o, e) => {
25
+ V.mobile.test(o) || e(N.mobile);
26
+ }
27
+ }],
28
+ validCode: [{
29
+ required: !0,
30
+ message: "验证码不能为空"
31
+ }, {
32
+ validator: (o, e) => {
33
+ V.validCode.test(o) || e(N.validCode);
34
+ }
35
+ }]
36
+ };
37
+ D(() => {
38
+ i.value && c();
39
+ });
40
+ const y = (o) => {
41
+ var e;
42
+ (e = m.value) == null || e.clearValidate(o);
43
+ }, c = () => {
44
+ s.value = v.countdown, clearInterval(i.value), i.value = void 0;
45
+ }, R = () => {
46
+ var o;
47
+ (o = m.value) == null || o.validateField("mobile", (e) => {
48
+ if (!e && s.value >= 60) {
49
+ if (i.value)
50
+ return;
51
+ C("send-sms-code", a.value.mobile), s.value--, i.value = setInterval(() => {
52
+ s.value > 0 ? s.value-- : c();
53
+ }, 1e3);
54
+ }
55
+ });
56
+ }, U = () => {
57
+ C("submit", a.value);
58
+ };
59
+ return $({
60
+ formRef: m,
61
+ resetTime: c
62
+ }), (o, e) => {
63
+ const P = d("a-input"), b = d("a-form-item"), S = d("a-button"), q = d("a-form");
64
+ return u(), g(q, {
65
+ ref_key: "formRef",
66
+ ref: m,
67
+ model: a.value,
68
+ rules: B,
69
+ class: p(`${o.prefixClsName}-mobile`),
70
+ onSubmitSuccess: U
71
+ }, {
72
+ default: t(() => [
73
+ n(b, f({ field: "mobile" }, o.formItemProps), {
74
+ default: t(() => [
75
+ n(P, f(o.inputProps, {
76
+ modelValue: a.value.mobile,
77
+ "onUpdate:modelValue": e[0] || (e[0] = (l) => a.value.mobile = l),
78
+ "max-length": 11,
79
+ placeholder: "请输入用户名/手机号",
80
+ onInput: e[1] || (e[1] = (l) => y("mobile"))
81
+ }), {
82
+ prepend: t(() => [
83
+ F(z)["area-code"] ? E(o.$slots, "area-code", { key: 0 }) : (u(), k("div", G, "+86"))
84
+ ]),
85
+ _: 3
86
+ }, 16, ["modelValue"])
87
+ ]),
88
+ _: 3
89
+ }, 16),
90
+ n(b, f({ field: "validCode" }, o.formItemProps), {
91
+ default: t(() => [
92
+ n(P, f(o.inputProps, {
93
+ modelValue: a.value.validCode,
94
+ "onUpdate:modelValue": e[2] || (e[2] = (l) => a.value.validCode = l),
95
+ "max-length": 6,
96
+ placeholder: "请输入短信验证码",
97
+ onInput: e[3] || (e[3] = (l) => y("validCode"))
98
+ }), {
99
+ append: t(() => [
100
+ s.value >= v.countdown ? (u(), g(S, {
101
+ key: 0,
102
+ type: "outline",
103
+ class: p(`${o.prefixClsName}-mobile-send-code`),
104
+ onClick: R
105
+ }, {
106
+ default: t(() => e[4] || (e[4] = [
107
+ I(" 获取短信验证码 ")
108
+ ])),
109
+ _: 1
110
+ }, 8, ["class"])) : (u(), k("div", {
111
+ key: 1,
112
+ class: p(`${o.prefixClsName}-mobile-time`)
113
+ }, K(s.value) + "秒后可重新发送 ", 3))
114
+ ]),
115
+ _: 1
116
+ }, 16, ["modelValue"])
117
+ ]),
118
+ _: 1
119
+ }, 16),
120
+ n(b, j(A(o.formItemProps)), {
121
+ default: t(() => {
122
+ var l;
123
+ return [
124
+ n(S, {
125
+ type: "primary",
126
+ long: "",
127
+ "html-type": "submit",
128
+ size: (l = o.inputProps) == null ? void 0 : l.size,
129
+ class: p(`${o.prefixClsName}-submit`)
130
+ }, {
131
+ default: t(() => e[5] || (e[5] = [
132
+ I("登录")
133
+ ])),
134
+ _: 1
135
+ }, 8, ["size", "class"])
136
+ ];
137
+ }),
138
+ _: 1
139
+ }, 16)
140
+ ]),
141
+ _: 3
142
+ }, 8, ["model", "class"]);
143
+ };
144
+ }
145
+ });
146
+ export {
147
+ L as default
148
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./form-mobile.vue.js";
2
+ export {
3
+ f as default
4
+ };