1
- export default ( ) => {
2
- return { }
1
+ export default ( tabSize : string ) => {
2
+ return {
3
+ "a-rules:required" : `{ required: true, message: '$1', trigger: 'change' }` ,
4
+ "a-rules:max" : `{ min: 3, max: 5, message: '$1', trigger: 'blur' }` ,
5
+ "a-form:resetForm" : `const resetForm = () => {
6
+ ${ tabSize } formRef.value.resetFields();
7
+ };` ,
8
+ "a-form:submit" : `const onSubmit = () => {
9
+ ${ tabSize } formRef.value
10
+ ${ tabSize } .validate()
11
+ ${ tabSize } .then(() => {
12
+ ${ tabSize } ${ tabSize } console.log('values', formState, toRaw(formState));
13
+ ${ tabSize } })
14
+ ${ tabSize } .catch(error => {
15
+ ${ tabSize } ${ tabSize } console.log('error', error);
16
+ ${ tabSize } });
17
+ };` ,
18
+ "a-message:info" : `message.info('$1')` ,
19
+ "a-message:success" : `message.success('$1')` ,
20
+ "a-message:error" : `message.error('$1')` ,
21
+ "a-message:warning" : `message.warning('$1')` ,
22
+ "a-notification:success" : `notification.success({
23
+ ${ tabSize } message: '$1',
24
+ ${ tabSize } description: '$2',
25
+ })` ,
26
+ "a-notification:info" : `notification.info({
27
+ ${ tabSize } message: '$1',
28
+ ${ tabSize } description: '$2',
29
+ })` ,
30
+ "a-notification:error" : `notification.error({
31
+ ${ tabSize } message: '$1',
32
+ ${ tabSize } description: '$2',
33
+ })` ,
34
+ "a-notification:warning" : `notification.warning({
35
+ ${ tabSize } message: '$1',
36
+ ${ tabSize } description: '$2',
37
+ })` ,
38
+ }
3
39
}
0 commit comments