morningfast-plus 1.0.21 → 1.1.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/components/_internal/use-sortable/index.d.ts +22 -0
- package/components/column-setting/index.d.ts +7 -0
- package/components/column-setting/src/column-setting.d.ts +34 -0
- package/components/column-setting/src/column-setting.vue.d.ts +72 -0
- package/components/column-setting/src/types.d.ts +27 -0
- package/components/column-setting/src/use-column-setting.d.ts +16 -0
- package/components/components.css +1 -1
- package/components/drawer/index.d.ts +5 -0
- package/components/drawer/src/drawer.d.ts +86 -0
- package/components/drawer/src/drawer.vue.d.ts +203 -0
- package/components/edit-table/index.d.ts +12 -0
- package/components/edit-table/src/edit-table.d.ts +65 -0
- package/components/edit-table/src/edit-table.vue.d.ts +179 -0
- package/components/edit-table/src/instance.d.ts +12 -0
- package/components/edit-table/src/types.d.ts +39 -0
- package/components/export-setting/index.d.ts +7 -0
- package/components/export-setting/src/export-setting.d.ts +51 -0
- package/components/export-setting/src/export-setting.vue.d.ts +108 -0
- package/components/export-setting/src/types.d.ts +15 -0
- package/components/export-setting/src/use-export-setting.d.ts +8 -0
- package/components/form/index.d.ts +14 -0
- package/components/form/src/field-renderer/index.d.ts +38 -0
- package/components/form/src/field-renderer/src/field-components.d.ts +7 -0
- package/components/form/src/field-renderer/src/field-renderer.vue.d.ts +19 -0
- package/components/form/src/field-renderer/src/register-fields.d.ts +1 -0
- package/components/form/src/field-renderer/src/types.d.ts +50 -0
- package/components/form/src/form-item-renderer.vue.d.ts +24 -0
- package/components/form/src/form-renderer.vue.d.ts +29 -0
- package/components/form/src/form.d.ts +56 -0
- package/components/form/src/form.vue.d.ts +140 -0
- package/components/form/src/instance.d.ts +9 -0
- package/components/form/src/model.d.ts +2 -0
- package/components/form/src/types.d.ts +33 -0
- package/components/index.cjs +2 -2
- package/components/index.d.ts +9 -0
- package/components/index.mjs +3 -3
- package/components/input/src/extra.vue.d.ts +4 -4
- package/components/input/src/input.vue.d.ts +1 -1
- package/components/loading/index.d.ts +2 -1
- package/components/loading/src/instance.d.ts +2 -0
- package/components/loading/src/loading.d.ts +28 -4
- package/components/loading/src/loading.vue.d.ts +59 -8
- package/components/loading/src/service.d.ts +17 -0
- package/components/main-container-default/index.d.ts +6 -0
- package/components/main-container-default/src/instance.d.ts +5 -0
- package/components/main-container-default/src/main-container-default.d.ts +35 -0
- package/components/main-container-default/src/main-container-default.vue.d.ts +89 -0
- package/components/private/layout/src/aside.vue.d.ts +1 -1
- package/components/private/layout/src/header.vue.d.ts +1 -1
- package/components/private/layout/src/layout.vue.d.ts +1 -1
- package/components/private/user-select/src/user-select.d.ts +3 -3
- package/components/private/user-select-architecture/src/user-select-architecture.vue.d.ts +8 -8
- package/components/product-select/src/product-select.vue.d.ts +2 -2
- package/components/scan-input/src/scan-input.vue.d.ts +13 -13
- package/components/search-form/index.d.ts +10 -0
- package/components/search-form/src/search-form.d.ts +122 -0
- package/components/search-form/src/search-form.vue.d.ts +43 -0
- package/components/table/index.d.ts +11 -0
- package/components/table/src/table.d.ts +73 -0
- package/components/table/src/table.vue.d.ts +182 -0
- package/components/table/src/types.d.ts +52 -0
- package/components/templates/table-page/index.d.ts +14 -0
- package/components/templates/table-page/src/instance.d.ts +17 -0
- package/components/templates/table-page/src/table-page.d.ts +93 -0
- package/components/templates/table-page/src/table-page.vue.d.ts +211 -0
- package/components/templates/table-page/src/types.d.ts +199 -0
- package/components/templates/table-page/src/use-table-page-summary.d.ts +7 -0
- package/components/templates/table-page/src/use-table-page.d.ts +2 -0
- package/components/upload/src/button.vue.d.ts +2 -2
- package/components/upload/src/list.vue.d.ts +2 -2
- package/components/upload/src/picture.vue.d.ts +2 -2
- package/components/upload/src/upload.vue.d.ts +2 -2
- package/package.json +1 -1
- package/shared/index.cjs +1 -1
- package/shared/index.d.ts +1 -0
- package/shared/index.mjs +1 -1
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
default?(_: {}): any;
|
|
5
|
+
footer?(_: {}): any;
|
|
6
|
+
'footer-left'?(_: {}): any;
|
|
7
|
+
};
|
|
8
|
+
refs: {};
|
|
9
|
+
rootEl: any;
|
|
10
|
+
};
|
|
11
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
12
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
13
|
+
readonly modelValue: {
|
|
14
|
+
readonly type: BooleanConstructor;
|
|
15
|
+
readonly default: false;
|
|
16
|
+
};
|
|
17
|
+
readonly title: {
|
|
18
|
+
readonly type: StringConstructor;
|
|
19
|
+
readonly default: "";
|
|
20
|
+
};
|
|
21
|
+
readonly size: {
|
|
22
|
+
readonly type: import('vue').PropType<string | number>;
|
|
23
|
+
readonly default: "360px";
|
|
24
|
+
};
|
|
25
|
+
readonly direction: {
|
|
26
|
+
readonly type: import('vue').PropType<"rtl" | "ltr" | "ttb" | "btt">;
|
|
27
|
+
readonly default: "rtl";
|
|
28
|
+
};
|
|
29
|
+
readonly appendToBody: {
|
|
30
|
+
readonly type: BooleanConstructor;
|
|
31
|
+
readonly default: true;
|
|
32
|
+
};
|
|
33
|
+
readonly appendTo: {
|
|
34
|
+
readonly type: import('vue').PropType<string | HTMLElement>;
|
|
35
|
+
readonly default: undefined;
|
|
36
|
+
};
|
|
37
|
+
readonly modal: {
|
|
38
|
+
readonly type: BooleanConstructor;
|
|
39
|
+
readonly default: true;
|
|
40
|
+
};
|
|
41
|
+
readonly lockScroll: {
|
|
42
|
+
readonly type: BooleanConstructor;
|
|
43
|
+
readonly default: true;
|
|
44
|
+
};
|
|
45
|
+
readonly closeOnClickModal: {
|
|
46
|
+
readonly type: BooleanConstructor;
|
|
47
|
+
readonly default: true;
|
|
48
|
+
};
|
|
49
|
+
readonly withHeader: {
|
|
50
|
+
readonly type: BooleanConstructor;
|
|
51
|
+
readonly default: true;
|
|
52
|
+
};
|
|
53
|
+
readonly destroyOnClose: {
|
|
54
|
+
readonly type: BooleanConstructor;
|
|
55
|
+
readonly default: false;
|
|
56
|
+
};
|
|
57
|
+
readonly cancelText: {
|
|
58
|
+
readonly type: StringConstructor;
|
|
59
|
+
readonly default: "取消";
|
|
60
|
+
};
|
|
61
|
+
readonly confirmText: {
|
|
62
|
+
readonly type: StringConstructor;
|
|
63
|
+
readonly default: "确定";
|
|
64
|
+
};
|
|
65
|
+
readonly cancelDisabled: {
|
|
66
|
+
readonly type: BooleanConstructor;
|
|
67
|
+
readonly default: false;
|
|
68
|
+
};
|
|
69
|
+
readonly confirmDisabled: {
|
|
70
|
+
readonly type: BooleanConstructor;
|
|
71
|
+
readonly default: false;
|
|
72
|
+
};
|
|
73
|
+
readonly confirmLoading: {
|
|
74
|
+
readonly type: BooleanConstructor;
|
|
75
|
+
readonly default: false;
|
|
76
|
+
};
|
|
77
|
+
readonly showFooter: {
|
|
78
|
+
readonly type: BooleanConstructor;
|
|
79
|
+
readonly default: true;
|
|
80
|
+
};
|
|
81
|
+
readonly showCancel: {
|
|
82
|
+
readonly type: BooleanConstructor;
|
|
83
|
+
readonly default: true;
|
|
84
|
+
};
|
|
85
|
+
readonly showConfirm: {
|
|
86
|
+
readonly type: BooleanConstructor;
|
|
87
|
+
readonly default: true;
|
|
88
|
+
};
|
|
89
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
90
|
+
cancel: () => void;
|
|
91
|
+
"update:modelValue": (value: boolean) => void;
|
|
92
|
+
confirm: () => void;
|
|
93
|
+
closed: () => void;
|
|
94
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
95
|
+
readonly modelValue: {
|
|
96
|
+
readonly type: BooleanConstructor;
|
|
97
|
+
readonly default: false;
|
|
98
|
+
};
|
|
99
|
+
readonly title: {
|
|
100
|
+
readonly type: StringConstructor;
|
|
101
|
+
readonly default: "";
|
|
102
|
+
};
|
|
103
|
+
readonly size: {
|
|
104
|
+
readonly type: import('vue').PropType<string | number>;
|
|
105
|
+
readonly default: "360px";
|
|
106
|
+
};
|
|
107
|
+
readonly direction: {
|
|
108
|
+
readonly type: import('vue').PropType<"rtl" | "ltr" | "ttb" | "btt">;
|
|
109
|
+
readonly default: "rtl";
|
|
110
|
+
};
|
|
111
|
+
readonly appendToBody: {
|
|
112
|
+
readonly type: BooleanConstructor;
|
|
113
|
+
readonly default: true;
|
|
114
|
+
};
|
|
115
|
+
readonly appendTo: {
|
|
116
|
+
readonly type: import('vue').PropType<string | HTMLElement>;
|
|
117
|
+
readonly default: undefined;
|
|
118
|
+
};
|
|
119
|
+
readonly modal: {
|
|
120
|
+
readonly type: BooleanConstructor;
|
|
121
|
+
readonly default: true;
|
|
122
|
+
};
|
|
123
|
+
readonly lockScroll: {
|
|
124
|
+
readonly type: BooleanConstructor;
|
|
125
|
+
readonly default: true;
|
|
126
|
+
};
|
|
127
|
+
readonly closeOnClickModal: {
|
|
128
|
+
readonly type: BooleanConstructor;
|
|
129
|
+
readonly default: true;
|
|
130
|
+
};
|
|
131
|
+
readonly withHeader: {
|
|
132
|
+
readonly type: BooleanConstructor;
|
|
133
|
+
readonly default: true;
|
|
134
|
+
};
|
|
135
|
+
readonly destroyOnClose: {
|
|
136
|
+
readonly type: BooleanConstructor;
|
|
137
|
+
readonly default: false;
|
|
138
|
+
};
|
|
139
|
+
readonly cancelText: {
|
|
140
|
+
readonly type: StringConstructor;
|
|
141
|
+
readonly default: "取消";
|
|
142
|
+
};
|
|
143
|
+
readonly confirmText: {
|
|
144
|
+
readonly type: StringConstructor;
|
|
145
|
+
readonly default: "确定";
|
|
146
|
+
};
|
|
147
|
+
readonly cancelDisabled: {
|
|
148
|
+
readonly type: BooleanConstructor;
|
|
149
|
+
readonly default: false;
|
|
150
|
+
};
|
|
151
|
+
readonly confirmDisabled: {
|
|
152
|
+
readonly type: BooleanConstructor;
|
|
153
|
+
readonly default: false;
|
|
154
|
+
};
|
|
155
|
+
readonly confirmLoading: {
|
|
156
|
+
readonly type: BooleanConstructor;
|
|
157
|
+
readonly default: false;
|
|
158
|
+
};
|
|
159
|
+
readonly showFooter: {
|
|
160
|
+
readonly type: BooleanConstructor;
|
|
161
|
+
readonly default: true;
|
|
162
|
+
};
|
|
163
|
+
readonly showCancel: {
|
|
164
|
+
readonly type: BooleanConstructor;
|
|
165
|
+
readonly default: true;
|
|
166
|
+
};
|
|
167
|
+
readonly showConfirm: {
|
|
168
|
+
readonly type: BooleanConstructor;
|
|
169
|
+
readonly default: true;
|
|
170
|
+
};
|
|
171
|
+
}>> & Readonly<{
|
|
172
|
+
onCancel?: (() => any) | undefined;
|
|
173
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
174
|
+
onConfirm?: (() => any) | undefined;
|
|
175
|
+
onClosed?: (() => any) | undefined;
|
|
176
|
+
}>, {
|
|
177
|
+
readonly size: string | number;
|
|
178
|
+
readonly title: string;
|
|
179
|
+
readonly appendTo: string | HTMLElement;
|
|
180
|
+
readonly modelValue: boolean;
|
|
181
|
+
readonly direction: "rtl" | "ltr" | "ttb" | "btt";
|
|
182
|
+
readonly appendToBody: boolean;
|
|
183
|
+
readonly modal: boolean;
|
|
184
|
+
readonly lockScroll: boolean;
|
|
185
|
+
readonly closeOnClickModal: boolean;
|
|
186
|
+
readonly withHeader: boolean;
|
|
187
|
+
readonly destroyOnClose: boolean;
|
|
188
|
+
readonly cancelText: string;
|
|
189
|
+
readonly confirmText: string;
|
|
190
|
+
readonly cancelDisabled: boolean;
|
|
191
|
+
readonly confirmDisabled: boolean;
|
|
192
|
+
readonly confirmLoading: boolean;
|
|
193
|
+
readonly showFooter: boolean;
|
|
194
|
+
readonly showCancel: boolean;
|
|
195
|
+
readonly showConfirm: boolean;
|
|
196
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
197
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
198
|
+
export default _default;
|
|
199
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
200
|
+
new (): {
|
|
201
|
+
$slots: S;
|
|
202
|
+
};
|
|
203
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SFCWithInstall } from '../install';
|
|
2
|
+
import { default as EditTable } from './src/edit-table.vue';
|
|
3
|
+
/**
|
|
4
|
+
* @file EditTable 可编辑表格组件
|
|
5
|
+
* @module /packages/components/edit-table
|
|
6
|
+
* @description 提供行内编辑、校验和增删行能力
|
|
7
|
+
*/
|
|
8
|
+
export declare const MpEditTable: SFCWithInstall<typeof EditTable>;
|
|
9
|
+
export default MpEditTable;
|
|
10
|
+
export * from './src/edit-table';
|
|
11
|
+
export type { EditTableInstance } from './src/instance';
|
|
12
|
+
export type * from './src/types';
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { MpEditTableColumn, MpEditTableCreateRowContext, MpEditTableRemoveRowContext, MpEditTableRow } from './types';
|
|
3
|
+
export declare const mpEditTableProps: {
|
|
4
|
+
modelValue: {
|
|
5
|
+
type: PropType<MpEditTableRow[]>;
|
|
6
|
+
default: () => never[];
|
|
7
|
+
};
|
|
8
|
+
columns: {
|
|
9
|
+
type: PropType<MpEditTableColumn[]>;
|
|
10
|
+
default: () => never[];
|
|
11
|
+
};
|
|
12
|
+
rowKey: {
|
|
13
|
+
type: PropType<string | ((row: MpEditTableRow, index: number) => string)>;
|
|
14
|
+
default: undefined;
|
|
15
|
+
};
|
|
16
|
+
height: {
|
|
17
|
+
type: PropType<string | number>;
|
|
18
|
+
default: undefined;
|
|
19
|
+
};
|
|
20
|
+
maxHeight: {
|
|
21
|
+
type: PropType<string | number>;
|
|
22
|
+
default: number;
|
|
23
|
+
};
|
|
24
|
+
stripe: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
28
|
+
border: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
showToolbar: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
addText: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
removeText: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
default: string;
|
|
43
|
+
};
|
|
44
|
+
createRow: {
|
|
45
|
+
type: PropType<(context: MpEditTableCreateRowContext) => MpEditTableRow>;
|
|
46
|
+
default: undefined;
|
|
47
|
+
};
|
|
48
|
+
beforeRemove: {
|
|
49
|
+
type: PropType<(context: MpEditTableRemoveRowContext) => boolean | void>;
|
|
50
|
+
default: undefined;
|
|
51
|
+
};
|
|
52
|
+
emptyText: {
|
|
53
|
+
type: StringConstructor;
|
|
54
|
+
default: string;
|
|
55
|
+
};
|
|
56
|
+
loading: {
|
|
57
|
+
type: BooleanConstructor;
|
|
58
|
+
default: boolean;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
export declare const mpEditTableEmits: {
|
|
62
|
+
'update:modelValue': (value: MpEditTableRow[]) => boolean;
|
|
63
|
+
add: (row: MpEditTableRow) => boolean;
|
|
64
|
+
remove: (row: MpEditTableRow, index: number) => boolean;
|
|
65
|
+
};
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { FormInstance } from 'element-plus';
|
|
2
|
+
import { MpEditTableColumn, MpEditTableRow } from './types';
|
|
3
|
+
declare function __VLS_template(): {
|
|
4
|
+
attrs: Partial<{}>;
|
|
5
|
+
slots: Partial<Record<string, (_: {
|
|
6
|
+
columnConfig: MpEditTableColumn<any>;
|
|
7
|
+
}) => any>> & Partial<Record<string, (_: {
|
|
8
|
+
row: any;
|
|
9
|
+
index: any;
|
|
10
|
+
columnConfig: MpEditTableColumn<any>;
|
|
11
|
+
value: any;
|
|
12
|
+
}) => any>> & {
|
|
13
|
+
toolbar?(_: {}): any;
|
|
14
|
+
};
|
|
15
|
+
refs: {
|
|
16
|
+
formRef: unknown;
|
|
17
|
+
tableRef: unknown;
|
|
18
|
+
};
|
|
19
|
+
rootEl: HTMLElement;
|
|
20
|
+
};
|
|
21
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
22
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
23
|
+
modelValue: {
|
|
24
|
+
type: import('vue').PropType<MpEditTableRow[]>;
|
|
25
|
+
default: () => never[];
|
|
26
|
+
};
|
|
27
|
+
columns: {
|
|
28
|
+
type: import('vue').PropType<MpEditTableColumn[]>;
|
|
29
|
+
default: () => never[];
|
|
30
|
+
};
|
|
31
|
+
rowKey: {
|
|
32
|
+
type: import('vue').PropType<string | ((row: MpEditTableRow, index: number) => string)>;
|
|
33
|
+
default: undefined;
|
|
34
|
+
};
|
|
35
|
+
height: {
|
|
36
|
+
type: import('vue').PropType<string | number>;
|
|
37
|
+
default: undefined;
|
|
38
|
+
};
|
|
39
|
+
maxHeight: {
|
|
40
|
+
type: import('vue').PropType<string | number>;
|
|
41
|
+
default: number;
|
|
42
|
+
};
|
|
43
|
+
stripe: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
default: boolean;
|
|
46
|
+
};
|
|
47
|
+
border: {
|
|
48
|
+
type: BooleanConstructor;
|
|
49
|
+
default: boolean;
|
|
50
|
+
};
|
|
51
|
+
showToolbar: {
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
default: boolean;
|
|
54
|
+
};
|
|
55
|
+
addText: {
|
|
56
|
+
type: StringConstructor;
|
|
57
|
+
default: string;
|
|
58
|
+
};
|
|
59
|
+
removeText: {
|
|
60
|
+
type: StringConstructor;
|
|
61
|
+
default: string;
|
|
62
|
+
};
|
|
63
|
+
createRow: {
|
|
64
|
+
type: import('vue').PropType<(context: import('./types').MpEditTableCreateRowContext) => MpEditTableRow>;
|
|
65
|
+
default: undefined;
|
|
66
|
+
};
|
|
67
|
+
beforeRemove: {
|
|
68
|
+
type: import('vue').PropType<(context: import('./types').MpEditTableRemoveRowContext) => boolean | void>;
|
|
69
|
+
default: undefined;
|
|
70
|
+
};
|
|
71
|
+
emptyText: {
|
|
72
|
+
type: StringConstructor;
|
|
73
|
+
default: string;
|
|
74
|
+
};
|
|
75
|
+
loading: {
|
|
76
|
+
type: BooleanConstructor;
|
|
77
|
+
default: boolean;
|
|
78
|
+
};
|
|
79
|
+
}>, {
|
|
80
|
+
formRef: FormInstance | undefined;
|
|
81
|
+
validate: FormInstance["validate"];
|
|
82
|
+
validateField: FormInstance["validateField"];
|
|
83
|
+
clearValidate: FormInstance["clearValidate"];
|
|
84
|
+
getData: () => Record<string, unknown>[];
|
|
85
|
+
setData: (rows: Record<string, unknown>[]) => void;
|
|
86
|
+
resetRows: (rows?: Record<string, unknown>[]) => void;
|
|
87
|
+
addRow: () => void;
|
|
88
|
+
removeRow: (index: number) => void;
|
|
89
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
90
|
+
add: (row: any) => void;
|
|
91
|
+
"update:modelValue": (value: any[]) => void;
|
|
92
|
+
remove: (row: any, index: number) => void;
|
|
93
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
94
|
+
modelValue: {
|
|
95
|
+
type: import('vue').PropType<MpEditTableRow[]>;
|
|
96
|
+
default: () => never[];
|
|
97
|
+
};
|
|
98
|
+
columns: {
|
|
99
|
+
type: import('vue').PropType<MpEditTableColumn[]>;
|
|
100
|
+
default: () => never[];
|
|
101
|
+
};
|
|
102
|
+
rowKey: {
|
|
103
|
+
type: import('vue').PropType<string | ((row: MpEditTableRow, index: number) => string)>;
|
|
104
|
+
default: undefined;
|
|
105
|
+
};
|
|
106
|
+
height: {
|
|
107
|
+
type: import('vue').PropType<string | number>;
|
|
108
|
+
default: undefined;
|
|
109
|
+
};
|
|
110
|
+
maxHeight: {
|
|
111
|
+
type: import('vue').PropType<string | number>;
|
|
112
|
+
default: number;
|
|
113
|
+
};
|
|
114
|
+
stripe: {
|
|
115
|
+
type: BooleanConstructor;
|
|
116
|
+
default: boolean;
|
|
117
|
+
};
|
|
118
|
+
border: {
|
|
119
|
+
type: BooleanConstructor;
|
|
120
|
+
default: boolean;
|
|
121
|
+
};
|
|
122
|
+
showToolbar: {
|
|
123
|
+
type: BooleanConstructor;
|
|
124
|
+
default: boolean;
|
|
125
|
+
};
|
|
126
|
+
addText: {
|
|
127
|
+
type: StringConstructor;
|
|
128
|
+
default: string;
|
|
129
|
+
};
|
|
130
|
+
removeText: {
|
|
131
|
+
type: StringConstructor;
|
|
132
|
+
default: string;
|
|
133
|
+
};
|
|
134
|
+
createRow: {
|
|
135
|
+
type: import('vue').PropType<(context: import('./types').MpEditTableCreateRowContext) => MpEditTableRow>;
|
|
136
|
+
default: undefined;
|
|
137
|
+
};
|
|
138
|
+
beforeRemove: {
|
|
139
|
+
type: import('vue').PropType<(context: import('./types').MpEditTableRemoveRowContext) => boolean | void>;
|
|
140
|
+
default: undefined;
|
|
141
|
+
};
|
|
142
|
+
emptyText: {
|
|
143
|
+
type: StringConstructor;
|
|
144
|
+
default: string;
|
|
145
|
+
};
|
|
146
|
+
loading: {
|
|
147
|
+
type: BooleanConstructor;
|
|
148
|
+
default: boolean;
|
|
149
|
+
};
|
|
150
|
+
}>> & Readonly<{
|
|
151
|
+
onAdd?: ((row: any) => any) | undefined;
|
|
152
|
+
"onUpdate:modelValue"?: ((value: any[]) => any) | undefined;
|
|
153
|
+
onRemove?: ((row: any, index: number) => any) | undefined;
|
|
154
|
+
}>, {
|
|
155
|
+
border: boolean;
|
|
156
|
+
loading: boolean;
|
|
157
|
+
modelValue: any[];
|
|
158
|
+
columns: MpEditTableColumn<any>[];
|
|
159
|
+
rowKey: string | ((row: MpEditTableRow, index: number) => string);
|
|
160
|
+
height: string | number;
|
|
161
|
+
maxHeight: string | number;
|
|
162
|
+
stripe: boolean;
|
|
163
|
+
emptyText: string;
|
|
164
|
+
showToolbar: boolean;
|
|
165
|
+
addText: string;
|
|
166
|
+
removeText: string;
|
|
167
|
+
createRow: (context: import('./types').MpEditTableCreateRowContext) => MpEditTableRow;
|
|
168
|
+
beforeRemove: (context: import('./types').MpEditTableRemoveRowContext) => boolean | void;
|
|
169
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
170
|
+
formRef: unknown;
|
|
171
|
+
tableRef: unknown;
|
|
172
|
+
}, HTMLElement>;
|
|
173
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
174
|
+
export default _default;
|
|
175
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
176
|
+
new (): {
|
|
177
|
+
$slots: S;
|
|
178
|
+
};
|
|
179
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FormInstance } from 'element-plus';
|
|
2
|
+
export interface EditTableInstance {
|
|
3
|
+
formRef: FormInstance | undefined;
|
|
4
|
+
validate: FormInstance['validate'];
|
|
5
|
+
validateField: FormInstance['validateField'];
|
|
6
|
+
clearValidate: FormInstance['clearValidate'];
|
|
7
|
+
getData: () => Record<string, unknown>[];
|
|
8
|
+
setData: (rows: Record<string, unknown>[]) => void;
|
|
9
|
+
resetRows: (rows?: Record<string, unknown>[]) => void;
|
|
10
|
+
addRow: () => void;
|
|
11
|
+
removeRow: (index: number) => void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { FormItemRule } from 'element-plus';
|
|
2
|
+
import { MpFieldSchema } from '../../form/src/field-renderer';
|
|
3
|
+
import { MpTableColumnAlign, MpTableColumnFixed } from '../../table';
|
|
4
|
+
export type MpEditTableRow = any;
|
|
5
|
+
export interface MpEditTableCellContext<Row = MpEditTableRow> {
|
|
6
|
+
row: Row;
|
|
7
|
+
rowIndex: number;
|
|
8
|
+
rows: Row[];
|
|
9
|
+
column: MpEditTableColumn<Row>;
|
|
10
|
+
}
|
|
11
|
+
export type MpEditTableColumnRules<Row = MpEditTableRow> = FormItemRule | FormItemRule[] | ((context: MpEditTableCellContext<Row>) => FormItemRule | FormItemRule[] | undefined);
|
|
12
|
+
export interface MpEditTableColumn<Row = MpEditTableRow> {
|
|
13
|
+
prop?: keyof Row | string;
|
|
14
|
+
label?: string;
|
|
15
|
+
width?: string | number;
|
|
16
|
+
minWidth?: string | number;
|
|
17
|
+
fixed?: MpTableColumnFixed;
|
|
18
|
+
align?: MpTableColumnAlign;
|
|
19
|
+
headerAlign?: MpTableColumnAlign;
|
|
20
|
+
required?: boolean;
|
|
21
|
+
rules?: MpEditTableColumnRules<Row>;
|
|
22
|
+
field?: Omit<MpFieldSchema, 'field' | 'label'>;
|
|
23
|
+
visible?: boolean | ((context: {
|
|
24
|
+
rows: Row[];
|
|
25
|
+
column: MpEditTableColumn<Row>;
|
|
26
|
+
}) => boolean);
|
|
27
|
+
readonly?: boolean | ((row: Row, rowIndex: number) => boolean);
|
|
28
|
+
formatter?: (row: Row, column: MpEditTableColumn<Row>, cellValue: unknown, index: number) => unknown;
|
|
29
|
+
slot?: string;
|
|
30
|
+
headerSlot?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface MpEditTableCreateRowContext<Row = MpEditTableRow> {
|
|
33
|
+
rows: Row[];
|
|
34
|
+
}
|
|
35
|
+
export interface MpEditTableRemoveRowContext<Row = MpEditTableRow> {
|
|
36
|
+
row: Row;
|
|
37
|
+
rowIndex: number;
|
|
38
|
+
rows: Row[];
|
|
39
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SFCWithInstall } from '../install';
|
|
2
|
+
import { default as ExportSetting } from './src/export-setting.vue';
|
|
3
|
+
export declare const MpExportSetting: SFCWithInstall<typeof ExportSetting>;
|
|
4
|
+
export default MpExportSetting;
|
|
5
|
+
export * from './src/export-setting';
|
|
6
|
+
export * from './src/use-export-setting';
|
|
7
|
+
export type * from './src/types';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
import { MpExportSettingItem, MpExportSettingPayload, MpExportSettingScope } from './types';
|
|
3
|
+
export declare const mpExportSettingProps: {
|
|
4
|
+
readonly modelValue: {
|
|
5
|
+
readonly type: BooleanConstructor;
|
|
6
|
+
readonly default: false;
|
|
7
|
+
};
|
|
8
|
+
readonly columns: {
|
|
9
|
+
readonly type: PropType<MpExportSettingItem[]>;
|
|
10
|
+
readonly default: () => never[];
|
|
11
|
+
};
|
|
12
|
+
readonly title: {
|
|
13
|
+
readonly type: StringConstructor;
|
|
14
|
+
readonly default: "导出设置";
|
|
15
|
+
};
|
|
16
|
+
readonly width: {
|
|
17
|
+
readonly type: PropType<string | number>;
|
|
18
|
+
readonly default: 420;
|
|
19
|
+
};
|
|
20
|
+
readonly appendToBody: {
|
|
21
|
+
readonly type: BooleanConstructor;
|
|
22
|
+
readonly default: true;
|
|
23
|
+
};
|
|
24
|
+
readonly loading: {
|
|
25
|
+
readonly type: BooleanConstructor;
|
|
26
|
+
readonly default: false;
|
|
27
|
+
};
|
|
28
|
+
readonly querySummary: {
|
|
29
|
+
readonly type: PropType<string[]>;
|
|
30
|
+
readonly default: () => never[];
|
|
31
|
+
};
|
|
32
|
+
readonly selectedCount: {
|
|
33
|
+
readonly type: NumberConstructor;
|
|
34
|
+
readonly default: 0;
|
|
35
|
+
};
|
|
36
|
+
readonly defaultScope: {
|
|
37
|
+
readonly type: PropType<MpExportSettingScope>;
|
|
38
|
+
readonly default: "filtered";
|
|
39
|
+
};
|
|
40
|
+
readonly taskCenterEnabled: {
|
|
41
|
+
readonly type: BooleanConstructor;
|
|
42
|
+
readonly default: false;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export declare const mpExportSettingEmits: {
|
|
46
|
+
'update:modelValue': (value: boolean) => boolean;
|
|
47
|
+
confirm: (payload: MpExportSettingPayload) => boolean;
|
|
48
|
+
reset: () => boolean;
|
|
49
|
+
'open-task-center': () => boolean;
|
|
50
|
+
};
|
|
51
|
+
export type MpExportSettingProps = ExtractPropTypes<typeof mpExportSettingProps>;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { MpExportSettingItem, MpExportSettingScope } from './types';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
3
|
+
readonly modelValue: {
|
|
4
|
+
readonly type: BooleanConstructor;
|
|
5
|
+
readonly default: false;
|
|
6
|
+
};
|
|
7
|
+
readonly columns: {
|
|
8
|
+
readonly type: import('vue').PropType<MpExportSettingItem[]>;
|
|
9
|
+
readonly default: () => never[];
|
|
10
|
+
};
|
|
11
|
+
readonly title: {
|
|
12
|
+
readonly type: StringConstructor;
|
|
13
|
+
readonly default: "导出设置";
|
|
14
|
+
};
|
|
15
|
+
readonly width: {
|
|
16
|
+
readonly type: import('vue').PropType<string | number>;
|
|
17
|
+
readonly default: 420;
|
|
18
|
+
};
|
|
19
|
+
readonly appendToBody: {
|
|
20
|
+
readonly type: BooleanConstructor;
|
|
21
|
+
readonly default: true;
|
|
22
|
+
};
|
|
23
|
+
readonly loading: {
|
|
24
|
+
readonly type: BooleanConstructor;
|
|
25
|
+
readonly default: false;
|
|
26
|
+
};
|
|
27
|
+
readonly querySummary: {
|
|
28
|
+
readonly type: import('vue').PropType<string[]>;
|
|
29
|
+
readonly default: () => never[];
|
|
30
|
+
};
|
|
31
|
+
readonly selectedCount: {
|
|
32
|
+
readonly type: NumberConstructor;
|
|
33
|
+
readonly default: 0;
|
|
34
|
+
};
|
|
35
|
+
readonly defaultScope: {
|
|
36
|
+
readonly type: import('vue').PropType<MpExportSettingScope>;
|
|
37
|
+
readonly default: "filtered";
|
|
38
|
+
};
|
|
39
|
+
readonly taskCenterEnabled: {
|
|
40
|
+
readonly type: BooleanConstructor;
|
|
41
|
+
readonly default: false;
|
|
42
|
+
};
|
|
43
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
44
|
+
reset: () => void;
|
|
45
|
+
"update:modelValue": (value: boolean) => void;
|
|
46
|
+
confirm: (payload: import('./types').MpExportSettingPayload) => void;
|
|
47
|
+
"open-task-center": () => void;
|
|
48
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
49
|
+
readonly modelValue: {
|
|
50
|
+
readonly type: BooleanConstructor;
|
|
51
|
+
readonly default: false;
|
|
52
|
+
};
|
|
53
|
+
readonly columns: {
|
|
54
|
+
readonly type: import('vue').PropType<MpExportSettingItem[]>;
|
|
55
|
+
readonly default: () => never[];
|
|
56
|
+
};
|
|
57
|
+
readonly title: {
|
|
58
|
+
readonly type: StringConstructor;
|
|
59
|
+
readonly default: "导出设置";
|
|
60
|
+
};
|
|
61
|
+
readonly width: {
|
|
62
|
+
readonly type: import('vue').PropType<string | number>;
|
|
63
|
+
readonly default: 420;
|
|
64
|
+
};
|
|
65
|
+
readonly appendToBody: {
|
|
66
|
+
readonly type: BooleanConstructor;
|
|
67
|
+
readonly default: true;
|
|
68
|
+
};
|
|
69
|
+
readonly loading: {
|
|
70
|
+
readonly type: BooleanConstructor;
|
|
71
|
+
readonly default: false;
|
|
72
|
+
};
|
|
73
|
+
readonly querySummary: {
|
|
74
|
+
readonly type: import('vue').PropType<string[]>;
|
|
75
|
+
readonly default: () => never[];
|
|
76
|
+
};
|
|
77
|
+
readonly selectedCount: {
|
|
78
|
+
readonly type: NumberConstructor;
|
|
79
|
+
readonly default: 0;
|
|
80
|
+
};
|
|
81
|
+
readonly defaultScope: {
|
|
82
|
+
readonly type: import('vue').PropType<MpExportSettingScope>;
|
|
83
|
+
readonly default: "filtered";
|
|
84
|
+
};
|
|
85
|
+
readonly taskCenterEnabled: {
|
|
86
|
+
readonly type: BooleanConstructor;
|
|
87
|
+
readonly default: false;
|
|
88
|
+
};
|
|
89
|
+
}>> & Readonly<{
|
|
90
|
+
onReset?: (() => any) | undefined;
|
|
91
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
92
|
+
onConfirm?: ((payload: import('./types').MpExportSettingPayload) => any) | undefined;
|
|
93
|
+
"onOpen-task-center"?: (() => any) | undefined;
|
|
94
|
+
}>, {
|
|
95
|
+
readonly title: string;
|
|
96
|
+
readonly width: string | number;
|
|
97
|
+
readonly loading: boolean;
|
|
98
|
+
readonly modelValue: boolean;
|
|
99
|
+
readonly appendToBody: boolean;
|
|
100
|
+
readonly columns: MpExportSettingItem[];
|
|
101
|
+
readonly querySummary: string[];
|
|
102
|
+
readonly selectedCount: number;
|
|
103
|
+
readonly defaultScope: MpExportSettingScope;
|
|
104
|
+
readonly taskCenterEnabled: boolean;
|
|
105
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
106
|
+
listRef: HTMLDivElement;
|
|
107
|
+
}, any>;
|
|
108
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import { MpTableColumn } from '../../table';
|
|
3
|
+
export type MpExportSettingScope = 'filtered' | 'selected';
|
|
4
|
+
export interface MpExportSettingItem {
|
|
5
|
+
prop: string;
|
|
6
|
+
label: string;
|
|
7
|
+
checked: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface MpExportSettingPayload {
|
|
10
|
+
scope: MpExportSettingScope;
|
|
11
|
+
columns: MpExportSettingItem[];
|
|
12
|
+
}
|
|
13
|
+
export interface UseMpTableExportSettingOptions<Row = any> {
|
|
14
|
+
columns: ComputedRef<MpTableColumn<Row>[] | undefined>;
|
|
15
|
+
}
|