@hlw-vue/crud 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/index.css +1 -0
- package/dist/index.es.js +6531 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.umd.js +2 -0
- package/dist/index.umd.js.map +1 -0
- package/index.d.ts +811 -0
- package/package.json +51 -0
- package/types/App.vue.d.ts +2 -0
- package/types/components/add-btn/index.d.ts +2 -0
- package/types/components/adv/btn.d.ts +4 -0
- package/types/components/adv/search.d.ts +42 -0
- package/types/components/context-menu/index.d.ts +30 -0
- package/types/components/crud/helper.d.ts +23 -0
- package/types/components/crud/index.d.ts +19 -0
- package/types/components/dialog/index.d.ts +93 -0
- package/types/components/error-message/index.d.ts +6 -0
- package/types/components/filter/index.d.ts +6 -0
- package/types/components/flex1/index.d.ts +2 -0
- package/types/components/form/helper/action.d.ts +17 -0
- package/types/components/form/helper/api.d.ts +3 -0
- package/types/components/form/helper/index.d.ts +237 -0
- package/types/components/form/helper/plugins.d.ts +7 -0
- package/types/components/form/helper/tabs.d.ts +19 -0
- package/types/components/form/index.d.ts +22 -0
- package/types/components/form-card/index.d.ts +28 -0
- package/types/components/form-tabs/index.d.ts +38 -0
- package/types/components/index.d.ts +5 -0
- package/types/components/multi-delete-btn/index.d.ts +2 -0
- package/types/components/pagination/index.d.ts +4 -0
- package/types/components/refresh-btn/index.d.ts +2 -0
- package/types/components/row/index.d.ts +2 -0
- package/types/components/search/helper/plugins.d.ts +3 -0
- package/types/components/search/index.d.ts +66 -0
- package/types/components/search-key/index.d.ts +55 -0
- package/types/components/table/helper/data.d.ts +7 -0
- package/types/components/table/helper/header.d.ts +1 -0
- package/types/components/table/helper/height.d.ts +7 -0
- package/types/components/table/helper/index.d.ts +191 -0
- package/types/components/table/helper/op.d.ts +9 -0
- package/types/components/table/helper/plugins.d.ts +3 -0
- package/types/components/table/helper/render.d.ts +7 -0
- package/types/components/table/helper/row.d.ts +13 -0
- package/types/components/table/helper/selection.d.ts +6 -0
- package/types/components/table/helper/sort.d.ts +18 -0
- package/types/components/table/index.d.ts +62 -0
- package/types/components/upsert/index.d.ts +38 -0
- package/types/emitter.d.ts +2 -0
- package/types/entry.d.ts +13 -0
- package/types/hooks/crud.d.ts +10 -0
- package/types/hooks/index.d.ts +16 -0
- package/types/index.d.ts +1 -0
- package/types/locale/en.d.ts +33 -0
- package/types/locale/index.d.ts +130 -0
- package/types/locale/ja.d.ts +33 -0
- package/types/locale/zh-cn.d.ts +33 -0
- package/types/locale/zh-tw.d.ts +33 -0
- package/types/main.d.ts +0 -0
- package/types/provide.d.ts +2 -0
- package/types/test/service.d.ts +52 -0
- package/types/utils/form-hook.d.ts +9 -0
- package/types/utils/global.d.ts +7 -0
- package/types/utils/index.d.ts +14 -0
- package/types/utils/mitt.d.ts +10 -0
- package/types/utils/parse.d.ts +5 -0
- package/types/utils/vnode.d.ts +14 -0
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hlw-vue/crud",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"main": "./dist/index.umd.js",
|
|
6
|
+
"module": "./dist/index.es.js",
|
|
7
|
+
"types": "types/entry.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./types/entry.d.ts",
|
|
11
|
+
"import": "./dist/index.es.js",
|
|
12
|
+
"require": "./dist/index.umd.js"
|
|
13
|
+
},
|
|
14
|
+
"./index": {
|
|
15
|
+
"types": "./types/entry.d.ts",
|
|
16
|
+
"import": "./dist/index.es.js",
|
|
17
|
+
"require": "./dist/index.umd.js"
|
|
18
|
+
},
|
|
19
|
+
"./dist/index.css": "./dist/index.css"
|
|
20
|
+
},
|
|
21
|
+
"type": "module",
|
|
22
|
+
"scripts": {
|
|
23
|
+
"dev": "vite",
|
|
24
|
+
"build": "vue-tsc && vite build",
|
|
25
|
+
"preview": "vite preview"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@vue/runtime-core": "^3.5.13",
|
|
29
|
+
"element-plus": "^2.10.4",
|
|
30
|
+
"lodash-es": "^4.17.21",
|
|
31
|
+
"vue": "^3.5.13"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/node": "^20.11.16",
|
|
35
|
+
"@vitejs/plugin-vue": "^5.2.1",
|
|
36
|
+
"@vitejs/plugin-vue-jsx": "^4.1.1",
|
|
37
|
+
"prettier": "^3.5.1",
|
|
38
|
+
"sass": "^1.85.0",
|
|
39
|
+
"sass-loader": "^16.0.5",
|
|
40
|
+
"typescript": "^5.3.3",
|
|
41
|
+
"vite": "^6.1.0",
|
|
42
|
+
"vite-plugin-dts": "^4.5.0",
|
|
43
|
+
"vue-tsc": "^2.2.2"
|
|
44
|
+
},
|
|
45
|
+
"files": [
|
|
46
|
+
"types",
|
|
47
|
+
"dist",
|
|
48
|
+
"index.d.ts",
|
|
49
|
+
"index.ts"
|
|
50
|
+
]
|
|
51
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {
|
|
2
|
+
Search: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{}>>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
3
|
+
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
3
|
+
items: {
|
|
4
|
+
type: PropType<HlwForm.Item[]>;
|
|
5
|
+
default: () => any[];
|
|
6
|
+
};
|
|
7
|
+
title: StringConstructor;
|
|
8
|
+
size: {
|
|
9
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
op: {
|
|
13
|
+
type: ArrayConstructor;
|
|
14
|
+
default: () => string[];
|
|
15
|
+
};
|
|
16
|
+
onSearch: FunctionConstructor;
|
|
17
|
+
}>, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("clear" | "reset")[], "clear" | "reset", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
18
|
+
items: {
|
|
19
|
+
type: PropType<HlwForm.Item[]>;
|
|
20
|
+
default: () => any[];
|
|
21
|
+
};
|
|
22
|
+
title: StringConstructor;
|
|
23
|
+
size: {
|
|
24
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
27
|
+
op: {
|
|
28
|
+
type: ArrayConstructor;
|
|
29
|
+
default: () => string[];
|
|
30
|
+
};
|
|
31
|
+
onSearch: FunctionConstructor;
|
|
32
|
+
}>> & Readonly<{
|
|
33
|
+
onReset?: (...args: any[]) => any;
|
|
34
|
+
onClear?: (...args: any[]) => any;
|
|
35
|
+
}>, {
|
|
36
|
+
size: string | number;
|
|
37
|
+
items: HlwForm.Item<any>[];
|
|
38
|
+
op: unknown[];
|
|
39
|
+
}, {}, {
|
|
40
|
+
Close: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{}>>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
41
|
+
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
42
|
+
export default _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
declare const ClContextMenu: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
3
|
+
show: BooleanConstructor;
|
|
4
|
+
options: {
|
|
5
|
+
type: PropType<ClContextMenu.Options>;
|
|
6
|
+
default: () => {};
|
|
7
|
+
};
|
|
8
|
+
event: {
|
|
9
|
+
type: ObjectConstructor;
|
|
10
|
+
default: () => {};
|
|
11
|
+
};
|
|
12
|
+
}>, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
13
|
+
show: BooleanConstructor;
|
|
14
|
+
options: {
|
|
15
|
+
type: PropType<ClContextMenu.Options>;
|
|
16
|
+
default: () => {};
|
|
17
|
+
};
|
|
18
|
+
event: {
|
|
19
|
+
type: ObjectConstructor;
|
|
20
|
+
default: () => {};
|
|
21
|
+
};
|
|
22
|
+
}>> & Readonly<{}>, {
|
|
23
|
+
options: ClContextMenu.Options;
|
|
24
|
+
show: boolean;
|
|
25
|
+
event: Record<string, any>;
|
|
26
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
27
|
+
export declare const ContextMenu: {
|
|
28
|
+
open(event: any, options: ClContextMenu.Options): ClContextMenu.Exposed;
|
|
29
|
+
};
|
|
30
|
+
export default ClContextMenu;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Mitt } from '../../utils/mitt';
|
|
2
|
+
interface Options {
|
|
3
|
+
mitt: Mitt;
|
|
4
|
+
config: HlwCrud.Config;
|
|
5
|
+
crud: HlwCrud.Ref;
|
|
6
|
+
}
|
|
7
|
+
export declare function useHelper({ config, crud, mitt }: Options): {
|
|
8
|
+
proxy: (name: string, data?: any[]) => void;
|
|
9
|
+
set: (key: string, value: any) => boolean;
|
|
10
|
+
on: (name: string, callback: fn) => void;
|
|
11
|
+
rowInfo: (data: any) => void;
|
|
12
|
+
rowAdd: () => void;
|
|
13
|
+
rowEdit: (data: any) => void;
|
|
14
|
+
rowAppend: (data: any) => void;
|
|
15
|
+
rowDelete: (...selection: any[]) => void;
|
|
16
|
+
rowClose: () => void;
|
|
17
|
+
refresh: (params?: obj) => Promise<unknown>;
|
|
18
|
+
getPermission: (key: "page" | "list" | "info" | "update" | "add" | "delete") => boolean;
|
|
19
|
+
paramsReplace: (params: obj) => any;
|
|
20
|
+
getParams: () => obj;
|
|
21
|
+
setParams: (data: obj) => void;
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
name: StringConstructor;
|
|
3
|
+
border: BooleanConstructor;
|
|
4
|
+
padding: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
}>, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
9
|
+
name: StringConstructor;
|
|
10
|
+
border: BooleanConstructor;
|
|
11
|
+
padding: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
}>> & Readonly<{}>, {
|
|
16
|
+
border: boolean;
|
|
17
|
+
padding: string;
|
|
18
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
modelValue: {
|
|
3
|
+
type: BooleanConstructor;
|
|
4
|
+
default: boolean;
|
|
5
|
+
};
|
|
6
|
+
props: ObjectConstructor;
|
|
7
|
+
title: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
height: StringConstructor;
|
|
12
|
+
width: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
padding: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
keepAlive: BooleanConstructor;
|
|
21
|
+
fullscreen: BooleanConstructor;
|
|
22
|
+
controls: {
|
|
23
|
+
type: ArrayConstructor;
|
|
24
|
+
default: () => string[];
|
|
25
|
+
};
|
|
26
|
+
hideHeader: BooleanConstructor;
|
|
27
|
+
beforeClose: FunctionConstructor;
|
|
28
|
+
scrollbar: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
transparent: BooleanConstructor;
|
|
33
|
+
draggable: {
|
|
34
|
+
type: BooleanConstructor;
|
|
35
|
+
default: boolean;
|
|
36
|
+
};
|
|
37
|
+
}>, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("update:modelValue" | "fullscreen-change")[], "update:modelValue" | "fullscreen-change", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
38
|
+
modelValue: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
42
|
+
props: ObjectConstructor;
|
|
43
|
+
title: {
|
|
44
|
+
type: StringConstructor;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
height: StringConstructor;
|
|
48
|
+
width: {
|
|
49
|
+
type: StringConstructor;
|
|
50
|
+
default: string;
|
|
51
|
+
};
|
|
52
|
+
padding: {
|
|
53
|
+
type: StringConstructor;
|
|
54
|
+
default: string;
|
|
55
|
+
};
|
|
56
|
+
keepAlive: BooleanConstructor;
|
|
57
|
+
fullscreen: BooleanConstructor;
|
|
58
|
+
controls: {
|
|
59
|
+
type: ArrayConstructor;
|
|
60
|
+
default: () => string[];
|
|
61
|
+
};
|
|
62
|
+
hideHeader: BooleanConstructor;
|
|
63
|
+
beforeClose: FunctionConstructor;
|
|
64
|
+
scrollbar: {
|
|
65
|
+
type: BooleanConstructor;
|
|
66
|
+
default: boolean;
|
|
67
|
+
};
|
|
68
|
+
transparent: BooleanConstructor;
|
|
69
|
+
draggable: {
|
|
70
|
+
type: BooleanConstructor;
|
|
71
|
+
default: boolean;
|
|
72
|
+
};
|
|
73
|
+
}>> & Readonly<{
|
|
74
|
+
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
75
|
+
"onFullscreen-change"?: (...args: any[]) => any;
|
|
76
|
+
}>, {
|
|
77
|
+
title: string;
|
|
78
|
+
padding: string;
|
|
79
|
+
width: string;
|
|
80
|
+
hideHeader: boolean;
|
|
81
|
+
controls: unknown[];
|
|
82
|
+
keepAlive: boolean;
|
|
83
|
+
fullscreen: boolean;
|
|
84
|
+
modelValue: boolean;
|
|
85
|
+
transparent: boolean;
|
|
86
|
+
scrollbar: boolean;
|
|
87
|
+
draggable: boolean;
|
|
88
|
+
}, {}, {
|
|
89
|
+
Close: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{}>>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
90
|
+
FullScreen: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{}>>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
91
|
+
Minus: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{}>>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
92
|
+
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
93
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
title: StringConstructor;
|
|
3
|
+
}>, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
4
|
+
title: StringConstructor;
|
|
5
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
label: StringConstructor;
|
|
3
|
+
}>, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
4
|
+
label: StringConstructor;
|
|
5
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare function useAction({ config, form, Form }: {
|
|
2
|
+
config: HlwForm.Config;
|
|
3
|
+
form: obj;
|
|
4
|
+
Form: Vue.Ref<any>;
|
|
5
|
+
}): {
|
|
6
|
+
getForm: (prop: string) => any;
|
|
7
|
+
setForm: (prop: string, value: any) => void;
|
|
8
|
+
setData: (prop: string, value: any) => void;
|
|
9
|
+
setConfig: (path: string, value: any) => void;
|
|
10
|
+
setOptions: (prop: string, value: any[]) => void;
|
|
11
|
+
setProps: (prop: string, value: any) => void;
|
|
12
|
+
toggleItem: (prop: string, value?: boolean) => void;
|
|
13
|
+
hideItem: (...props: string[]) => void;
|
|
14
|
+
showItem: (...props: string[]) => void;
|
|
15
|
+
setTitle: (value: string) => void;
|
|
16
|
+
collapseItem: (e: any) => void;
|
|
17
|
+
};
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
export declare function useForm(): {
|
|
2
|
+
Form: import('vue').Ref<any, any>;
|
|
3
|
+
config: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
title?: any;
|
|
6
|
+
height?: any;
|
|
7
|
+
width?: any;
|
|
8
|
+
props: {
|
|
9
|
+
[x: string]: any;
|
|
10
|
+
inline?: boolean;
|
|
11
|
+
labelPosition?: "left" | "right" | "top";
|
|
12
|
+
labelWidth?: string | number;
|
|
13
|
+
labelSuffix?: string;
|
|
14
|
+
hideRequiredAsterisk?: boolean;
|
|
15
|
+
showMessage?: boolean;
|
|
16
|
+
inlineMessage?: boolean;
|
|
17
|
+
statusIcon?: boolean;
|
|
18
|
+
validateOnRuleChange?: boolean;
|
|
19
|
+
size?: ElementPlus.Size;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
};
|
|
22
|
+
items: {
|
|
23
|
+
[x: string]: any;
|
|
24
|
+
type?: "tabs";
|
|
25
|
+
prop?: string & {};
|
|
26
|
+
props?: {
|
|
27
|
+
[x: string]: any;
|
|
28
|
+
labels?: {
|
|
29
|
+
[x: string]: any;
|
|
30
|
+
label: string;
|
|
31
|
+
value: string;
|
|
32
|
+
name?: string;
|
|
33
|
+
icon?: any;
|
|
34
|
+
lazy?: boolean;
|
|
35
|
+
}[];
|
|
36
|
+
justify?: "left" | "center" | "right";
|
|
37
|
+
color?: string;
|
|
38
|
+
mergeProp?: boolean;
|
|
39
|
+
labelWidth?: string;
|
|
40
|
+
error?: string;
|
|
41
|
+
showMessage?: boolean;
|
|
42
|
+
inlineMessage?: boolean;
|
|
43
|
+
size?: "medium" | "default" | "small";
|
|
44
|
+
};
|
|
45
|
+
span?: number;
|
|
46
|
+
col?: {
|
|
47
|
+
span: number;
|
|
48
|
+
offset: number;
|
|
49
|
+
push: number;
|
|
50
|
+
pull: number;
|
|
51
|
+
xs: any;
|
|
52
|
+
sm: any;
|
|
53
|
+
md: any;
|
|
54
|
+
lg: any;
|
|
55
|
+
xl: any;
|
|
56
|
+
tag: string;
|
|
57
|
+
};
|
|
58
|
+
group?: string;
|
|
59
|
+
collapse?: boolean;
|
|
60
|
+
value?: any;
|
|
61
|
+
label?: string;
|
|
62
|
+
renderLabel?: any;
|
|
63
|
+
flex?: boolean;
|
|
64
|
+
hook?: "string" | "number" | "boolean" | "join" | "split" | AnyString | "empty" | "booleanNumber" | "datetimeRange" | "splitJoin" | "json" | {
|
|
65
|
+
bind?: HlwForm.Hook["Pipe"] | HlwForm.Hook["Pipe"][];
|
|
66
|
+
submit?: HlwForm.Hook["Pipe"] | HlwForm.Hook["Pipe"][];
|
|
67
|
+
reset?: (prop: string) => string[];
|
|
68
|
+
};
|
|
69
|
+
hidden?: boolean | ((options: {
|
|
70
|
+
scope: obj;
|
|
71
|
+
}) => boolean);
|
|
72
|
+
prepend?: {
|
|
73
|
+
[x: string]: any;
|
|
74
|
+
name?: string;
|
|
75
|
+
options?: {
|
|
76
|
+
[x: string]: any;
|
|
77
|
+
label?: string;
|
|
78
|
+
value?: any;
|
|
79
|
+
color?: string;
|
|
80
|
+
type?: string;
|
|
81
|
+
}[] | {
|
|
82
|
+
value: {
|
|
83
|
+
[x: string]: any;
|
|
84
|
+
label?: string;
|
|
85
|
+
value?: any;
|
|
86
|
+
color?: string;
|
|
87
|
+
type?: string;
|
|
88
|
+
}[];
|
|
89
|
+
};
|
|
90
|
+
props?: {
|
|
91
|
+
[x: string]: any;
|
|
92
|
+
onChange?: (value: any) => void;
|
|
93
|
+
} | {
|
|
94
|
+
value: {
|
|
95
|
+
[x: string]: any;
|
|
96
|
+
onChange?: (value: any) => void;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
style?: obj;
|
|
100
|
+
slots?: {
|
|
101
|
+
[key: string]: (data?: any) => any;
|
|
102
|
+
};
|
|
103
|
+
vm?: any;
|
|
104
|
+
};
|
|
105
|
+
component?: {
|
|
106
|
+
[x: string]: any;
|
|
107
|
+
name?: string;
|
|
108
|
+
options?: {
|
|
109
|
+
[x: string]: any;
|
|
110
|
+
label?: string;
|
|
111
|
+
value?: any;
|
|
112
|
+
color?: string;
|
|
113
|
+
type?: string;
|
|
114
|
+
}[] | {
|
|
115
|
+
value: {
|
|
116
|
+
[x: string]: any;
|
|
117
|
+
label?: string;
|
|
118
|
+
value?: any;
|
|
119
|
+
color?: string;
|
|
120
|
+
type?: string;
|
|
121
|
+
}[];
|
|
122
|
+
};
|
|
123
|
+
props?: {
|
|
124
|
+
[x: string]: any;
|
|
125
|
+
onChange?: (value: any) => void;
|
|
126
|
+
} | {
|
|
127
|
+
value: {
|
|
128
|
+
[x: string]: any;
|
|
129
|
+
onChange?: (value: any) => void;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
style?: obj;
|
|
133
|
+
slots?: {
|
|
134
|
+
[key: string]: (data?: any) => any;
|
|
135
|
+
};
|
|
136
|
+
vm?: any;
|
|
137
|
+
};
|
|
138
|
+
append?: {
|
|
139
|
+
[x: string]: any;
|
|
140
|
+
name?: string;
|
|
141
|
+
options?: {
|
|
142
|
+
[x: string]: any;
|
|
143
|
+
label?: string;
|
|
144
|
+
value?: any;
|
|
145
|
+
color?: string;
|
|
146
|
+
type?: string;
|
|
147
|
+
}[] | {
|
|
148
|
+
value: {
|
|
149
|
+
[x: string]: any;
|
|
150
|
+
label?: string;
|
|
151
|
+
value?: any;
|
|
152
|
+
color?: string;
|
|
153
|
+
type?: string;
|
|
154
|
+
}[];
|
|
155
|
+
};
|
|
156
|
+
props?: {
|
|
157
|
+
[x: string]: any;
|
|
158
|
+
onChange?: (value: any) => void;
|
|
159
|
+
} | {
|
|
160
|
+
value: {
|
|
161
|
+
[x: string]: any;
|
|
162
|
+
onChange?: (value: any) => void;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
style?: obj;
|
|
166
|
+
slots?: {
|
|
167
|
+
[key: string]: (data?: any) => any;
|
|
168
|
+
};
|
|
169
|
+
vm?: any;
|
|
170
|
+
};
|
|
171
|
+
rules?: {
|
|
172
|
+
[x: string]: any;
|
|
173
|
+
type?: "string" | "number" | "boolean" | "method" | "regexp" | "integer" | "float" | "array" | "object" | "enum" | "date" | "url" | "hex" | "email" | "any";
|
|
174
|
+
required?: boolean;
|
|
175
|
+
message?: string;
|
|
176
|
+
min?: number;
|
|
177
|
+
max?: number;
|
|
178
|
+
trigger?: any;
|
|
179
|
+
validator?: (rule: any, value: any, callback: (error?: Error) => void) => void;
|
|
180
|
+
} | {
|
|
181
|
+
[x: string]: any;
|
|
182
|
+
type?: "string" | "number" | "boolean" | "method" | "regexp" | "integer" | "float" | "array" | "object" | "enum" | "date" | "url" | "hex" | "email" | "any";
|
|
183
|
+
required?: boolean;
|
|
184
|
+
message?: string;
|
|
185
|
+
min?: number;
|
|
186
|
+
max?: number;
|
|
187
|
+
trigger?: any;
|
|
188
|
+
validator?: (rule: any, value: any, callback: (error?: Error) => void) => void;
|
|
189
|
+
}[];
|
|
190
|
+
required?: boolean;
|
|
191
|
+
children?: any[];
|
|
192
|
+
}[];
|
|
193
|
+
form: obj;
|
|
194
|
+
isReset?: boolean;
|
|
195
|
+
on?: {
|
|
196
|
+
open?: (data: any) => void;
|
|
197
|
+
close?: (action: HlwForm.CloseAction, done: fn) => void;
|
|
198
|
+
submit?: (data: any, event: {
|
|
199
|
+
close: fn;
|
|
200
|
+
done: fn;
|
|
201
|
+
}) => void;
|
|
202
|
+
change?: (data: any, prop: string) => void;
|
|
203
|
+
};
|
|
204
|
+
op: {
|
|
205
|
+
hidden?: boolean;
|
|
206
|
+
saveButtonText?: string;
|
|
207
|
+
closeButtonText?: string;
|
|
208
|
+
justify?: "flex-start" | "center" | "flex-end";
|
|
209
|
+
buttons?: (`slot-${string}` | HlwForm.CloseAction | {
|
|
210
|
+
[x: string]: any;
|
|
211
|
+
label: string;
|
|
212
|
+
type?: string;
|
|
213
|
+
hidden?: boolean;
|
|
214
|
+
onClick: (options: {
|
|
215
|
+
scope: obj;
|
|
216
|
+
}) => void;
|
|
217
|
+
})[];
|
|
218
|
+
};
|
|
219
|
+
dialog: {
|
|
220
|
+
[x: string]: any;
|
|
221
|
+
title?: any;
|
|
222
|
+
height?: string;
|
|
223
|
+
width?: string;
|
|
224
|
+
hideHeader?: boolean;
|
|
225
|
+
controls?: Array<"fullscreen" | "close" | AnyString>;
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
form: obj;
|
|
229
|
+
visible: import('vue').Ref<boolean, boolean>;
|
|
230
|
+
saving: import('vue').Ref<boolean, boolean>;
|
|
231
|
+
loading: import('vue').Ref<boolean, boolean>;
|
|
232
|
+
disabled: import('vue').Ref<boolean, boolean>;
|
|
233
|
+
};
|
|
234
|
+
export * from './action';
|
|
235
|
+
export * from './api';
|
|
236
|
+
export * from './plugins';
|
|
237
|
+
export * from './tabs';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare function useTabs({ config, Form }: {
|
|
2
|
+
config: HlwForm.Config;
|
|
3
|
+
Form: Vue.Ref<any>;
|
|
4
|
+
}): {
|
|
5
|
+
active: import('vue').Ref<string, string>;
|
|
6
|
+
list: import('vue').ComputedRef<HlwFormTabs.labels>;
|
|
7
|
+
isLoaded: (value: any) => any;
|
|
8
|
+
onLoad: (value: any) => void;
|
|
9
|
+
get: () => HlwForm.Item<any>;
|
|
10
|
+
set: (data: any) => void;
|
|
11
|
+
change: (value: any, isValid?: boolean) => Promise<unknown>;
|
|
12
|
+
clear: () => void;
|
|
13
|
+
mergeProp: (item: HlwForm.Item) => void;
|
|
14
|
+
toGroup: (opts: {
|
|
15
|
+
config: HlwForm.Config;
|
|
16
|
+
prop: string;
|
|
17
|
+
refs: any;
|
|
18
|
+
}) => void;
|
|
19
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
name: StringConstructor;
|
|
3
|
+
inner: BooleanConstructor;
|
|
4
|
+
inline: BooleanConstructor;
|
|
5
|
+
enablePlugin: {
|
|
6
|
+
type: BooleanConstructor;
|
|
7
|
+
default: boolean;
|
|
8
|
+
};
|
|
9
|
+
}>, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
10
|
+
name: StringConstructor;
|
|
11
|
+
inner: BooleanConstructor;
|
|
12
|
+
inline: BooleanConstructor;
|
|
13
|
+
enablePlugin: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
17
|
+
}>> & Readonly<{}>, {
|
|
18
|
+
inline: boolean;
|
|
19
|
+
inner: boolean;
|
|
20
|
+
enablePlugin: boolean;
|
|
21
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
label: StringConstructor;
|
|
3
|
+
expand: {
|
|
4
|
+
type: BooleanConstructor;
|
|
5
|
+
default: boolean;
|
|
6
|
+
};
|
|
7
|
+
isExpand: {
|
|
8
|
+
type: BooleanConstructor;
|
|
9
|
+
default: boolean;
|
|
10
|
+
};
|
|
11
|
+
}>, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
12
|
+
label: StringConstructor;
|
|
13
|
+
expand: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
17
|
+
isExpand: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
}>> & Readonly<{}>, {
|
|
22
|
+
expand: boolean;
|
|
23
|
+
isExpand: boolean;
|
|
24
|
+
}, {}, {
|
|
25
|
+
ArrowDown: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{}>>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
26
|
+
ArrowUp: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{}>>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
27
|
+
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
28
|
+
export default _default;
|