cosey 0.7.5 → 0.7.7
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/audio-card/audio-card.api.d.ts +1 -1
- package/components/audio-card/audio-card.d.ts +2 -2
- package/components/audio-card/index.d.ts +3 -3
- package/components/config-provider/config-provider.js +11 -4
- package/components/config-provider/override-element-plus.js +19 -7
- package/components/copy/copy.api.d.ts +6 -1
- package/components/copy/copy.api.js +4 -0
- package/components/copy/copy.d.ts +11 -1
- package/components/copy/copy.js +1 -0
- package/components/copy/index.d.ts +21 -3
- package/components/editor/editor.js +1 -1
- package/components/field/components/number-range/number-range.d.ts +3 -3
- package/components/field/components/number-range/number-range.vue.js +1 -1
- package/components/field/components/radio-group/radio-group.d.ts +1 -1
- package/components/field/field.api.d.ts +1 -0
- package/components/field/field.api.js +1 -0
- package/components/field/index.js +1 -0
- package/components/file-card/file-card.api.d.ts +1 -1
- package/components/file-card/file-card.d.ts +2 -2
- package/components/file-card/index.d.ts +3 -3
- package/components/form/form-item.api.d.ts +2 -1
- package/components/form/form-item.api.js +2 -1
- package/components/form/form-item.vue.js +4 -4
- package/components/form/index.d.ts +1 -1
- package/components/form/useBubbleTemplate.d.ts +3 -1
- package/components/form/useBubbleTemplate.js +1 -1
- package/components/form-dialog/form-dialog.api.d.ts +237 -0
- package/components/form-dialog/form-dialog.api.js +53 -0
- package/components/form-dialog/form-dialog.d.ts +221 -59
- package/components/form-dialog/form-dialog.js +53 -46
- package/components/form-dialog/index.d.ts +2 -2
- package/components/form-dialog/index.js +2 -2
- package/components/form-dialog/useFormDialogWidth.d.ts +1 -1
- package/components/form-dialog/useFormDialogWidth.js +1 -1
- package/components/form-drawer/form-drawer.api.d.ts +226 -0
- package/components/form-drawer/form-drawer.api.js +26 -0
- package/components/form-drawer/form-drawer.d.ts +273 -43
- package/components/form-drawer/form-drawer.js +54 -11
- package/components/form-drawer/index.d.ts +44 -76
- package/components/form-drawer/index.js +2 -2
- package/components/form-group/form-group.api.d.ts +73 -0
- package/components/form-group/form-group.api.js +41 -0
- package/components/form-group/form-group.d.ts +143 -14
- package/components/form-group/form-group.js +69 -0
- package/components/{input-number-range/style/index.d.ts → form-group/form-group.style.d.ts} +1 -1
- package/components/form-group/{style/index.js → form-group.style.js} +2 -2
- package/components/form-group/index.d.ts +230 -22
- package/components/form-group/index.js +2 -1
- package/components/form-list/form-list.api.d.ts +1 -0
- package/components/form-query/form-query.api.js +1 -1
- package/components/image-card/image-card.api.d.ts +1 -1
- package/components/image-card/image-card.d.ts +2 -2
- package/components/image-card/index.d.ts +3 -3
- package/components/index.js +8 -6
- package/components/input-number-range/index.d.ts +118 -15
- package/components/input-number-range/index.js +2 -2
- package/components/input-number-range/input-number-range.api.d.ts +43 -0
- package/components/input-number-range/input-number-range.api.js +44 -0
- package/components/input-number-range/input-number-range.d.ts +79 -24
- package/components/input-number-range/input-number-range.js +109 -4
- package/components/{long-text/style/index.d.ts → input-number-range/input-number-range.style.d.ts} +1 -1
- package/components/input-number-range/{style/index.js → input-number-range.style.js} +1 -1
- package/components/long-text/index.d.ts +63 -17
- package/components/long-text/index.js +2 -2
- package/components/long-text/long-text.api.d.ts +23 -0
- package/components/long-text/long-text.api.js +20 -0
- package/components/long-text/long-text.d.ts +38 -14
- package/components/long-text/long-text.js +56 -6
- package/components/{scroll-view/style/index.d.ts → long-text/long-text.style.d.ts} +1 -1
- package/components/long-text/{style/index.js → long-text.style.js} +2 -2
- package/components/media-card/index.d.ts +3 -3
- package/components/media-card/media-card.api.d.ts +2 -2
- package/components/media-card/media-card.d.ts +2 -2
- package/components/media-card/media-card.style.js +2 -1
- package/components/panel/panel.api.d.ts +2 -5
- package/components/remote-select/index.d.ts +6 -6
- package/components/remote-select/remote-select.api.d.ts +1 -1
- package/components/remote-select/remote-select.d.ts +2 -2
- package/components/remote-select/remote-select.js +1 -1
- package/components/scroll-view/index.d.ts +5 -5
- package/components/scroll-view/scroll-view.style.d.ts +4 -0
- package/components/scroll-view/{style/index.js → scroll-view.style.js} +1 -1
- package/components/scroll-view/scroll-view.vue.d.ts +1 -1
- package/components/scroll-view/scroll-view.vue.js +1 -1
- package/components/stack-dialog/index.d.ts +609 -4
- package/components/stack-dialog/index.js +2 -2
- package/components/stack-dialog/stack-dialog.api.d.ts +200 -0
- package/components/stack-dialog/stack-dialog.api.js +65 -0
- package/components/stack-dialog/stack-dialog.d.ts +204 -30
- package/components/stack-dialog/stack-dialog.js +67 -59
- package/components/svga-card/index.d.ts +3 -3
- package/components/svga-card/svga-card.api.d.ts +1 -1
- package/components/svga-card/svga-card.d.ts +2 -2
- package/components/table/index.d.ts +22 -4
- package/components/table/index.js +1 -1
- package/components/table/table-column/table-column.d.ts +3 -3
- package/components/table/table-column-editor/table-column-editor.api.d.ts +17 -0
- package/components/table/table-column-editor/table-column-editor.api.js +15 -0
- package/components/table/table-column-editor/table-column-editor.d.ts +26 -11
- package/components/table/table-column-editor/table-column-editor.js +154 -4
- package/components/table/table-export/item.d.ts +15 -0
- package/components/table/table-export/item.js +37 -0
- package/components/table/table-export/list.d.ts +15 -0
- package/components/table/table-export/list.js +27 -0
- package/components/table/table-export/table-export.api.d.ts +208 -0
- package/components/table/table-export/table-export.api.js +32 -0
- package/components/table/table-export/table-export.d.ts +262 -35
- package/components/table/table-export/table-export.js +238 -26
- package/components/table/table-export/{style/index.js → table-export.style.js} +1 -1
- package/components/table/table-footer/index.d.ts +30 -6
- package/components/table/table-footer/index.js +25 -5
- package/components/table/table-footer/utils.d.ts +1 -1
- package/components/table/table-footer/utils.js +6 -2
- package/components/table/table-query/table-query.api.d.ts +172 -0
- package/components/table/table-query/table-query.api.js +31 -0
- package/components/table/table-query/table-query.d.ts +207 -44
- package/components/table/table-query/table-query.js +84 -24
- package/components/table/table-stats/table-stats.api.d.ts +17 -0
- package/components/table/table-stats/table-stats.api.js +12 -0
- package/components/table/table-stats/table-stats.d.ts +23 -14
- package/components/table/table-stats/table-stats.js +37 -5
- package/components/table/table.d.ts +8 -2
- package/components/table/table.js +7 -1
- package/components/table/table.vue.d.ts +14 -2
- package/components/table/table.vue.js +15 -12
- package/components/theme/getGlobalStyleHook.js +2 -22
- package/components/transition-group/index.d.ts +3 -3
- package/components/transition-group/transition-group.d.ts +1 -1
- package/components/upload/upload.js +1 -1
- package/components/video-card/index.d.ts +3 -3
- package/components/video-card/video-card.api.d.ts +1 -1
- package/components/video-card/video-card.d.ts +2 -2
- package/config/root-config-provider.js +1 -1
- package/hooks/useColorScheme.d.ts +2 -2
- package/hooks/useColorScheme.js +1 -1
- package/index.js +7 -2
- package/layout/layout-header/style/index.js +1 -1
- package/package.json +4 -5
- package/router/index.d.ts +1 -0
- package/router/index.js +4 -3
- package/types/helper.d.ts +8 -0
- package/utils/index.js +1 -0
- package/utils/warning.d.ts +2 -0
- package/utils/warning.js +2 -0
- package/components/form-dialog/form-dialog.vue.js +0 -63
- package/components/form-drawer/form-drawer.vue.d.ts +0 -482
- package/components/form-drawer/form-drawer.vue.js +0 -64
- package/components/form-group/form-group.vue.d.ts +0 -19
- package/components/form-group/form-group.vue.js +0 -139
- package/components/input-number-range/input-number-range.vue.d.ts +0 -18
- package/components/input-number-range/input-number-range.vue.js +0 -166
- package/components/long-text/long-text.vue.d.ts +0 -14
- package/components/long-text/long-text.vue.js +0 -94
- package/components/stack-dialog/stack-dialog.vue.js +0 -75
- package/components/table/table-column-editor/table-column-editor.vue.d.ts +0 -22
- package/components/table/table-column-editor/table-column-editor.vue.js +0 -188
- package/components/table/table-export/item.vue.d.ts +0 -7
- package/components/table/table-export/item.vue.js +0 -41
- package/components/table/table-export/list.vue.d.ts +0 -7
- package/components/table/table-export/list.vue.js +0 -32
- package/components/table/table-export/style/index.d.ts +0 -4
- package/components/table/table-export/table-export.vue.d.ts +0 -428
- package/components/table/table-export/table-export.vue.js +0 -250
- package/components/table/table-query/table-query.vue.d.ts +0 -349
- package/components/table/table-query/table-query.vue.js +0 -92
- package/components/table/table-stats/table-stats.vue.d.ts +0 -6
- package/components/table/table-stats/table-stats.vue.js +0 -52
- /package/components/scroll-view/{scroll-view.d.ts → scroll-view.api.d.ts} +0 -0
- /package/components/scroll-view/{scroll-view.js → scroll-view.api.js} +0 -0
- /package/components/{form-group/style/index.d.ts → table/table-export/table-export.style.d.ts} +0 -0
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import { type FormItemProps } from '../../form';
|
|
3
|
-
import { type FormQuerySlots, type FormQueryEmits, type FormQueryExpose } from '../../form-query';
|
|
4
|
-
import { type PropType, type ExtractPropTypes, VNodeChild } from 'vue';
|
|
5
|
-
export type TableQueryScheme = FormItemProps<FieldType> & {
|
|
6
|
-
render?: (params: {
|
|
7
|
-
model: Record<string, any>;
|
|
8
|
-
}) => VNodeChild;
|
|
9
|
-
slots?: Record<string, unknown>;
|
|
10
|
-
};
|
|
11
|
-
export declare const tableQueryProps: {
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
12
2
|
schemes: {
|
|
13
|
-
type: PropType<TableQueryScheme[]>;
|
|
3
|
+
type: import("vue").PropType<import("./table-query.api").TableQueryScheme[]>;
|
|
14
4
|
default: () => never[];
|
|
15
5
|
};
|
|
16
6
|
grid: {
|
|
@@ -18,7 +8,7 @@ export declare const tableQueryProps: {
|
|
|
18
8
|
default: boolean;
|
|
19
9
|
};
|
|
20
10
|
colProps: {
|
|
21
|
-
type: PropType<import("../..").ColPublicProps>;
|
|
11
|
+
type: import("vue").PropType<import("../..").ColPublicProps>;
|
|
22
12
|
default: () => {
|
|
23
13
|
xs: number;
|
|
24
14
|
sm: number;
|
|
@@ -37,20 +27,20 @@ export declare const tableQueryProps: {
|
|
|
37
27
|
default: boolean;
|
|
38
28
|
};
|
|
39
29
|
width: {
|
|
40
|
-
type: PropType<import("../..").FormItemWidth>;
|
|
30
|
+
type: import("vue").PropType<import("../..").FormItemWidth>;
|
|
41
31
|
};
|
|
42
32
|
rowProps: {
|
|
43
|
-
type: PropType<import("../..").RowProps>;
|
|
33
|
+
type: import("vue").PropType<import("../..").RowProps>;
|
|
44
34
|
};
|
|
45
35
|
readonly: {
|
|
46
36
|
type: BooleanConstructor;
|
|
47
37
|
default: boolean;
|
|
48
38
|
};
|
|
49
39
|
submit: {
|
|
50
|
-
type: PropType<() => any | Promise<any>>;
|
|
40
|
+
type: import("vue").PropType<() => any | Promise<any>>;
|
|
51
41
|
};
|
|
52
42
|
reset: {
|
|
53
|
-
type: PropType<() => any>;
|
|
43
|
+
type: import("vue").PropType<() => any>;
|
|
54
44
|
};
|
|
55
45
|
submitText: {
|
|
56
46
|
type: StringConstructor;
|
|
@@ -61,10 +51,10 @@ export declare const tableQueryProps: {
|
|
|
61
51
|
default: string;
|
|
62
52
|
};
|
|
63
53
|
submitProps: {
|
|
64
|
-
type: PropType<import("element-plus").ButtonProps>;
|
|
54
|
+
type: import("vue").PropType<import("element-plus").ButtonProps>;
|
|
65
55
|
};
|
|
66
56
|
resetProps: {
|
|
67
|
-
type: PropType<import("element-plus").ButtonProps>;
|
|
57
|
+
type: import("vue").PropType<import("element-plus").ButtonProps>;
|
|
68
58
|
};
|
|
69
59
|
hideSubmit: {
|
|
70
60
|
type: BooleanConstructor;
|
|
@@ -77,13 +67,13 @@ export declare const tableQueryProps: {
|
|
|
77
67
|
};
|
|
78
68
|
model: ObjectConstructor;
|
|
79
69
|
rules: {
|
|
80
|
-
readonly type: PropType<Partial<Record<string, import("element-plus").FormItemRule | import("element-plus").FormItemRule[]>>>;
|
|
70
|
+
readonly type: import("vue").PropType<Partial<Record<string, import("element-plus").FormItemRule | import("element-plus").FormItemRule[]>>>;
|
|
81
71
|
readonly required: false;
|
|
82
72
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
83
73
|
__epPropKey: true;
|
|
84
74
|
};
|
|
85
75
|
labelPosition: {
|
|
86
|
-
readonly type: PropType<"left" | "right" | "top">;
|
|
76
|
+
readonly type: import("vue").PropType<"left" | "right" | "top">;
|
|
87
77
|
readonly required: false;
|
|
88
78
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
89
79
|
__epPropKey: true;
|
|
@@ -91,7 +81,7 @@ export declare const tableQueryProps: {
|
|
|
91
81
|
readonly default: "right";
|
|
92
82
|
};
|
|
93
83
|
requireAsteriskPosition: {
|
|
94
|
-
readonly type: PropType<"left" | "right">;
|
|
84
|
+
readonly type: import("vue").PropType<"left" | "right">;
|
|
95
85
|
readonly required: false;
|
|
96
86
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
97
87
|
__epPropKey: true;
|
|
@@ -99,7 +89,7 @@ export declare const tableQueryProps: {
|
|
|
99
89
|
readonly default: "left";
|
|
100
90
|
};
|
|
101
91
|
labelWidth: {
|
|
102
|
-
readonly type: PropType<string | number>;
|
|
92
|
+
readonly type: import("vue").PropType<string | number>;
|
|
103
93
|
readonly required: false;
|
|
104
94
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
105
95
|
__epPropKey: true;
|
|
@@ -107,7 +97,7 @@ export declare const tableQueryProps: {
|
|
|
107
97
|
readonly default: "";
|
|
108
98
|
};
|
|
109
99
|
labelSuffix: {
|
|
110
|
-
readonly type: PropType<string>;
|
|
100
|
+
readonly type: import("vue").PropType<string>;
|
|
111
101
|
readonly required: false;
|
|
112
102
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
113
103
|
__epPropKey: true;
|
|
@@ -118,7 +108,7 @@ export declare const tableQueryProps: {
|
|
|
118
108
|
inlineMessage: BooleanConstructor;
|
|
119
109
|
statusIcon: BooleanConstructor;
|
|
120
110
|
showMessage: {
|
|
121
|
-
readonly type: PropType<boolean>;
|
|
111
|
+
readonly type: import("vue").PropType<boolean>;
|
|
122
112
|
readonly required: false;
|
|
123
113
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
124
114
|
__epPropKey: true;
|
|
@@ -126,7 +116,7 @@ export declare const tableQueryProps: {
|
|
|
126
116
|
readonly default: true;
|
|
127
117
|
};
|
|
128
118
|
validateOnRuleChange: {
|
|
129
|
-
readonly type: PropType<boolean>;
|
|
119
|
+
readonly type: import("vue").PropType<boolean>;
|
|
130
120
|
readonly required: false;
|
|
131
121
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
132
122
|
__epPropKey: true;
|
|
@@ -136,7 +126,7 @@ export declare const tableQueryProps: {
|
|
|
136
126
|
hideRequiredAsterisk: BooleanConstructor;
|
|
137
127
|
scrollToError: BooleanConstructor;
|
|
138
128
|
scrollIntoViewOptions: {
|
|
139
|
-
readonly type: PropType<boolean | ScrollIntoViewOptions>;
|
|
129
|
+
readonly type: import("vue").PropType<boolean | ScrollIntoViewOptions>;
|
|
140
130
|
readonly required: false;
|
|
141
131
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
142
132
|
__epPropKey: true;
|
|
@@ -144,25 +134,198 @@ export declare const tableQueryProps: {
|
|
|
144
134
|
readonly default: true;
|
|
145
135
|
};
|
|
146
136
|
size: {
|
|
147
|
-
readonly type: PropType<"" | "default" | "large" | "small">;
|
|
137
|
+
readonly type: import("vue").PropType<"" | "default" | "large" | "small">;
|
|
148
138
|
readonly required: false;
|
|
149
139
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
150
140
|
__epPropKey: true;
|
|
151
141
|
};
|
|
152
142
|
disabled: BooleanConstructor;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
|
|
143
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
144
|
+
[key: string]: any;
|
|
145
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
146
|
+
'update:collapsed': (val: boolean) => boolean;
|
|
147
|
+
validate: (prop: import("element-plus").FormItemProp, isValid: boolean, message: string) => boolean;
|
|
148
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
149
|
+
schemes: {
|
|
150
|
+
type: import("vue").PropType<import("./table-query.api").TableQueryScheme[]>;
|
|
151
|
+
default: () => never[];
|
|
152
|
+
};
|
|
153
|
+
grid: {
|
|
154
|
+
type: BooleanConstructor;
|
|
155
|
+
default: boolean;
|
|
156
|
+
};
|
|
157
|
+
colProps: {
|
|
158
|
+
type: import("vue").PropType<import("../..").ColPublicProps>;
|
|
159
|
+
default: () => {
|
|
160
|
+
xs: number;
|
|
161
|
+
sm: number;
|
|
162
|
+
md: number;
|
|
163
|
+
lg: number;
|
|
164
|
+
xl: number;
|
|
165
|
+
xxl: number;
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
minFields: {
|
|
169
|
+
type: NumberConstructor;
|
|
170
|
+
default: number;
|
|
171
|
+
};
|
|
172
|
+
collapsed: {
|
|
173
|
+
type: BooleanConstructor;
|
|
174
|
+
default: boolean;
|
|
175
|
+
};
|
|
176
|
+
width: {
|
|
177
|
+
type: import("vue").PropType<import("../..").FormItemWidth>;
|
|
178
|
+
};
|
|
179
|
+
rowProps: {
|
|
180
|
+
type: import("vue").PropType<import("../..").RowProps>;
|
|
181
|
+
};
|
|
182
|
+
readonly: {
|
|
183
|
+
type: BooleanConstructor;
|
|
184
|
+
default: boolean;
|
|
185
|
+
};
|
|
186
|
+
submit: {
|
|
187
|
+
type: import("vue").PropType<() => any | Promise<any>>;
|
|
188
|
+
};
|
|
189
|
+
reset: {
|
|
190
|
+
type: import("vue").PropType<() => any>;
|
|
191
|
+
};
|
|
192
|
+
submitText: {
|
|
193
|
+
type: StringConstructor;
|
|
194
|
+
default: string;
|
|
195
|
+
};
|
|
196
|
+
resetText: {
|
|
197
|
+
type: StringConstructor;
|
|
198
|
+
default: string;
|
|
199
|
+
};
|
|
200
|
+
submitProps: {
|
|
201
|
+
type: import("vue").PropType<import("element-plus").ButtonProps>;
|
|
202
|
+
};
|
|
203
|
+
resetProps: {
|
|
204
|
+
type: import("vue").PropType<import("element-plus").ButtonProps>;
|
|
205
|
+
};
|
|
206
|
+
hideSubmit: {
|
|
207
|
+
type: BooleanConstructor;
|
|
208
|
+
};
|
|
209
|
+
hideReset: {
|
|
210
|
+
type: BooleanConstructor;
|
|
211
|
+
};
|
|
212
|
+
hideButtons: {
|
|
213
|
+
type: BooleanConstructor;
|
|
214
|
+
};
|
|
215
|
+
model: ObjectConstructor;
|
|
216
|
+
rules: {
|
|
217
|
+
readonly type: import("vue").PropType<Partial<Record<string, import("element-plus").FormItemRule | import("element-plus").FormItemRule[]>>>;
|
|
218
|
+
readonly required: false;
|
|
219
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
220
|
+
__epPropKey: true;
|
|
221
|
+
};
|
|
222
|
+
labelPosition: {
|
|
223
|
+
readonly type: import("vue").PropType<"left" | "right" | "top">;
|
|
224
|
+
readonly required: false;
|
|
225
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
226
|
+
__epPropKey: true;
|
|
227
|
+
} & {
|
|
228
|
+
readonly default: "right";
|
|
229
|
+
};
|
|
230
|
+
requireAsteriskPosition: {
|
|
231
|
+
readonly type: import("vue").PropType<"left" | "right">;
|
|
232
|
+
readonly required: false;
|
|
233
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
234
|
+
__epPropKey: true;
|
|
235
|
+
} & {
|
|
236
|
+
readonly default: "left";
|
|
237
|
+
};
|
|
238
|
+
labelWidth: {
|
|
239
|
+
readonly type: import("vue").PropType<string | number>;
|
|
240
|
+
readonly required: false;
|
|
241
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
242
|
+
__epPropKey: true;
|
|
243
|
+
} & {
|
|
244
|
+
readonly default: "";
|
|
245
|
+
};
|
|
246
|
+
labelSuffix: {
|
|
247
|
+
readonly type: import("vue").PropType<string>;
|
|
248
|
+
readonly required: false;
|
|
249
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
250
|
+
__epPropKey: true;
|
|
251
|
+
} & {
|
|
252
|
+
readonly default: "";
|
|
253
|
+
};
|
|
254
|
+
inline: BooleanConstructor;
|
|
255
|
+
inlineMessage: BooleanConstructor;
|
|
256
|
+
statusIcon: BooleanConstructor;
|
|
257
|
+
showMessage: {
|
|
258
|
+
readonly type: import("vue").PropType<boolean>;
|
|
259
|
+
readonly required: false;
|
|
260
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
261
|
+
__epPropKey: true;
|
|
262
|
+
} & {
|
|
263
|
+
readonly default: true;
|
|
264
|
+
};
|
|
265
|
+
validateOnRuleChange: {
|
|
266
|
+
readonly type: import("vue").PropType<boolean>;
|
|
267
|
+
readonly required: false;
|
|
268
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
269
|
+
__epPropKey: true;
|
|
270
|
+
} & {
|
|
271
|
+
readonly default: true;
|
|
272
|
+
};
|
|
273
|
+
hideRequiredAsterisk: BooleanConstructor;
|
|
274
|
+
scrollToError: BooleanConstructor;
|
|
275
|
+
scrollIntoViewOptions: {
|
|
276
|
+
readonly type: import("vue").PropType<boolean | ScrollIntoViewOptions>;
|
|
277
|
+
readonly required: false;
|
|
278
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
279
|
+
__epPropKey: true;
|
|
280
|
+
} & {
|
|
281
|
+
readonly default: true;
|
|
282
|
+
};
|
|
283
|
+
size: {
|
|
284
|
+
readonly type: import("vue").PropType<"" | "default" | "large" | "small">;
|
|
285
|
+
readonly required: false;
|
|
286
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
287
|
+
__epPropKey: true;
|
|
288
|
+
};
|
|
289
|
+
disabled: BooleanConstructor;
|
|
290
|
+
}>> & Readonly<{
|
|
291
|
+
onValidate?: ((prop: import("element-plus").FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
292
|
+
"onUpdate:collapsed"?: ((val: boolean) => any) | undefined;
|
|
293
|
+
}>, {
|
|
294
|
+
grid: boolean;
|
|
295
|
+
inline: boolean;
|
|
296
|
+
disabled: boolean;
|
|
297
|
+
readonly: boolean;
|
|
298
|
+
labelWidth: string | number;
|
|
299
|
+
labelPosition: "left" | "right" | "top";
|
|
300
|
+
inlineMessage: boolean;
|
|
301
|
+
showMessage: boolean;
|
|
302
|
+
schemes: import("./table-query.api").TableQueryScheme[];
|
|
303
|
+
colProps: {
|
|
304
|
+
push?: number | undefined;
|
|
305
|
+
offset?: number | undefined;
|
|
306
|
+
span?: number | undefined;
|
|
307
|
+
sm?: import("../..").ColSize | undefined;
|
|
308
|
+
md?: import("../..").ColSize | undefined;
|
|
309
|
+
lg?: import("../..").ColSize | undefined;
|
|
310
|
+
xl?: import("../..").ColSize | undefined;
|
|
311
|
+
tag?: string | undefined;
|
|
312
|
+
xs?: import("../..").ColSize | undefined;
|
|
313
|
+
pull?: number | undefined;
|
|
314
|
+
xxl?: import("../..").ColSize | undefined;
|
|
315
|
+
};
|
|
316
|
+
minFields: number;
|
|
317
|
+
collapsed: boolean;
|
|
318
|
+
submitText: string;
|
|
319
|
+
resetText: string;
|
|
320
|
+
hideSubmit: boolean;
|
|
321
|
+
hideReset: boolean;
|
|
322
|
+
hideButtons: boolean;
|
|
323
|
+
requireAsteriskPosition: "left" | "right";
|
|
324
|
+
labelSuffix: string;
|
|
325
|
+
statusIcon: boolean;
|
|
326
|
+
validateOnRuleChange: boolean;
|
|
327
|
+
hideRequiredAsterisk: boolean;
|
|
328
|
+
scrollToError: boolean;
|
|
329
|
+
scrollIntoViewOptions: boolean | ScrollIntoViewOptions;
|
|
330
|
+
}, import("vue").SlotsType<import("./table-query.api").TableQuerySlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
331
|
+
export default _default;
|
|
@@ -1,27 +1,87 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent, ref, reactive, computed, onBeforeMount, unref, h } from 'vue';
|
|
2
|
+
import { tableQueryEmits, tableQuerySlots, tableQueryProps, omittedTableQueryProps, tableQueryExposeKeys } from './table-query.api.js';
|
|
3
|
+
import { reactiveOmit } from '@vueuse/core';
|
|
4
|
+
import { cloneDeep } from 'lodash-es';
|
|
5
|
+
import { FormItem as _FormItem } from '../../form/index.js';
|
|
6
|
+
import { FormQuery as _FormQuery } from '../../form-query/index.js';
|
|
7
|
+
import { createMergedExpose } from '../../../utils/vue.js';
|
|
3
8
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
9
|
+
var stdin_default = defineComponent({
|
|
10
|
+
name: "CoTableQuery",
|
|
11
|
+
props: tableQueryProps,
|
|
12
|
+
slots: tableQuerySlots,
|
|
13
|
+
emits: tableQueryEmits,
|
|
14
|
+
setup(props, {
|
|
15
|
+
expose
|
|
16
|
+
}) {
|
|
17
|
+
const formQueryProps = reactiveOmit(props, omittedTableQueryProps);
|
|
18
|
+
const formQueryRef = ref();
|
|
19
|
+
const defaultModel = reactive({});
|
|
20
|
+
const formModel = computed(() => {
|
|
21
|
+
return props.model || defaultModel;
|
|
22
|
+
});
|
|
23
|
+
onBeforeMount(() => {
|
|
24
|
+
props.schemes.forEach(item => {
|
|
25
|
+
unref(formModel)[item.prop] = item.modelValue;
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
const onEnter = () => {
|
|
29
|
+
formQueryRef.value?.submit();
|
|
30
|
+
};
|
|
31
|
+
const customExpose = {
|
|
32
|
+
getFieldsValue() {
|
|
33
|
+
return cloneDeep(unref(formModel));
|
|
34
|
+
},
|
|
35
|
+
setFieldsValue(value) {
|
|
36
|
+
Object.assign(unref(formModel), value);
|
|
37
|
+
},
|
|
38
|
+
getFormModel() {
|
|
39
|
+
return unref(formModel);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
expose(createMergedExpose(tableQueryExposeKeys, () => formQueryRef.value, customExpose));
|
|
43
|
+
return () => {
|
|
44
|
+
return h(_FormQuery, {
|
|
45
|
+
...formQueryProps,
|
|
46
|
+
ref: formQueryRef,
|
|
47
|
+
model: unref(formModel),
|
|
48
|
+
onKeyup: event => {
|
|
49
|
+
if (event.key === "Enter") {
|
|
50
|
+
event.preventDefault();
|
|
51
|
+
onEnter();
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
onKeydown: event => {
|
|
55
|
+
if (event.key === "Enter") {
|
|
56
|
+
event.preventDefault();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}, () => {
|
|
60
|
+
return props.schemes.map(item => {
|
|
61
|
+
const {
|
|
62
|
+
slots,
|
|
63
|
+
render,
|
|
64
|
+
...rest
|
|
65
|
+
} = item;
|
|
66
|
+
if (render) {
|
|
67
|
+
return h(_FormItem, rest, {
|
|
68
|
+
...slots,
|
|
69
|
+
default: () => {
|
|
70
|
+
return render({
|
|
71
|
+
model: unref(formModel)
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
return h(_FormItem, {
|
|
77
|
+
...rest,
|
|
78
|
+
modelValue: unref(formModel)[rest.prop],
|
|
79
|
+
"onUpdate:modelValue": value => unref(formModel)[rest.prop] = value
|
|
80
|
+
}, slots);
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
};
|
|
8
84
|
}
|
|
9
|
-
};
|
|
10
|
-
const tableQueryProps = {
|
|
11
|
-
...formQueryProps,
|
|
12
|
-
...tableQueryExtraProps
|
|
13
|
-
};
|
|
14
|
-
const omittedTableQueryProps = Object.keys(
|
|
15
|
-
tableQueryExtraProps
|
|
16
|
-
);
|
|
17
|
-
const tableQueryExposeKeys = [
|
|
18
|
-
...formExposeKeys,
|
|
19
|
-
"getFieldsValue",
|
|
20
|
-
"setFieldsValue",
|
|
21
|
-
"getFormModel"
|
|
22
|
-
];
|
|
23
|
-
function createScheme(props) {
|
|
24
|
-
return props;
|
|
25
|
-
}
|
|
85
|
+
});
|
|
26
86
|
|
|
27
|
-
export {
|
|
87
|
+
export { stdin_default as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ExtractPropTypes, PropType, VNodeChild } from 'vue';
|
|
2
|
+
export interface TableStatisticsColumn {
|
|
3
|
+
label: VNodeChild;
|
|
4
|
+
prop: string;
|
|
5
|
+
format?: (value: any) => any;
|
|
6
|
+
}
|
|
7
|
+
export declare const tableStatisticsProps: {
|
|
8
|
+
columns: {
|
|
9
|
+
type: PropType<TableStatisticsColumn[]>;
|
|
10
|
+
default: () => never[];
|
|
11
|
+
};
|
|
12
|
+
data: {
|
|
13
|
+
type: PropType<Record<string, any>>;
|
|
14
|
+
default: () => {};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export type TableStatisticsProps = ExtractPropTypes<typeof tableStatisticsProps>;
|
|
@@ -1,14 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
};
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
columns: {
|
|
3
|
+
type: import("vue").PropType<import("./table-stats.api").TableStatisticsColumn[]>;
|
|
4
|
+
default: () => never[];
|
|
5
|
+
};
|
|
6
|
+
data: {
|
|
7
|
+
type: import("vue").PropType<Record<string, any>>;
|
|
8
|
+
default: () => {};
|
|
9
|
+
};
|
|
10
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
+
columns: {
|
|
12
|
+
type: import("vue").PropType<import("./table-stats.api").TableStatisticsColumn[]>;
|
|
13
|
+
default: () => never[];
|
|
14
|
+
};
|
|
15
|
+
data: {
|
|
16
|
+
type: import("vue").PropType<Record<string, any>>;
|
|
17
|
+
default: () => {};
|
|
18
|
+
};
|
|
19
|
+
}>> & Readonly<{}>, {
|
|
20
|
+
columns: import("./table-stats.api").TableStatisticsColumn[];
|
|
21
|
+
data: Record<string, any>;
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
23
|
+
export default _default;
|
|
@@ -1,6 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
1
|
+
import { defineComponent, createVNode, createTextVNode } from 'vue';
|
|
2
|
+
import { tableStatisticsProps } from './table-stats.api.js';
|
|
3
|
+
import stdin_default$1 from './table-stats.style.js';
|
|
4
|
+
import { useComponentConfig } from '../../config-provider/config-provider.api.js';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
var stdin_default = defineComponent({
|
|
7
|
+
name: "CoTableStats",
|
|
8
|
+
props: tableStatisticsProps,
|
|
9
|
+
setup(props) {
|
|
10
|
+
const {
|
|
11
|
+
prefixCls
|
|
12
|
+
} = useComponentConfig("table-stats");
|
|
13
|
+
const {
|
|
14
|
+
hashId
|
|
15
|
+
} = stdin_default$1(prefixCls);
|
|
16
|
+
return () => {
|
|
17
|
+
return createVNode("div", {
|
|
18
|
+
"class": [hashId.value, prefixCls.value]
|
|
19
|
+
}, [props.columns.map(column => {
|
|
20
|
+
let value = props.data[column.prop];
|
|
21
|
+
if (column.format) {
|
|
22
|
+
value = column.format(value);
|
|
23
|
+
}
|
|
24
|
+
return createVNode("div", {
|
|
25
|
+
"class": `${prefixCls.value}-column`
|
|
26
|
+
}, [createVNode("div", {
|
|
27
|
+
"class": `${prefixCls.value}-label`
|
|
28
|
+
}, [column.label]), createVNode("div", {
|
|
29
|
+
"class": `${prefixCls.value}-colon`
|
|
30
|
+
}, [createTextVNode(":")]), createVNode("div", {
|
|
31
|
+
"class": `${prefixCls.value}-value`
|
|
32
|
+
}, [value])]);
|
|
33
|
+
})]);
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export { stdin_default as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TableColumnCtx, type PaginationProps } from 'element-plus';
|
|
2
2
|
import { type PropType, type ExtractPropTypes, MaybeRef } from 'vue';
|
|
3
3
|
import { type MayBeTableColumnProps } from './table-column/table-column.api';
|
|
4
|
-
import { TableQueryExpose, type TableQueryProps } from './table-query/table-query';
|
|
5
|
-
import { TableStatisticsColumn } from './table-stats/table-stats';
|
|
4
|
+
import { TableQueryExpose, type TableQueryProps } from './table-query/table-query.api';
|
|
5
|
+
import { TableStatisticsColumn } from './table-stats/table-stats.api';
|
|
6
6
|
export interface ToolbarConfig {
|
|
7
7
|
reload?: boolean;
|
|
8
8
|
export?: boolean | {
|
|
@@ -63,6 +63,12 @@ export declare const tableProps: {
|
|
|
63
63
|
statsData: {
|
|
64
64
|
type: MaybeRef<any>;
|
|
65
65
|
};
|
|
66
|
+
summaryProperties: {
|
|
67
|
+
type: PropType<string[]>;
|
|
68
|
+
};
|
|
69
|
+
transformSummary: {
|
|
70
|
+
type: PropType<(sums: any[]) => any[]>;
|
|
71
|
+
};
|
|
66
72
|
height: (NumberConstructor | StringConstructor)[];
|
|
67
73
|
maxHeight: (NumberConstructor | StringConstructor)[];
|
|
68
74
|
tableLayout: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import elTableProps from 'element-plus/es/components/table/src/table/defaults.mjs';
|
|
2
2
|
import { upperFirst, camelCase, omit } from 'lodash-es';
|
|
3
|
-
import { tableQueryExposeKeys } from './table-query/table-query.js';
|
|
3
|
+
import { tableQueryExposeKeys } from './table-query/table-query.api.js';
|
|
4
4
|
|
|
5
5
|
const tableEmitEvents = [
|
|
6
6
|
"select-all",
|
|
@@ -81,6 +81,12 @@ const tableExtraProps = {
|
|
|
81
81
|
},
|
|
82
82
|
statsData: {
|
|
83
83
|
type: Object
|
|
84
|
+
},
|
|
85
|
+
summaryProperties: {
|
|
86
|
+
type: Array
|
|
87
|
+
},
|
|
88
|
+
transformSummary: {
|
|
89
|
+
type: Function
|
|
84
90
|
}
|
|
85
91
|
};
|
|
86
92
|
const tableProps = {
|
|
@@ -43,11 +43,17 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
43
43
|
type: import("vue").PropType<import("./table").TableConfig["keys"]>;
|
|
44
44
|
};
|
|
45
45
|
statsColumns: {
|
|
46
|
-
type: import("vue").PropType<import("vue").MaybeRef<import("./table-stats/table-stats").TableStatisticsColumn[]>>;
|
|
46
|
+
type: import("vue").PropType<import("vue").MaybeRef<import("./table-stats/table-stats.api").TableStatisticsColumn[]>>;
|
|
47
47
|
};
|
|
48
48
|
statsData: {
|
|
49
49
|
type: import("vue").MaybeRef<any>;
|
|
50
50
|
};
|
|
51
|
+
summaryProperties: {
|
|
52
|
+
type: import("vue").PropType<string[]>;
|
|
53
|
+
};
|
|
54
|
+
transformSummary: {
|
|
55
|
+
type: import("vue").PropType<(sums: any[]) => any[]>;
|
|
56
|
+
};
|
|
51
57
|
height: (NumberConstructor | StringConstructor)[];
|
|
52
58
|
maxHeight: (NumberConstructor | StringConstructor)[];
|
|
53
59
|
tableLayout: {
|
|
@@ -214,11 +220,17 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
214
220
|
type: import("vue").PropType<import("./table").TableConfig["keys"]>;
|
|
215
221
|
};
|
|
216
222
|
statsColumns: {
|
|
217
|
-
type: import("vue").PropType<import("vue").MaybeRef<import("./table-stats/table-stats").TableStatisticsColumn[]>>;
|
|
223
|
+
type: import("vue").PropType<import("vue").MaybeRef<import("./table-stats/table-stats.api").TableStatisticsColumn[]>>;
|
|
218
224
|
};
|
|
219
225
|
statsData: {
|
|
220
226
|
type: import("vue").MaybeRef<any>;
|
|
221
227
|
};
|
|
228
|
+
summaryProperties: {
|
|
229
|
+
type: import("vue").PropType<string[]>;
|
|
230
|
+
};
|
|
231
|
+
transformSummary: {
|
|
232
|
+
type: import("vue").PropType<(sums: any[]) => any[]>;
|
|
233
|
+
};
|
|
222
234
|
height: (NumberConstructor | StringConstructor)[];
|
|
223
235
|
maxHeight: (NumberConstructor | StringConstructor)[];
|
|
224
236
|
tableLayout: {
|