el-plus-crud 0.0.11 → 0.0.13
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/CHANGELOG.md +4 -0
- package/README.md +115 -3
- package/build.js +31 -9
- package/dist/components/el-plus-form/ElPlusForm.vue.d.ts +320 -0
- package/dist/components/el-plus-form/ElPlusFormDialog.vue.d.ts +74 -0
- package/dist/components/el-plus-form/components/ElPlusFormArea.vue.d.ts +44 -0
- package/dist/components/el-plus-form/components/ElPlusFormAutocomplete.vue.d.ts +55 -0
- package/dist/components/el-plus-form/components/ElPlusFormBtn.vue.d.ts +44 -0
- package/dist/components/el-plus-form/components/ElPlusFormBtns.vue.d.ts +42 -0
- package/dist/components/el-plus-form/components/ElPlusFormCascader.vue.d.ts +44 -0
- package/dist/components/el-plus-form/components/ElPlusFormCascaderPanel.vue.d.ts +51 -0
- package/dist/components/el-plus-form/components/ElPlusFormCheckbox.vue.d.ts +44 -0
- package/dist/components/el-plus-form/components/ElPlusFormCheckboxButton.vue.d.ts +44 -0
- package/dist/components/el-plus-form/components/ElPlusFormColor.vue.d.ts +44 -0
- package/dist/components/el-plus-form/components/ElPlusFormDate.vue.d.ts +44 -0
- package/dist/components/el-plus-form/components/ElPlusFormDaterange.vue.d.ts +51 -0
- package/dist/components/el-plus-form/components/ElPlusFormDatetime.vue.d.ts +44 -0
- package/dist/components/el-plus-form/components/ElPlusFormFile.vue.d.ts +48 -0
- package/dist/components/el-plus-form/components/ElPlusFormImage.vue.d.ts +48 -0
- package/dist/components/el-plus-form/components/ElPlusFormInput.vue.d.ts +50 -0
- package/dist/components/el-plus-form/components/ElPlusFormLink.vue.d.ts +53 -0
- package/dist/components/el-plus-form/components/ElPlusFormNbinput.vue.d.ts +61 -0
- package/dist/components/el-plus-form/components/ElPlusFormNumber.vue.d.ts +57 -0
- package/dist/components/el-plus-form/components/ElPlusFormQuickInput.vue.d.ts +51 -0
- package/dist/components/el-plus-form/components/ElPlusFormRadio.vue.d.ts +44 -0
- package/dist/components/el-plus-form/components/ElPlusFormRate.vue.d.ts +44 -0
- package/dist/components/el-plus-form/components/ElPlusFormSelect.vue.d.ts +56 -0
- package/dist/components/el-plus-form/components/ElPlusFormSlider.vue.d.ts +44 -0
- package/dist/components/el-plus-form/components/ElPlusFormStatus.vue.d.ts +44 -0
- package/dist/components/el-plus-form/components/ElPlusFormSwitch.vue.d.ts +50 -0
- package/dist/components/el-plus-form/components/ElPlusFormTag.vue.d.ts +48 -0
- package/dist/components/el-plus-form/components/ElPlusFormText.vue.d.ts +48 -0
- package/dist/components/el-plus-form/components/ElPlusFormTextarea.vue.d.ts +51 -0
- package/dist/components/el-plus-form/components/ElPlusFormTransfer.vue.d.ts +57 -0
- package/dist/components/el-plus-form/components/ElPlusFormTree.vue.d.ts +50 -0
- package/dist/components/el-plus-form/components/ElPlusFormTreeSelect.vue.d.ts +50 -0
- package/dist/components/el-plus-form/components/ElPlusFormUpload.vue.d.ts +51 -0
- package/dist/components/el-plus-form/components/components/file-icons/FileIcons.vue.d.ts +42 -0
- package/dist/components/el-plus-form/components/components/file-icons/data/index.d.ts +15 -0
- package/dist/components/el-plus-form/components/index.d.ts +3 -0
- package/dist/components/el-plus-form/data/file.d.ts +63 -0
- package/dist/components/el-plus-form/mixins/index.d.ts +28 -0
- package/dist/components/el-plus-form/util/index.d.ts +47 -0
- package/dist/components/el-plus-form/util/validate.d.ts +253 -0
- package/dist/components/el-plus-table/ElPlusTable.vue.d.ts +155 -0
- package/dist/components/el-plus-table/components/columnItem.vue.d.ts +42 -0
- package/dist/components/el-plus-table/components/header.vue.d.ts +93 -0
- package/dist/components/el-plus-table/components/settingColumn.vue.d.ts +28 -0
- package/dist/components/el-plus-table/util/index.d.ts +26 -0
- package/dist/components-list.d.ts +2 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/el-plus-crud.mjs +6968 -0
- package/dist/el-plus-crud.umd.js +27 -0
- package/dist/index.d.ts +11 -0
- package/dist/style.css +1 -1
- package/lib/components/el-plus-form/ElPlusForm.vue +20 -8
- package/lib/components/el-plus-form/components/ElPlusFormArea.vue +59 -0
- package/lib/components/el-plus-form/components/ElPlusFormBtn.vue +1 -1
- package/lib/components/el-plus-form/components/ElPlusFormCascader.vue +25 -2
- package/lib/components/el-plus-form/components/ElPlusFormDate.vue +3 -1
- package/lib/components/el-plus-form/components/ElPlusFormFile.vue +1 -1
- package/lib/components/el-plus-form/components/ElPlusFormInput.vue +4 -2
- package/lib/components/el-plus-form/components/ElPlusFormLink.vue +20 -10
- package/lib/components/el-plus-form/components/ElPlusFormNumber.vue +37 -6
- package/lib/components/el-plus-form/components/ElPlusFormQuickInput.vue +92 -0
- package/lib/components/el-plus-form/components/ElPlusFormSelect.vue +16 -4
- package/lib/components/el-plus-form/components/ElPlusFormText.vue +0 -16
- package/lib/components/el-plus-form/components/ElPlusFormTextarea.vue +4 -2
- package/lib/components/el-plus-form/components/ElPlusFormUpload.vue +364 -0
- package/lib/components/el-plus-form/components/components/file-icons/images/doc.svg +12 -12
- package/lib/components/el-plus-form/components/components/file-icons/images/file.svg +18 -18
- package/lib/components/el-plus-form/components/components/file-icons/images/jpg.svg +13 -13
- package/lib/components/el-plus-form/components/components/file-icons/images/pdf.svg +12 -12
- package/lib/components/el-plus-form/components/components/file-icons/images/png.svg +12 -12
- package/lib/components/el-plus-form/components/components/file-icons/images/ppt.svg +12 -12
- package/lib/components/el-plus-form/components/components/file-icons/images/xls.svg +12 -12
- package/lib/components/el-plus-form/components/index.js +17 -0
- package/lib/components/el-plus-form/components/index.ts +1 -1
- package/lib/components/el-plus-form/util/index.ts +0 -9
- package/lib/components/el-plus-table/ElPlusTable.vue +28 -14
- package/lib/components/el-plus-table/components/columnItem.vue +22 -3
- package/lib/components/el-plus-table/components/header.vue +57 -37
- package/lib/components/el-plus-table/components/settingColumn.vue +6 -4
- package/lib/components/el-plus-table/util/index.ts +24 -0
- package/lib/components-list.ts +67 -0
- package/lib/config/index.ts +29 -9
- package/lib/default.d.ts +4 -4
- package/lib/index.ts +9 -84
- package/package.json +6 -4
- package/types/formList.d.ts +44 -3
- package/vite.config.ts +12 -2
- package/dist/el-plus-crud.umd.cjs +0 -27
- package/lib/components/el-plus-form/components/ElPlusFormPassword.vue +0 -39
- package/lib/components/el-plus-form/components/components/IconSelectorList.vue +0 -92
- package/lib/config/form.ts +0 -12
- package/lib/index.d.ts +0 -3
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
modelValue: {
|
|
3
|
+
type: import("vue").PropType<string>;
|
|
4
|
+
};
|
|
5
|
+
field: {
|
|
6
|
+
type: import("vue").PropType<string>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
loading: {
|
|
10
|
+
type: import("vue").PropType<boolean>;
|
|
11
|
+
};
|
|
12
|
+
desc: {
|
|
13
|
+
type: import("vue").PropType<{
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}>;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
formData: {
|
|
19
|
+
type: import("vue").PropType<{
|
|
20
|
+
[key: string]: any;
|
|
21
|
+
}>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
25
|
+
modelValue: {
|
|
26
|
+
type: import("vue").PropType<string>;
|
|
27
|
+
};
|
|
28
|
+
field: {
|
|
29
|
+
type: import("vue").PropType<string>;
|
|
30
|
+
required: true;
|
|
31
|
+
};
|
|
32
|
+
loading: {
|
|
33
|
+
type: import("vue").PropType<boolean>;
|
|
34
|
+
};
|
|
35
|
+
desc: {
|
|
36
|
+
type: import("vue").PropType<{
|
|
37
|
+
[key: string]: any;
|
|
38
|
+
}>;
|
|
39
|
+
required: true;
|
|
40
|
+
};
|
|
41
|
+
formData: {
|
|
42
|
+
type: import("vue").PropType<{
|
|
43
|
+
[key: string]: any;
|
|
44
|
+
}>;
|
|
45
|
+
required: true;
|
|
46
|
+
};
|
|
47
|
+
}>> & {
|
|
48
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
49
|
+
}, {}, {}>;
|
|
50
|
+
export default _default;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
modelValue: {
|
|
3
|
+
type: import("vue").PropType<any>;
|
|
4
|
+
};
|
|
5
|
+
field: {
|
|
6
|
+
type: import("vue").PropType<string>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
loading: {
|
|
10
|
+
type: import("vue").PropType<boolean>;
|
|
11
|
+
};
|
|
12
|
+
desc: {
|
|
13
|
+
type: import("vue").PropType<{
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}>;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
formData: {
|
|
19
|
+
type: import("vue").PropType<{
|
|
20
|
+
[key: string]: any;
|
|
21
|
+
}>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
25
|
+
modelValue: {
|
|
26
|
+
type: import("vue").PropType<any>;
|
|
27
|
+
};
|
|
28
|
+
field: {
|
|
29
|
+
type: import("vue").PropType<string>;
|
|
30
|
+
required: true;
|
|
31
|
+
};
|
|
32
|
+
loading: {
|
|
33
|
+
type: import("vue").PropType<boolean>;
|
|
34
|
+
};
|
|
35
|
+
desc: {
|
|
36
|
+
type: import("vue").PropType<{
|
|
37
|
+
[key: string]: any;
|
|
38
|
+
}>;
|
|
39
|
+
required: true;
|
|
40
|
+
};
|
|
41
|
+
formData: {
|
|
42
|
+
type: import("vue").PropType<{
|
|
43
|
+
[key: string]: any;
|
|
44
|
+
}>;
|
|
45
|
+
required: true;
|
|
46
|
+
};
|
|
47
|
+
}>> & {
|
|
48
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
49
|
+
}, {}, {}>;
|
|
50
|
+
export default _default;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
modelValue: {
|
|
3
|
+
type: import("vue").PropType<IOssInfo[]>;
|
|
4
|
+
};
|
|
5
|
+
field: {
|
|
6
|
+
type: import("vue").PropType<string>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
loading: {
|
|
10
|
+
type: import("vue").PropType<boolean>;
|
|
11
|
+
};
|
|
12
|
+
desc: {
|
|
13
|
+
type: import("vue").PropType<{
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}>;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
formData: {
|
|
19
|
+
type: import("vue").PropType<{
|
|
20
|
+
[key: string]: any;
|
|
21
|
+
}>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("validateThis" | "update:modelValue")[], "validateThis" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
25
|
+
modelValue: {
|
|
26
|
+
type: import("vue").PropType<IOssInfo[]>;
|
|
27
|
+
};
|
|
28
|
+
field: {
|
|
29
|
+
type: import("vue").PropType<string>;
|
|
30
|
+
required: true;
|
|
31
|
+
};
|
|
32
|
+
loading: {
|
|
33
|
+
type: import("vue").PropType<boolean>;
|
|
34
|
+
};
|
|
35
|
+
desc: {
|
|
36
|
+
type: import("vue").PropType<{
|
|
37
|
+
[key: string]: any;
|
|
38
|
+
}>;
|
|
39
|
+
required: true;
|
|
40
|
+
};
|
|
41
|
+
formData: {
|
|
42
|
+
type: import("vue").PropType<{
|
|
43
|
+
[key: string]: any;
|
|
44
|
+
}>;
|
|
45
|
+
required: true;
|
|
46
|
+
};
|
|
47
|
+
}>> & {
|
|
48
|
+
onValidateThis?: ((...args: any[]) => any) | undefined;
|
|
49
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
50
|
+
}, {}, {}>;
|
|
51
|
+
export default _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
files: {
|
|
3
|
+
type: import("vue").PropType<IOssInfo[]>;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
size: {
|
|
7
|
+
type: import("vue").PropType<number>;
|
|
8
|
+
};
|
|
9
|
+
isCard: {
|
|
10
|
+
type: import("vue").PropType<boolean>;
|
|
11
|
+
};
|
|
12
|
+
showImg: {
|
|
13
|
+
type: import("vue").PropType<boolean>;
|
|
14
|
+
};
|
|
15
|
+
preview: {
|
|
16
|
+
type: import("vue").PropType<boolean>;
|
|
17
|
+
};
|
|
18
|
+
showName: {
|
|
19
|
+
type: import("vue").PropType<boolean>;
|
|
20
|
+
};
|
|
21
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
|
+
files: {
|
|
23
|
+
type: import("vue").PropType<IOssInfo[]>;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
size: {
|
|
27
|
+
type: import("vue").PropType<number>;
|
|
28
|
+
};
|
|
29
|
+
isCard: {
|
|
30
|
+
type: import("vue").PropType<boolean>;
|
|
31
|
+
};
|
|
32
|
+
showImg: {
|
|
33
|
+
type: import("vue").PropType<boolean>;
|
|
34
|
+
};
|
|
35
|
+
preview: {
|
|
36
|
+
type: import("vue").PropType<boolean>;
|
|
37
|
+
};
|
|
38
|
+
showName: {
|
|
39
|
+
type: import("vue").PropType<boolean>;
|
|
40
|
+
};
|
|
41
|
+
}>>, {}, {}>;
|
|
42
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import file from '../images/file.svg';
|
|
2
|
+
export default file;
|
|
3
|
+
export declare const imgSuffix: string[];
|
|
4
|
+
export declare const iconMap: {
|
|
5
|
+
'.doc': string;
|
|
6
|
+
'.docx': string;
|
|
7
|
+
'.jpg': string;
|
|
8
|
+
'.jpeg': string;
|
|
9
|
+
'.png': string;
|
|
10
|
+
'.pdf': string;
|
|
11
|
+
'.ppt': string;
|
|
12
|
+
'.pptx': string;
|
|
13
|
+
'.xls': string;
|
|
14
|
+
'.xlsx': string;
|
|
15
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 能够上传的图片类型
|
|
3
|
+
*/
|
|
4
|
+
export declare const imageTypes: string[];
|
|
5
|
+
/**
|
|
6
|
+
* 能够上传的图片后缀名称
|
|
7
|
+
*/
|
|
8
|
+
export declare const imageSuffixes: string[];
|
|
9
|
+
/**
|
|
10
|
+
* 能够上传的视频类型
|
|
11
|
+
*/
|
|
12
|
+
export declare const videoTypes: string[];
|
|
13
|
+
/**
|
|
14
|
+
* 能够上传的视频后缀名称
|
|
15
|
+
*/
|
|
16
|
+
export declare const videoSuffixes: string[];
|
|
17
|
+
/**
|
|
18
|
+
* 能够上传的音频类型
|
|
19
|
+
*/
|
|
20
|
+
export declare const audioTypes: string[];
|
|
21
|
+
/**
|
|
22
|
+
* 能够上传的音频后缀名称
|
|
23
|
+
*/
|
|
24
|
+
export declare const audioSuffixes: string[];
|
|
25
|
+
/**
|
|
26
|
+
* 能够上传的文档类型
|
|
27
|
+
*/
|
|
28
|
+
export declare const officeTypes: string[];
|
|
29
|
+
/**
|
|
30
|
+
* 能够上传的文档后缀名称
|
|
31
|
+
*/
|
|
32
|
+
export declare const officeSuffixes: string[];
|
|
33
|
+
/**
|
|
34
|
+
* 能够上传的文档类型
|
|
35
|
+
*/
|
|
36
|
+
export declare const textTypes: string[];
|
|
37
|
+
/**
|
|
38
|
+
* 能够上传的文档后缀名称
|
|
39
|
+
*/
|
|
40
|
+
export declare const textSuffixes: string[];
|
|
41
|
+
/**
|
|
42
|
+
* 能够上传的文档类型
|
|
43
|
+
*/
|
|
44
|
+
export declare const otherTypes: string[];
|
|
45
|
+
/**
|
|
46
|
+
* 能够上传的文档后缀
|
|
47
|
+
*/
|
|
48
|
+
export declare const otherSuffixes: string[];
|
|
49
|
+
/**
|
|
50
|
+
* 能够上传的文件类型
|
|
51
|
+
*/
|
|
52
|
+
export declare const fileTypes: string[];
|
|
53
|
+
/**
|
|
54
|
+
* 能够上传的文件后缀
|
|
55
|
+
*/
|
|
56
|
+
export declare const fileSuffixes: string[];
|
|
57
|
+
/**
|
|
58
|
+
* 文档后缀对应的类型
|
|
59
|
+
*/
|
|
60
|
+
export declare const suffixTypes: {
|
|
61
|
+
type: string;
|
|
62
|
+
suffixes: string[];
|
|
63
|
+
}[];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface IMixinsProps {
|
|
2
|
+
modelValue?: any;
|
|
3
|
+
field: string;
|
|
4
|
+
rowIndex?: number;
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
desc: {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
};
|
|
9
|
+
formData: {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
};
|
|
12
|
+
isMobile?: boolean;
|
|
13
|
+
defineEmits?: any;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 获取属性
|
|
17
|
+
* @param props
|
|
18
|
+
* @param customAttrs
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
export declare const getAttrs: (props: IMixinsProps, customAttrs?: {
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
} | undefined) => Promise<any>;
|
|
24
|
+
/**
|
|
25
|
+
* 获取事件
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
28
|
+
export declare const getEvents: (props: IMixinsProps) => any;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export declare function isDef(val: any): boolean;
|
|
2
|
+
export declare function isUnDef(val: any): boolean;
|
|
3
|
+
export declare function isFunction(val: any): boolean;
|
|
4
|
+
/**
|
|
5
|
+
* 获取随机字符串
|
|
6
|
+
* @returns {string}
|
|
7
|
+
*/
|
|
8
|
+
export declare function getUID(): string;
|
|
9
|
+
/**
|
|
10
|
+
* 判断是否是移动端
|
|
11
|
+
*/
|
|
12
|
+
export declare function isMobile(): boolean;
|
|
13
|
+
export declare function is(val: any, type: any): boolean;
|
|
14
|
+
export declare function getSize(elem: any): {
|
|
15
|
+
width: any;
|
|
16
|
+
height: any;
|
|
17
|
+
};
|
|
18
|
+
export declare function castArray(value: any): any;
|
|
19
|
+
export declare function castCategory(value: any, formData: any): any[];
|
|
20
|
+
export declare function castFileList(value: any): any;
|
|
21
|
+
export declare function castString(value: any): any;
|
|
22
|
+
export declare function castBoolean(value: any): boolean;
|
|
23
|
+
export declare function castNumber(value: any): number;
|
|
24
|
+
export declare function isEmpty(val: any): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* 格式化表单字段
|
|
27
|
+
* @param formData
|
|
28
|
+
* @param formDesc
|
|
29
|
+
*/
|
|
30
|
+
export declare function valueFormat(formData: any, formDesc: any): void;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @param val 数组转字符串
|
|
34
|
+
*/
|
|
35
|
+
export declare function arrayToStr(val: any): string;
|
|
36
|
+
/**
|
|
37
|
+
* 裁剪长度
|
|
38
|
+
* @param str
|
|
39
|
+
* @param len
|
|
40
|
+
* @param isTransHz 是否转换汉字长度为2个英文字母长度
|
|
41
|
+
*/
|
|
42
|
+
export declare const cutString: (str: string | undefined, len: number, isTransHz?: boolean) => string;
|
|
43
|
+
/**
|
|
44
|
+
* 获取字符串长度
|
|
45
|
+
* @type {(p1?:*)}
|
|
46
|
+
*/
|
|
47
|
+
export declare const getStrLength: (str: any) => number;
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 获取通用的校验规则
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* 不能为空
|
|
6
|
+
*/
|
|
7
|
+
export declare const notNull: {
|
|
8
|
+
required: boolean;
|
|
9
|
+
trigger: string;
|
|
10
|
+
validator: typeof validateInputNotNull;
|
|
11
|
+
}[];
|
|
12
|
+
/**
|
|
13
|
+
* 不能全是空格
|
|
14
|
+
*/
|
|
15
|
+
export declare const notAllBlank: {
|
|
16
|
+
required: boolean;
|
|
17
|
+
trigger: string;
|
|
18
|
+
validator: typeof validateInputNotAllBlank;
|
|
19
|
+
}[];
|
|
20
|
+
/**
|
|
21
|
+
* 必须是数字
|
|
22
|
+
*/
|
|
23
|
+
export declare const number: {
|
|
24
|
+
type: string;
|
|
25
|
+
message: string;
|
|
26
|
+
}[];
|
|
27
|
+
/**
|
|
28
|
+
* 校验验证码
|
|
29
|
+
*/
|
|
30
|
+
export declare const vCode: {
|
|
31
|
+
required: boolean;
|
|
32
|
+
trigger: string;
|
|
33
|
+
validator: typeof validateValidateCode;
|
|
34
|
+
}[];
|
|
35
|
+
/**
|
|
36
|
+
* 校验邮箱
|
|
37
|
+
*/
|
|
38
|
+
export declare const email: {
|
|
39
|
+
trigger: string;
|
|
40
|
+
validator: typeof validateEmail;
|
|
41
|
+
}[];
|
|
42
|
+
/**
|
|
43
|
+
* 校验手机号
|
|
44
|
+
*/
|
|
45
|
+
export declare const phone: {
|
|
46
|
+
required: boolean;
|
|
47
|
+
trigger: string;
|
|
48
|
+
validator: typeof validatePhone;
|
|
49
|
+
}[];
|
|
50
|
+
/**
|
|
51
|
+
* 校验密码
|
|
52
|
+
*/
|
|
53
|
+
export declare const password: {
|
|
54
|
+
required: boolean;
|
|
55
|
+
trigger: string;
|
|
56
|
+
validator: typeof validatePassword;
|
|
57
|
+
}[];
|
|
58
|
+
/**
|
|
59
|
+
* 校验密码
|
|
60
|
+
*/
|
|
61
|
+
export declare const password2: {
|
|
62
|
+
trigger: string;
|
|
63
|
+
validator: typeof validatePassword;
|
|
64
|
+
}[];
|
|
65
|
+
/**
|
|
66
|
+
* 校验账户
|
|
67
|
+
*/
|
|
68
|
+
export declare const account: {
|
|
69
|
+
required: boolean;
|
|
70
|
+
trigger: string;
|
|
71
|
+
validator: typeof validateAccount;
|
|
72
|
+
}[];
|
|
73
|
+
/**
|
|
74
|
+
* 校验英文字母加数字
|
|
75
|
+
*/
|
|
76
|
+
export declare const wordnum: {
|
|
77
|
+
trigger: string;
|
|
78
|
+
validator: typeof validateWordNumber;
|
|
79
|
+
}[];
|
|
80
|
+
export declare const wordnum2: {
|
|
81
|
+
required: boolean;
|
|
82
|
+
trigger: string;
|
|
83
|
+
validator: typeof validateWordNumber;
|
|
84
|
+
}[];
|
|
85
|
+
/**
|
|
86
|
+
* 必须是数字且不为空
|
|
87
|
+
*/
|
|
88
|
+
export declare const numberNotNull: ({
|
|
89
|
+
required: boolean;
|
|
90
|
+
message: string;
|
|
91
|
+
trigger: string;
|
|
92
|
+
type?: undefined;
|
|
93
|
+
} | {
|
|
94
|
+
type: string;
|
|
95
|
+
message: string;
|
|
96
|
+
required?: undefined;
|
|
97
|
+
trigger?: undefined;
|
|
98
|
+
})[];
|
|
99
|
+
/**
|
|
100
|
+
* 正整数
|
|
101
|
+
*/
|
|
102
|
+
export declare const zhengZhengShu: {
|
|
103
|
+
required: boolean;
|
|
104
|
+
trigger: string;
|
|
105
|
+
validator: typeof validateZhengZhengShu;
|
|
106
|
+
}[];
|
|
107
|
+
/**
|
|
108
|
+
* Double类型
|
|
109
|
+
*/
|
|
110
|
+
export declare const double: {
|
|
111
|
+
required: boolean;
|
|
112
|
+
trigger: string;
|
|
113
|
+
validator: typeof validateDouble;
|
|
114
|
+
}[];
|
|
115
|
+
/**
|
|
116
|
+
* Double类型且必填
|
|
117
|
+
*/
|
|
118
|
+
export declare const double2: {
|
|
119
|
+
trigger: string;
|
|
120
|
+
validator: typeof validateDouble;
|
|
121
|
+
}[];
|
|
122
|
+
/**
|
|
123
|
+
* 选择
|
|
124
|
+
*/
|
|
125
|
+
export declare const select: {
|
|
126
|
+
required: boolean;
|
|
127
|
+
trigger: string;
|
|
128
|
+
validator: typeof validateSelect;
|
|
129
|
+
}[];
|
|
130
|
+
/**
|
|
131
|
+
* 级联选择
|
|
132
|
+
* @type {[*]}
|
|
133
|
+
*/
|
|
134
|
+
export declare const cascader: {
|
|
135
|
+
required: boolean;
|
|
136
|
+
trigger: string;
|
|
137
|
+
validator: typeof validateSelect;
|
|
138
|
+
}[];
|
|
139
|
+
/**
|
|
140
|
+
* 必须上传
|
|
141
|
+
*/
|
|
142
|
+
export declare const upload: {
|
|
143
|
+
required: boolean;
|
|
144
|
+
trigger: string;
|
|
145
|
+
validator: typeof validateUpload;
|
|
146
|
+
}[];
|
|
147
|
+
/**
|
|
148
|
+
* 文本域
|
|
149
|
+
*/
|
|
150
|
+
export declare const textarea: {
|
|
151
|
+
required: boolean;
|
|
152
|
+
trigger: string;
|
|
153
|
+
validator: typeof validateTextarea;
|
|
154
|
+
}[];
|
|
155
|
+
/**
|
|
156
|
+
* 正整数校验
|
|
157
|
+
* @param rule
|
|
158
|
+
* @param value
|
|
159
|
+
* @param callback
|
|
160
|
+
*/
|
|
161
|
+
declare function validateZhengZhengShu(rule: any, value: any, callback?: any): void;
|
|
162
|
+
/**
|
|
163
|
+
* 选择
|
|
164
|
+
* @param rule
|
|
165
|
+
* @param value
|
|
166
|
+
* @param callback
|
|
167
|
+
*/
|
|
168
|
+
declare function validateValidateCode(rule: any, value: any, callback?: any): void;
|
|
169
|
+
/**
|
|
170
|
+
* 选择
|
|
171
|
+
* @param rule
|
|
172
|
+
* @param value
|
|
173
|
+
* @param callback
|
|
174
|
+
*/
|
|
175
|
+
declare function validateInputNotNull(rule: any, value: any, callback?: any): void;
|
|
176
|
+
/**
|
|
177
|
+
* 不能全是空格
|
|
178
|
+
* @param rule
|
|
179
|
+
* @param value
|
|
180
|
+
* @param callback
|
|
181
|
+
*/
|
|
182
|
+
declare function validateInputNotAllBlank(rule: any, value: any, callback?: any): void;
|
|
183
|
+
/**
|
|
184
|
+
* 选择
|
|
185
|
+
* @param rule
|
|
186
|
+
* @param value
|
|
187
|
+
* @param callback
|
|
188
|
+
*/
|
|
189
|
+
declare function validateSelect(rule: any, value: any, callback?: any): void;
|
|
190
|
+
/**
|
|
191
|
+
* 上传
|
|
192
|
+
* @param rule
|
|
193
|
+
* @param value
|
|
194
|
+
* @param callback
|
|
195
|
+
*/
|
|
196
|
+
declare function validateUpload(rule: any, value: any, callback?: any): void;
|
|
197
|
+
/**
|
|
198
|
+
* 文本域
|
|
199
|
+
* @param rule
|
|
200
|
+
* @param value
|
|
201
|
+
* @param callback
|
|
202
|
+
*/
|
|
203
|
+
declare function validateTextarea(rule: any, value: any, callback?: any): void;
|
|
204
|
+
/**
|
|
205
|
+
* 小数校验规则
|
|
206
|
+
* @param rule
|
|
207
|
+
* @param value
|
|
208
|
+
* @param callback
|
|
209
|
+
*/
|
|
210
|
+
declare function validateDouble(rule: any, value: any, callback?: any): void;
|
|
211
|
+
/**
|
|
212
|
+
* 校验邮箱
|
|
213
|
+
* @param rule
|
|
214
|
+
* @param value
|
|
215
|
+
* @param callback
|
|
216
|
+
*/
|
|
217
|
+
declare function validateEmail(rule: any, value: any, callback?: any): void;
|
|
218
|
+
/**
|
|
219
|
+
* 校验手机号
|
|
220
|
+
* @param rule
|
|
221
|
+
* @param value
|
|
222
|
+
* @param callback
|
|
223
|
+
*/
|
|
224
|
+
declare function validatePhone(rule: any, value: any, callback?: any): void;
|
|
225
|
+
/**
|
|
226
|
+
* 校验密码
|
|
227
|
+
* @param rule
|
|
228
|
+
* @param value
|
|
229
|
+
* @param callback
|
|
230
|
+
*/
|
|
231
|
+
export declare function validatePassword(rule: any, value: any, callback?: any): void;
|
|
232
|
+
/**
|
|
233
|
+
* 校验密码
|
|
234
|
+
* @param rule
|
|
235
|
+
* @param value
|
|
236
|
+
* @param callback
|
|
237
|
+
*/
|
|
238
|
+
export declare function validatePassword2(rule: any, value: any, callback?: any): void;
|
|
239
|
+
/**
|
|
240
|
+
* 校验账户
|
|
241
|
+
* @param rule
|
|
242
|
+
* @param value
|
|
243
|
+
* @param callback
|
|
244
|
+
*/
|
|
245
|
+
declare function validateAccount(rule: any, value: any, callback?: any): void;
|
|
246
|
+
/**
|
|
247
|
+
* 校验字母和数字组成
|
|
248
|
+
* @param rule
|
|
249
|
+
* @param value
|
|
250
|
+
* @param callback
|
|
251
|
+
*/
|
|
252
|
+
declare function validateWordNumber(rule: any, value: any, callback?: any): void;
|
|
253
|
+
export {};
|