@epie/bi-crud 2.0.3 → 2.0.4
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 +3 -3
- package/lib/bi-crud.esm.js +513 -113
- package/lib/bi-crud.umd.js +513 -112
- package/lib/components/adv-search.d.ts +4 -4
- package/lib/components/context-menu/index.d.ts +4 -4
- package/lib/components/crud/helper.d.ts +1 -0
- package/lib/components/crud/index.d.ts +1 -0
- package/lib/components/descriptions/helper.d.ts +3 -0
- package/lib/components/descriptions/index.d.ts +70 -0
- package/lib/components/filter-group.d.ts +5 -5
- package/lib/components/inline-search/index.d.ts +4 -4
- package/lib/components/table/index.d.ts +4 -4
- package/lib/components/upsert/index.d.ts +4 -4
- package/lib/css/bi-crud.min.css +1 -1
- package/lib/emitter.d.ts +2 -2
- package/lib/hooks/core.d.ts +2 -2
- package/lib/hooks/crud.d.ts +7 -6
- package/lib/types/base/adv-search.d.ts +4 -4
- package/lib/types/base/base.d.ts +14 -0
- package/lib/types/base/context-menu.d.ts +1 -1
- package/lib/types/base/crud.d.ts +2 -1
- package/lib/types/base/descriptions.d.ts +11 -0
- package/lib/types/base/emitter.d.ts +2 -2
- package/lib/types/base/form.d.ts +1 -1
- package/lib/types/base/index.d.ts +1 -0
- package/lib/types/base/table.d.ts +48 -50
- package/lib/types/base/upsert.d.ts +10 -10
- package/lib/types/emitter.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PropType } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { EpieForm } from "../types";
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
items: {
|
|
5
|
-
type: PropType<
|
|
5
|
+
type: PropType<EpieForm.Item[]>;
|
|
6
6
|
default: () => never[];
|
|
7
7
|
};
|
|
8
8
|
title: {
|
|
@@ -20,7 +20,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
20
20
|
onSearch: FunctionConstructor;
|
|
21
21
|
}, any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("reset" | "clear")[], "reset" | "clear", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
22
|
items: {
|
|
23
|
-
type: PropType<
|
|
23
|
+
type: PropType<EpieForm.Item[]>;
|
|
24
24
|
default: () => never[];
|
|
25
25
|
};
|
|
26
26
|
title: {
|
|
@@ -40,7 +40,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
40
40
|
onReset?: ((...args: any[]) => any) | undefined;
|
|
41
41
|
onClear?: ((...args: any[]) => any) | undefined;
|
|
42
42
|
}, {
|
|
43
|
-
items:
|
|
43
|
+
items: EpieForm.Item[];
|
|
44
44
|
title: string;
|
|
45
45
|
size: string | number;
|
|
46
46
|
op: unknown[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const
|
|
1
|
+
import { NSEpieContextMenu } from "../../types";
|
|
2
|
+
declare const EpieContextMenu: import("vue").DefineComponent<{
|
|
3
3
|
show: BooleanConstructor;
|
|
4
4
|
options: {
|
|
5
5
|
type: ObjectConstructor;
|
|
@@ -49,6 +49,6 @@ declare const ClContextMenu: import("vue").DefineComponent<{
|
|
|
49
49
|
event: Record<string, any>;
|
|
50
50
|
}>;
|
|
51
51
|
export declare const ContextMenu: {
|
|
52
|
-
open(event: any, options:
|
|
52
|
+
open(event: any, options: NSEpieContextMenu.Options): void;
|
|
53
53
|
};
|
|
54
|
-
export default
|
|
54
|
+
export default EpieContextMenu;
|
|
@@ -10,6 +10,7 @@ export declare function useHelper({ mitt, props, crud }: any): {
|
|
|
10
10
|
rowClose: () => void;
|
|
11
11
|
refresh: (params?: any) => Promise<unknown>;
|
|
12
12
|
doExport: (callback: Function) => void;
|
|
13
|
+
rowDescription: (data: any) => void;
|
|
13
14
|
getPermission: (key: "page" | "list" | "info" | "update" | "add" | "delete") => boolean;
|
|
14
15
|
paramsReplace: (params: any) => any;
|
|
15
16
|
getParams: () => Object;
|
|
@@ -73,6 +73,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
73
73
|
rowAppend: (data?: any) => any;
|
|
74
74
|
rowClose: () => any;
|
|
75
75
|
rowDelete: (...selection: any[]) => void;
|
|
76
|
+
rowDescription: (row?: any) => void;
|
|
76
77
|
refresh: (params?: {
|
|
77
78
|
[key: string]: any;
|
|
78
79
|
page?: number | undefined;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { PropType } from "vue";
|
|
2
|
+
import { EpieColumn } from "../../types";
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
border: {
|
|
5
|
+
type: BooleanConstructor;
|
|
6
|
+
default: boolean;
|
|
7
|
+
};
|
|
8
|
+
column: {
|
|
9
|
+
type: NumberConstructor;
|
|
10
|
+
default: number;
|
|
11
|
+
};
|
|
12
|
+
direction: {
|
|
13
|
+
type: PropType<"horizontal" | "vertical">;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
size: {
|
|
17
|
+
type: PropType<"" | "default" | "small" | "large">;
|
|
18
|
+
};
|
|
19
|
+
title: {
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
extra: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
27
|
+
columns: {
|
|
28
|
+
type: PropType<EpieColumn[]>;
|
|
29
|
+
default: never[];
|
|
30
|
+
};
|
|
31
|
+
}, {
|
|
32
|
+
show: import("vue").Ref<boolean>;
|
|
33
|
+
data: import("vue").Ref<any>;
|
|
34
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
35
|
+
border: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
39
|
+
column: {
|
|
40
|
+
type: NumberConstructor;
|
|
41
|
+
default: number;
|
|
42
|
+
};
|
|
43
|
+
direction: {
|
|
44
|
+
type: PropType<"horizontal" | "vertical">;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
size: {
|
|
48
|
+
type: PropType<"" | "default" | "small" | "large">;
|
|
49
|
+
};
|
|
50
|
+
title: {
|
|
51
|
+
type: StringConstructor;
|
|
52
|
+
default: string;
|
|
53
|
+
};
|
|
54
|
+
extra: {
|
|
55
|
+
type: StringConstructor;
|
|
56
|
+
default: string;
|
|
57
|
+
};
|
|
58
|
+
columns: {
|
|
59
|
+
type: PropType<EpieColumn[]>;
|
|
60
|
+
default: never[];
|
|
61
|
+
};
|
|
62
|
+
}>>, {
|
|
63
|
+
border: boolean;
|
|
64
|
+
column: number;
|
|
65
|
+
direction: "horizontal" | "vertical";
|
|
66
|
+
title: string;
|
|
67
|
+
extra: string;
|
|
68
|
+
columns: EpieColumn[];
|
|
69
|
+
}>;
|
|
70
|
+
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EpieForm } from "../types";
|
|
2
2
|
import { PropType } from "vue";
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
data: {
|
|
@@ -6,7 +6,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6
6
|
default: () => {};
|
|
7
7
|
};
|
|
8
8
|
items: {
|
|
9
|
-
type: PropType<
|
|
9
|
+
type: PropType<EpieForm.Item[]>;
|
|
10
10
|
default: () => never[];
|
|
11
11
|
};
|
|
12
12
|
resetBtn: {
|
|
@@ -15,7 +15,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
15
15
|
};
|
|
16
16
|
onSearch: FunctionConstructor;
|
|
17
17
|
}, {
|
|
18
|
-
Form: import("vue").Ref<
|
|
18
|
+
Form: import("vue").Ref<EpieForm.Ref | undefined>;
|
|
19
19
|
loading: import("vue").Ref<boolean>;
|
|
20
20
|
search: () => void;
|
|
21
21
|
reset: () => void;
|
|
@@ -25,7 +25,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
25
25
|
default: () => {};
|
|
26
26
|
};
|
|
27
27
|
items: {
|
|
28
|
-
type: PropType<
|
|
28
|
+
type: PropType<EpieForm.Item[]>;
|
|
29
29
|
default: () => never[];
|
|
30
30
|
};
|
|
31
31
|
resetBtn: {
|
|
@@ -35,7 +35,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
35
35
|
onSearch: FunctionConstructor;
|
|
36
36
|
}>>, {
|
|
37
37
|
data: Record<string, any>;
|
|
38
|
-
items:
|
|
38
|
+
items: EpieForm.Item[];
|
|
39
39
|
resetBtn: boolean;
|
|
40
40
|
}>;
|
|
41
41
|
export default _default;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { PropType } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { EpieForm } from "@/types";
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
data: {
|
|
5
5
|
type: ObjectConstructor;
|
|
6
6
|
default: () => {};
|
|
7
7
|
};
|
|
8
8
|
items: {
|
|
9
|
-
type: PropType<
|
|
9
|
+
type: PropType<EpieForm.Item[]>;
|
|
10
10
|
default: () => never[];
|
|
11
11
|
};
|
|
12
12
|
op: {
|
|
@@ -25,7 +25,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
25
25
|
default: () => {};
|
|
26
26
|
};
|
|
27
27
|
items: {
|
|
28
|
-
type: PropType<
|
|
28
|
+
type: PropType<EpieForm.Item[]>;
|
|
29
29
|
default: () => never[];
|
|
30
30
|
};
|
|
31
31
|
op: {
|
|
@@ -35,7 +35,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
35
35
|
onSearch: FunctionConstructor;
|
|
36
36
|
}>>, {
|
|
37
37
|
data: Record<string, any>;
|
|
38
|
-
items:
|
|
38
|
+
items: EpieForm.Item[];
|
|
39
39
|
op: unknown[];
|
|
40
40
|
}>;
|
|
41
41
|
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PropType } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { EpieColumn } from "../../types";
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
columns: {
|
|
5
|
-
type: PropType<
|
|
5
|
+
type: PropType<EpieColumn[]>;
|
|
6
6
|
default: never[];
|
|
7
7
|
};
|
|
8
8
|
height: NumberConstructor;
|
|
@@ -25,7 +25,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
25
25
|
};
|
|
26
26
|
}, any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("selection-change" | "sort-change")[], "selection-change" | "sort-change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
27
27
|
columns: {
|
|
28
|
-
type: PropType<
|
|
28
|
+
type: PropType<EpieColumn[]>;
|
|
29
29
|
default: never[];
|
|
30
30
|
};
|
|
31
31
|
height: NumberConstructor;
|
|
@@ -50,7 +50,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
50
50
|
"onSelection-change"?: ((...args: any[]) => any) | undefined;
|
|
51
51
|
"onSort-change"?: ((...args: any[]) => any) | undefined;
|
|
52
52
|
}, {
|
|
53
|
-
columns:
|
|
53
|
+
columns: EpieColumn[];
|
|
54
54
|
autoHeight: boolean;
|
|
55
55
|
contextMenu: boolean | unknown[];
|
|
56
56
|
sortRefresh: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { PropType } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { EpieForm } from "@/types";
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
items: {
|
|
5
|
-
type: PropType<
|
|
5
|
+
type: PropType<EpieForm.Item[]>;
|
|
6
6
|
default: () => never[];
|
|
7
7
|
};
|
|
8
8
|
props: PropType<ElementPlus.FormProps | undefined>;
|
|
@@ -26,7 +26,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
26
26
|
onSubmit: FunctionConstructor;
|
|
27
27
|
}, any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("opened" | "closed")[], "opened" | "closed", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
28
28
|
items: {
|
|
29
|
-
type: PropType<
|
|
29
|
+
type: PropType<EpieForm.Item[]>;
|
|
30
30
|
default: () => never[];
|
|
31
31
|
};
|
|
32
32
|
props: PropType<ElementPlus.FormProps | undefined>;
|
|
@@ -52,7 +52,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
52
52
|
onOpened?: ((...args: any[]) => any) | undefined;
|
|
53
53
|
onClosed?: ((...args: any[]) => any) | undefined;
|
|
54
54
|
}, {
|
|
55
|
-
items:
|
|
55
|
+
items: EpieForm.Item[];
|
|
56
56
|
sync: boolean;
|
|
57
57
|
}>;
|
|
58
58
|
export default _default;
|
package/lib/css/bi-crud.min.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
.epie-crud{display:flex;flex-direction:column;height:100%;position:relative;box-sizing:border-box;background-color:#fff;overflow:hidden}.epie-crud.is-border{border:1px solid #eee}.epie-crud .el-input-number__decrease,.epie-crud .el-input-number__increase{border:0;background-color:transparent}.epie-crud>.el-row{overflow-x:auto;overflow-y:hidden;flex-wrap:nowrap;padding-bottom:5px;margin-bottom:0}.epie-crud>.el-row.epie-no-scroll{overflow-x:hidden;overflow-y:hidden}.epie-crud>.el-row::-webkit-scrollbar{height:4px}.epie-crud>.el-row::-webkit-scrollbar-thumb{background-color:rgba(144,147,153,0.3);border-radius:5px}.epie-crud>.el-row::-webkit-scrollbar-track{background:transparent}.epie-crud>.el-row+.el-row{margin-top:5px}.epie-flex1{flex:1;font-size:12px}.epie-search-key{display:flex;margin-left:10px}.epie-search-key__select{margin-right:10px}.epie-search-key__select .el-input__inner{width:120px}.epie-search-key__input .el-input__inner{width:250px}.epie-search-key__button.el-button{margin-left:10px}.epie-table{width:100%}.epie-table .el-table.el-loading-parent--relative{box-sizing:border-box}.epie-table .el-table__header .el-table__cell{background-color:#ebeef5 !important}.epie-table .el-table__header .el-table__cell{color:#333}.epie-table .el-loading-mask .el-loading-spinner .el-icon-loading{font-size:25px;color:#000}.epie-table .el-loading-mask .el-loading-spinner .el-loading-text{color:#666;margin-top:5px}.epie-crud__op-dropdown-menu .el-dropdown-menu__item{height:30px;line-height:30px;padding:0}.epie-crud__op-dropdown-menu .el-button{height:30px;width:100%;padding:0 20px;text-align:left;box-sizing:border-box}.epie-query{display:inline-flex;margin:0 10px;border-radius:3px}.epie-query button{border:0;background-color:#fff;font-size:12px;outline:none;cursor:pointer;color:#666;white-space:nowrap}.epie-query button:hover{color:#6fa8ff}.epie-query button.is-active{color:#409eff}.epie-query button span{display:inline-block;padding:0 15px;border-right:1px solid #ddd}.epie-query button:last-child span{border:0}.epie-filter{display:flex;align-items:center;margin:0 10px}.epie-filter__label{font-size:12px;margin-right:10px;white-space:nowrap}.epie-filter .el-select{min-width:120px}.epie-filter-group{display:inline-flex;white-space:nowrap;margin:0 10px}.epie-filter-group__items{display:inline-flex}.epie-filter-group .el-form--inline .el-form-item{margin-right:10px;margin-bottom:0}.epie-filter-group .el-form--inline .el-form-item .el-date-editor{box-sizing:border-box}.epie-filter-group .el-form--inline .el-form-item .el-date-editor .el-range-input:nth-child(2){margin-left:5px}.epie-adv-search.el-drawer{background-color:#fff}.epie-adv-search .el-drawer__body{padding:0}.epie-adv-search__header{display:flex;align-items:center;justify-content:space-between;height:50px;padding:0 15px 0 20px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.epie-adv-search__header .text{font-size:16px}.epie-adv-search__header .el-icon{cursor:pointer}.epie-adv-search__header .el-icon:hover{color:red}.epie-adv-search__container{height:calc(100% - 100px);overflow-y:auto;padding:10px 20px;box-sizing:border-box}.epie-adv-search__container::-webkit-scrollbar{width:6px}.epie-adv-search__container::-webkit-scrollbar-thumb{border-radius:6px;background-color:rgba(144,147,153,0.3)}.epie-adv-search__container .el-form-item__content>div{width:100%}.epie-adv-search__footer{display:flex;align-items:center;justify-content:flex-end;height:50px;border-top:1px solid #ebeef5;padding:0 10px;box-sizing:border-box}.epie-inline-search .el-drawer__header{margin-bottom:20px}.epie-inline-search .el-drawer__body{height:calc(100% - 63px);padding:0 5px}.epie-inline-search__container{height:calc(100% - 55px);overflow-y:auto;padding:10px 20px;margin-bottom:5px;box-sizing:border-box}.epie-inline-search__container::-webkit-scrollbar{width:6px}.epie-inline-search__container::-webkit-scrollbar-thumb{border-radius:6px;background-color:rgba(144,147,153,0.3)}.epie-inline-search__container .el-form-item__content>div{width:100%}.epie-inline-search__footer{display:flex;align-items:center;justify-content:flex-end;height:50px;border-top:1px solid #ebeef5}.epie-inline-search .el-drawer{outline:none}.epie-inline-search .el-drawer__header span{outline:none;font-size:15px}.epie-inline-search .el-drawer__close-btn{outline:none}.epie-form .el-form-item .el-input-number__decrease,.epie-form .el-form-item .el-input-number__increase{border:0;background-color:transparent}.epie-form .el-form-item__label .el-tooltip i{margin-left:5px}.epie-form .el-form-item__content{min-width:0px}.epie-form .el-form-item__content>div{width:100%}.epie-form-item{display:flex}.epie-form-item__prepend{margin-right:10px}.epie-form-item__component.is-flex{flex:1;width:100%}.epie-form-item__component.is-flex>div{width:100%}.epie-form-item__append{margin-left:10px}.epie-form-item__collapse{width:100%;font-size:12px;cursor:pointer}.epie-form-item__collapse .el-divider{margin:16px 0}.epie-form-item__collapse .el-divider__text{font-size:12px}.epie-form-item__collapse i{margin-left:6px}.epie-form-item .el-table__header tr{line-height:normal}.epie-form__footer{display:flex;justify-content:flex-end}.epie-form-tabs{border-bottom:1px solid #ccc;overflow:hidden;width:calc(100% - 10px);margin:0 5px 20px 5px}.epie-form-tabs ul{height:35px;width:100%;overflow-x:auto;white-space:nowrap;position:relative;scrollbar-width:none;-ms-overflow-style:none}.epie-form-tabs ul::-webkit-scrollbar{display:none}.epie-form-tabs ul li{display:inline-block;list-style:none;padding:0 20px;height:35px;line-height:35px;cursor:pointer}.epie-form-tabs__line{height:2px;width:100%;position:absolute;bottom:-1px;left:0;transition:transform 0.3s ease-in-out,width 0.2s 0.1s cubic-bezier(0.645,0.045,0.355,1)}.epie-dialog .el-dialog__header{padding:0;text-align:center;border-bottom:1px solid #f7f7f7;margin-right:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.epie-dialog .el-dialog__header-slot.is-drag{-moz-user-select:none;-webkit-user-select:none;user-select:none;cursor:move}.epie-dialog .el-dialog__body{padding:20px}.epie-dialog .el-dialog__footer{padding:0}.epie-dialog__header{position:relative;padding:10px}.epie-dialog__footer{padding:20px}.epie-dialog__title{display:block;font-size:15px;text-align:center;letter-spacing:0.5px}.epie-dialog__controls{display:flex;justify-content:flex-end;position:absolute;right:0;top:0;z-index:9;width:100%}.epie-dialog__controls-icon,.epie-dialog__controls .minimize,.epie-dialog__controls .maximize,.epie-dialog__controls .close{display:flex;align-items:center;justify-content:center;height:40px;width:40px;border:0;background-color:#fff;cursor:pointer;outline:none}.epie-dialog__controls-icon i,.epie-dialog__controls .minimize i,.epie-dialog__controls .maximize i,.epie-dialog__controls .close i{font-size:18px}.epie-dialog__controls-icon i:hover,.epie-dialog__controls .minimize i:hover,.epie-dialog__controls .maximize i:hover,.epie-dialog__controls .close i:hover{opacity:0.7}.epie-dialog.hidden-header .el-dialog__header{display:none}.epie-context-menu{position:absolute;z-index:9999}.epie-context-menu__box{box-shadow:0 2px 12px 0 rgba(0,0,0,0.1);width:160px;background-color:#fff;border-radius:3px;position:absolute;top:0}.epie-context-menu__box.is-append{right:calc(-100% - 5px);top:-5px}.epie-context-menu__box>div{display:flex;align-items:center;height:35px;font-size:13px;cursor:pointer;padding:0 15px;color:#666;position:relative}.epie-context-menu__box>div:first-child{margin-top:5px}.epie-context-menu__box>div:last-child{margin-bottom:5px}.epie-context-menu__box>div span{height:35px;line-height:35px;flex:1}.epie-context-menu__box>div:hover{background-color:#f7f7f7;color:#000}.epie-context-menu__box>div i:first-child{margin-right:5px}.epie-context-menu__box>div i:last-child{margin-left:5px}.epie-context-menu__box>div.is-active{background-color:#f7f7f7;color:#000}.epie-context-menu__box>div.is-ellipsis span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.epie-context-menu__box>div.is-disabled span{color:#ccc}.epie-context-menu__box>div.is-disabled span:hover{color:#ccc}.epie-context-menu__target{position:relative}.epie-context-menu__target::after{content:"";display:block;position:absolute;left:0;top:0;height:100%;width:100%;background-color:rgba(0,0,0,0.05)}.el-message,.el-overlay.is-message-box{z-index:10000 !important}.el-message.el-message--success,.el-message.el-message--error,.el-message.el-message--info,.el-message.el-message--warning{min-width:auto;background-color:#fff;box-shadow:0 4px 12px rgba(0,0,0,0.15);border:0;padding:12px 20px 12px 15px}.el-message.el-message--success .el-message__content,.el-message.el-message--error .el-message__content,.el-message.el-message--info .el-message__content,.el-message.el-message--warning .el-message__content{color:#999}.epie-descriptions.el-drawer{background-color:#fff}.epie-descriptions .el-drawer__body{padding:0}.epie-descriptions__header{display:flex;align-items:center;justify-content:space-between;height:50px;padding:0 15px 0 20px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.epie-descriptions__header .text{font-size:16px}.epie-descriptions__header .el-icon{cursor:pointer}.epie-descriptions__header .el-icon:hover{color:red}.epie-descriptions__container{height:calc(100% - 100px);overflow-y:auto;padding:10px 20px;box-sizing:border-box}.epie-descriptions__container::-webkit-scrollbar{width:6px}.epie-descriptions__container::-webkit-scrollbar-thumb{border-radius:6px;background-color:rgba(144,147,153,0.3)}.epie-descriptions__container .el-form-item__content>div{width:100%}.epie-descriptions__footer{display:flex;align-items:center;justify-content:flex-end;height:50px;border-top:1px solid #ebeef5;padding:0 10px;box-sizing:border-box}@media only screen and (max-width:768px){.el-message-box{width:90% !important}.el-table__body-wrapper::-webkit-scrollbar{height:6px;width:6px}}
|
package/lib/emitter.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const crudList:
|
|
1
|
+
import { EpieCrud, Emitter } from "./types";
|
|
2
|
+
export declare const crudList: EpieCrud.Ref[];
|
|
3
3
|
export declare const emitter: Emitter;
|
package/lib/hooks/core.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EpieCrud, Emitter } from "../types";
|
|
2
2
|
export declare function useRefs(): {
|
|
3
3
|
refs: any;
|
|
4
4
|
setRefs: (index: number) => (el: HTMLElement) => void;
|
|
@@ -8,6 +8,6 @@ export declare function useTools(): {
|
|
|
8
8
|
style: any;
|
|
9
9
|
};
|
|
10
10
|
export declare function useCore(): {
|
|
11
|
-
crud:
|
|
11
|
+
crud: EpieCrud.Provide;
|
|
12
12
|
mitt: Emitter;
|
|
13
13
|
};
|
package/lib/hooks/crud.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { Ref } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
export declare function useCrud(options?:
|
|
4
|
-
export declare function useUpsert(options?:
|
|
5
|
-
export declare function useTable(options?:
|
|
6
|
-
export declare function useAdvSearch(options:
|
|
7
|
-
export declare function useForm(cb?: (app:
|
|
2
|
+
import { EpieAdvSearch, EpieCrud, EpieForm, EpieTable, EpieUpsert, EpieDescriptionsProps } from "../types";
|
|
3
|
+
export declare function useCrud(options?: EpieCrud.Props, cb?: (app: EpieCrud.Ref) => void): Ref<EpieCrud.Ref | undefined>;
|
|
4
|
+
export declare function useUpsert(options?: EpieUpsert.Props): Ref<EpieUpsert.Ref | undefined>;
|
|
5
|
+
export declare function useTable(options?: EpieTable.Props): Ref<EpieTable.Ref | undefined>;
|
|
6
|
+
export declare function useAdvSearch(options: EpieAdvSearch.Props): Ref<EpieAdvSearch.Ref | undefined>;
|
|
7
|
+
export declare function useForm(cb?: (app: EpieForm.Ref) => void): Ref<EpieForm.Ref | undefined>;
|
|
8
8
|
export declare function useDialog(options?: {
|
|
9
9
|
onFullscreen(visible: boolean): void;
|
|
10
10
|
}): {
|
|
11
11
|
fullscreen: Ref<boolean>;
|
|
12
12
|
visible: Ref<boolean>;
|
|
13
13
|
} | undefined;
|
|
14
|
+
export declare function useDescriptions(options?: EpieDescriptionsProps): Ref<any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare namespace
|
|
1
|
+
import { EpieForm } from ".";
|
|
2
|
+
export declare namespace EpieAdvSearch {
|
|
3
3
|
interface Props {
|
|
4
|
-
items:
|
|
4
|
+
items: EpieForm.Item[];
|
|
5
5
|
title?: string;
|
|
6
6
|
size?: string | number;
|
|
7
7
|
op?: Array<"clear" | "reset" | "close" | "save">;
|
|
@@ -10,6 +10,6 @@ export declare namespace ClAdvSearch {
|
|
|
10
10
|
close(): void;
|
|
11
11
|
}): void;
|
|
12
12
|
}
|
|
13
|
-
interface Ref extends
|
|
13
|
+
interface Ref extends EpieForm.Ref {
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Render } from ".";
|
|
2
|
+
/** 支持的变形,还未完全支持完毕 */
|
|
3
|
+
export declare type EpieSchemaComponentTypes = 'descriptions' | 'table' | undefined;
|
|
4
|
+
export declare type EpieSchema<ComponentsType = EpieSchemaComponentTypes> = {
|
|
5
|
+
hide?: boolean;
|
|
6
|
+
prop?: string;
|
|
7
|
+
component?: Render.Options;
|
|
8
|
+
formatter?: ((row: any, column: any, value: any, index: number) => any) | undefined;
|
|
9
|
+
/** @name 在 descriptions 隐藏 */
|
|
10
|
+
hideInDescriptions?: boolean;
|
|
11
|
+
/** @name 在 Form 中隐藏 */
|
|
12
|
+
/** @name 在 table 中隐藏 */
|
|
13
|
+
hideInTable?: boolean;
|
|
14
|
+
};
|
package/lib/types/base/crud.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { fun } from ".";
|
|
2
|
-
export declare namespace
|
|
2
|
+
export declare namespace EpieCrud {
|
|
3
3
|
interface Dict {
|
|
4
4
|
api?: {
|
|
5
5
|
list?: string;
|
|
@@ -122,6 +122,7 @@ export declare namespace ClCrud {
|
|
|
122
122
|
rowAppend(data?: any): any;
|
|
123
123
|
rowClose(): any;
|
|
124
124
|
rowDelete(...selection: any[]): void;
|
|
125
|
+
rowDescription(row?: any): void;
|
|
125
126
|
refresh: Service["page"]["request"];
|
|
126
127
|
}
|
|
127
128
|
interface Provide extends Ref {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EpieSchema } from "./base";
|
|
2
|
+
export declare type EpieDescriptionsItemProps = EpieSchema<"descriptions"> & {};
|
|
3
|
+
export declare type EpieDescriptionsProps = {
|
|
4
|
+
border?: boolean;
|
|
5
|
+
column?: number;
|
|
6
|
+
direction?: "vertical" | "horizontal";
|
|
7
|
+
size?: "" | "default" | "small" | "large";
|
|
8
|
+
title?: string;
|
|
9
|
+
extra?: string;
|
|
10
|
+
columns?: EpieDescriptionsItemProps[];
|
|
11
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EpieCrud } from ".";
|
|
2
2
|
export declare interface EmitterItem {
|
|
3
3
|
name: string;
|
|
4
4
|
callback(data: any, events: {
|
|
5
5
|
refresh(params: any): void;
|
|
6
|
-
crudList:
|
|
6
|
+
crudList: EpieCrud.Ref[];
|
|
7
7
|
}): void;
|
|
8
8
|
}
|
|
9
9
|
export declare interface Emitter {
|
package/lib/types/base/form.d.ts
CHANGED
|
@@ -1,6 +1,49 @@
|
|
|
1
1
|
import { Ref as VueRef } from "vue";
|
|
2
|
-
import { fun,
|
|
3
|
-
|
|
2
|
+
import { fun, NSEpieContextMenu, Render } from ".";
|
|
3
|
+
import { EpieSchema } from "./base";
|
|
4
|
+
export declare type EpieColumn = EpieSchema<"table"> & {
|
|
5
|
+
type?: "index" | "selection" | "expand" | "op";
|
|
6
|
+
dict?: Array<{
|
|
7
|
+
label: string;
|
|
8
|
+
value?: any;
|
|
9
|
+
type?: "success" | "warning" | "info" | "danger";
|
|
10
|
+
size?: "medium" | "default" | "small";
|
|
11
|
+
effect?: "dark" | "light" | "plain";
|
|
12
|
+
color?: string;
|
|
13
|
+
}>;
|
|
14
|
+
buttons?: Array<"edit" | "delete" | Render.OpButton>;
|
|
15
|
+
align?: "left" | "center" | "right";
|
|
16
|
+
label?: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
width?: number;
|
|
19
|
+
minWidth?: number | string;
|
|
20
|
+
renderHeader?: fun;
|
|
21
|
+
sortable?: boolean | "desc" | "descending" | "ascending" | "asc" | "custom" | string;
|
|
22
|
+
sortMethod?: fun;
|
|
23
|
+
sortBy?: string | fun | unknown[];
|
|
24
|
+
resizable?: {
|
|
25
|
+
type: boolean;
|
|
26
|
+
default: true;
|
|
27
|
+
};
|
|
28
|
+
columnKey?: string;
|
|
29
|
+
headerAlign?: string;
|
|
30
|
+
showOverflowTooltip?: boolean;
|
|
31
|
+
fixed?: boolean | string;
|
|
32
|
+
selectable?: fun;
|
|
33
|
+
reserveSelection?: boolean;
|
|
34
|
+
filterMethod?: fun;
|
|
35
|
+
filteredValue?: unknown[];
|
|
36
|
+
filters?: unknown[];
|
|
37
|
+
filterPlacement?: string;
|
|
38
|
+
filterMultiple?: {
|
|
39
|
+
type: boolean;
|
|
40
|
+
default: true;
|
|
41
|
+
};
|
|
42
|
+
index?: number | fun;
|
|
43
|
+
sortOrders?: unknown[];
|
|
44
|
+
detailExpand?: boolean;
|
|
45
|
+
};
|
|
46
|
+
export declare namespace EpieTable {
|
|
4
47
|
type Dict = Array<{
|
|
5
48
|
label: string;
|
|
6
49
|
value?: any;
|
|
@@ -9,59 +52,14 @@ export declare namespace ClTable {
|
|
|
9
52
|
effect?: "dark" | "light" | "plain";
|
|
10
53
|
color?: string;
|
|
11
54
|
}> | VueRef<Dict>;
|
|
12
|
-
interface Column {
|
|
13
|
-
type?: "index" | "selection" | "expand" | "op";
|
|
14
|
-
hidden?: boolean;
|
|
15
|
-
component?: Render.Options;
|
|
16
|
-
dict?: Array<{
|
|
17
|
-
label: string;
|
|
18
|
-
value?: any;
|
|
19
|
-
type?: "success" | "warning" | "info" | "danger";
|
|
20
|
-
size?: "medium" | "default" | "small";
|
|
21
|
-
effect?: "dark" | "light" | "plain";
|
|
22
|
-
color?: string;
|
|
23
|
-
}>;
|
|
24
|
-
buttons?: Array<"edit" | "delete" | Render.OpButton>;
|
|
25
|
-
align?: "left" | "center" | "right";
|
|
26
|
-
label?: string;
|
|
27
|
-
className?: string;
|
|
28
|
-
prop?: string;
|
|
29
|
-
width?: number;
|
|
30
|
-
minWidth?: number | string;
|
|
31
|
-
renderHeader?: fun;
|
|
32
|
-
sortable?: boolean | "desc" | "descending" | "ascending" | "asc" | "custom" | string;
|
|
33
|
-
sortMethod?: fun;
|
|
34
|
-
sortBy?: string | fun | unknown[];
|
|
35
|
-
resizable?: {
|
|
36
|
-
type: boolean;
|
|
37
|
-
default: true;
|
|
38
|
-
};
|
|
39
|
-
columnKey?: string;
|
|
40
|
-
headerAlign?: string;
|
|
41
|
-
showOverflowTooltip?: boolean;
|
|
42
|
-
fixed?: boolean | string;
|
|
43
|
-
formatter?: ((row: any, column: any, value: any, index: number) => any) | undefined;
|
|
44
|
-
selectable?: fun;
|
|
45
|
-
reserveSelection?: boolean;
|
|
46
|
-
filterMethod?: fun;
|
|
47
|
-
filteredValue?: unknown[];
|
|
48
|
-
filters?: unknown[];
|
|
49
|
-
filterPlacement?: string;
|
|
50
|
-
filterMultiple?: {
|
|
51
|
-
type: boolean;
|
|
52
|
-
default: true;
|
|
53
|
-
};
|
|
54
|
-
index?: number | fun;
|
|
55
|
-
sortOrders?: unknown[];
|
|
56
|
-
}
|
|
57
55
|
interface Props {
|
|
58
|
-
columns:
|
|
59
|
-
contextMenu?: boolean | Array<
|
|
56
|
+
columns: EpieColumn[];
|
|
57
|
+
contextMenu?: boolean | Array<NSEpieContextMenu.Item | ((row: any) => NSEpieContextMenu.Item) | "refresh" | "check" | "update" | "edit" | "delete" | "order-desc" | "order-asc">;
|
|
60
58
|
}
|
|
61
59
|
interface Ref {
|
|
62
60
|
selection: any[];
|
|
63
61
|
data: any[];
|
|
64
|
-
columns:
|
|
62
|
+
columns: EpieColumn[];
|
|
65
63
|
showColumn(prop: string | string[], status?: boolean): void;
|
|
66
64
|
hideColumn(prop: string | string[]): void;
|
|
67
65
|
changeSort(prop: string, order: string): void;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare namespace
|
|
1
|
+
import { EpieForm, fun, EpieCrud } from ".";
|
|
2
|
+
export declare namespace EpieUpsert {
|
|
3
3
|
interface Props {
|
|
4
|
-
items:
|
|
5
|
-
props?:
|
|
4
|
+
items: EpieForm.Item[];
|
|
5
|
+
props?: EpieForm.Options["props"];
|
|
6
6
|
sync?: boolean;
|
|
7
|
-
op?:
|
|
8
|
-
dialog?:
|
|
7
|
+
op?: EpieForm.Options["op"];
|
|
8
|
+
dialog?: EpieForm.Options["dialog"];
|
|
9
9
|
onOpen?(isEdit: boolean, data: any): void;
|
|
10
10
|
onClose?(done: fun): void;
|
|
11
|
-
onInfo?(data:
|
|
11
|
+
onInfo?(data: EpieCrud.Service["info"]["params"], event: {
|
|
12
12
|
close: fun;
|
|
13
13
|
done(data: any): void;
|
|
14
|
-
next:
|
|
14
|
+
next: EpieCrud.Service["info"]["request"];
|
|
15
15
|
}): void;
|
|
16
16
|
onSubmit?(isEdit: boolean, data: any, event: {
|
|
17
17
|
close: fun;
|
|
18
18
|
done: fun;
|
|
19
|
-
next:
|
|
19
|
+
next: EpieCrud.Service["upsert"]["request"];
|
|
20
20
|
}): void;
|
|
21
21
|
}
|
|
22
|
-
interface Ref extends
|
|
22
|
+
interface Ref extends EpieForm.Ref {
|
|
23
23
|
}
|
|
24
24
|
}
|
package/lib/types/emitter.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const crudList:
|
|
1
|
+
import { EpieCrud, Emitter } from ".";
|
|
2
|
+
export declare const crudList: EpieCrud.Ref[];
|
|
3
3
|
export declare const emitter: Emitter;
|