cosey 0.2.17 → 0.2.19
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/index.js +1 -1
- package/components/table/index.d.ts +5 -100
- package/components/table/index.js +1 -1
- package/components/table/table-column/table-column.vue.js +17 -13
- package/components/table/table.d.ts +5 -3
- package/components/table/table.js +35 -2
- package/components/table/table.vue.d.ts +2 -40
- package/components/table/table.vue.js +12 -3
- package/package.json +1 -1
package/components/index.js
CHANGED
|
@@ -76,7 +76,7 @@ export { defaultBreakpoints, defaultRowProps, generateAlgorithms, rowColumns, ro
|
|
|
76
76
|
export { snugMenuContextSymbol } from './snug-menu/snug-menu.js';
|
|
77
77
|
export { getFocusVisibleStyle, getLineClampStyle, getTruncateStyle } from './style/mixins.js';
|
|
78
78
|
export { contrarotation, rotation, rotation45, spinner } from './style/animation.js';
|
|
79
|
-
export { defaultTableConfig, elSlotsName, omittedTableProps, tableExposeKeys, tableProps } from './table/table.js';
|
|
79
|
+
export { defaultTableConfig, elSlotsName, omittedTableProps, tableEmitEvents, tableEmitOnEvents, tableEmitOnProps, tableExposeKeys, tableProps } from './table/table.js';
|
|
80
80
|
export { useTable } from './table/useTable.js';
|
|
81
81
|
export { defaultTableActionProps } from './table-action/table-action.js';
|
|
82
82
|
export { StyleCache, StyleProvider } from './theme/StyleContext.js';
|
|
@@ -262,26 +262,7 @@ declare const _Table: {
|
|
|
262
262
|
default: boolean;
|
|
263
263
|
};
|
|
264
264
|
preserveExpandedContent: BooleanConstructor;
|
|
265
|
-
}>> & Readonly<{
|
|
266
|
-
"onSelect-all"?: ((...args: any[]) => any) | undefined;
|
|
267
|
-
onSelect?: ((...args: any[]) => any) | undefined;
|
|
268
|
-
"onCurrent-change"?: ((...args: any[]) => any) | undefined;
|
|
269
|
-
"onExpand-change"?: ((...args: any[]) => any) | undefined;
|
|
270
|
-
"onSelection-change"?: ((...args: any[]) => any) | undefined;
|
|
271
|
-
"onCell-mouse-enter"?: ((...args: any[]) => any) | undefined;
|
|
272
|
-
"onCell-mouse-leave"?: ((...args: any[]) => any) | undefined;
|
|
273
|
-
"onCell-contextmenu"?: ((...args: any[]) => any) | undefined;
|
|
274
|
-
"onCell-click"?: ((...args: any[]) => any) | undefined;
|
|
275
|
-
"onCell-dblclick"?: ((...args: any[]) => any) | undefined;
|
|
276
|
-
"onRow-click"?: ((...args: any[]) => any) | undefined;
|
|
277
|
-
"onRow-contextmenu"?: ((...args: any[]) => any) | undefined;
|
|
278
|
-
"onRow-dblclick"?: ((...args: any[]) => any) | undefined;
|
|
279
|
-
"onHeader-click"?: ((...args: any[]) => any) | undefined;
|
|
280
|
-
"onHeader-contextmenu"?: ((...args: any[]) => any) | undefined;
|
|
281
|
-
"onSort-change"?: ((...args: any[]) => any) | undefined;
|
|
282
|
-
"onFilter-change"?: ((...args: any[]) => any) | undefined;
|
|
283
|
-
"onHeader-dragend"?: ((...args: any[]) => any) | undefined;
|
|
284
|
-
}>, {
|
|
265
|
+
}>> & Readonly<{}>, {
|
|
285
266
|
reload: () => void;
|
|
286
267
|
expandAll: () => void;
|
|
287
268
|
collapseAll: () => void;
|
|
@@ -312,26 +293,7 @@ declare const _Table: {
|
|
|
312
293
|
setScrollLeft: (left?: number) => void;
|
|
313
294
|
columns: import("element-plus").TableColumnCtx<any>[];
|
|
314
295
|
updateKeyChildren: (key: string, data: any[]) => void;
|
|
315
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}
|
|
316
|
-
"select-all": (...args: any[]) => any;
|
|
317
|
-
select: (...args: any[]) => any;
|
|
318
|
-
"current-change": (...args: any[]) => any;
|
|
319
|
-
"expand-change": (...args: any[]) => any;
|
|
320
|
-
"selection-change": (...args: any[]) => any;
|
|
321
|
-
"cell-mouse-enter": (...args: any[]) => any;
|
|
322
|
-
"cell-mouse-leave": (...args: any[]) => any;
|
|
323
|
-
"cell-contextmenu": (...args: any[]) => any;
|
|
324
|
-
"cell-click": (...args: any[]) => any;
|
|
325
|
-
"cell-dblclick": (...args: any[]) => any;
|
|
326
|
-
"row-click": (...args: any[]) => any;
|
|
327
|
-
"row-contextmenu": (...args: any[]) => any;
|
|
328
|
-
"row-dblclick": (...args: any[]) => any;
|
|
329
|
-
"header-click": (...args: any[]) => any;
|
|
330
|
-
"header-contextmenu": (...args: any[]) => any;
|
|
331
|
-
"sort-change": (...args: any[]) => any;
|
|
332
|
-
"filter-change": (...args: any[]) => any;
|
|
333
|
-
"header-dragend": (...args: any[]) => any;
|
|
334
|
-
}, import("vue").PublicProps, {
|
|
296
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
335
297
|
tableLayout: "auto" | "fixed";
|
|
336
298
|
border: boolean;
|
|
337
299
|
columns: import("./table-column/table-column").TableColumnProps[];
|
|
@@ -623,26 +585,7 @@ declare const _Table: {
|
|
|
623
585
|
default: boolean;
|
|
624
586
|
};
|
|
625
587
|
preserveExpandedContent: BooleanConstructor;
|
|
626
|
-
}>> & Readonly<{
|
|
627
|
-
"onSelect-all"?: ((...args: any[]) => any) | undefined;
|
|
628
|
-
onSelect?: ((...args: any[]) => any) | undefined;
|
|
629
|
-
"onCurrent-change"?: ((...args: any[]) => any) | undefined;
|
|
630
|
-
"onExpand-change"?: ((...args: any[]) => any) | undefined;
|
|
631
|
-
"onSelection-change"?: ((...args: any[]) => any) | undefined;
|
|
632
|
-
"onCell-mouse-enter"?: ((...args: any[]) => any) | undefined;
|
|
633
|
-
"onCell-mouse-leave"?: ((...args: any[]) => any) | undefined;
|
|
634
|
-
"onCell-contextmenu"?: ((...args: any[]) => any) | undefined;
|
|
635
|
-
"onCell-click"?: ((...args: any[]) => any) | undefined;
|
|
636
|
-
"onCell-dblclick"?: ((...args: any[]) => any) | undefined;
|
|
637
|
-
"onRow-click"?: ((...args: any[]) => any) | undefined;
|
|
638
|
-
"onRow-contextmenu"?: ((...args: any[]) => any) | undefined;
|
|
639
|
-
"onRow-dblclick"?: ((...args: any[]) => any) | undefined;
|
|
640
|
-
"onHeader-click"?: ((...args: any[]) => any) | undefined;
|
|
641
|
-
"onHeader-contextmenu"?: ((...args: any[]) => any) | undefined;
|
|
642
|
-
"onSort-change"?: ((...args: any[]) => any) | undefined;
|
|
643
|
-
"onFilter-change"?: ((...args: any[]) => any) | undefined;
|
|
644
|
-
"onHeader-dragend"?: ((...args: any[]) => any) | undefined;
|
|
645
|
-
}>, {
|
|
588
|
+
}>> & Readonly<{}>, {
|
|
646
589
|
reload: () => void;
|
|
647
590
|
expandAll: () => void;
|
|
648
591
|
collapseAll: () => void;
|
|
@@ -823,26 +766,7 @@ declare const _Table: {
|
|
|
823
766
|
default: boolean;
|
|
824
767
|
};
|
|
825
768
|
preserveExpandedContent: BooleanConstructor;
|
|
826
|
-
}>> & Readonly<{
|
|
827
|
-
"onSelect-all"?: ((...args: any[]) => any) | undefined;
|
|
828
|
-
onSelect?: ((...args: any[]) => any) | undefined;
|
|
829
|
-
"onCurrent-change"?: ((...args: any[]) => any) | undefined;
|
|
830
|
-
"onExpand-change"?: ((...args: any[]) => any) | undefined;
|
|
831
|
-
"onSelection-change"?: ((...args: any[]) => any) | undefined;
|
|
832
|
-
"onCell-mouse-enter"?: ((...args: any[]) => any) | undefined;
|
|
833
|
-
"onCell-mouse-leave"?: ((...args: any[]) => any) | undefined;
|
|
834
|
-
"onCell-contextmenu"?: ((...args: any[]) => any) | undefined;
|
|
835
|
-
"onCell-click"?: ((...args: any[]) => any) | undefined;
|
|
836
|
-
"onCell-dblclick"?: ((...args: any[]) => any) | undefined;
|
|
837
|
-
"onRow-click"?: ((...args: any[]) => any) | undefined;
|
|
838
|
-
"onRow-contextmenu"?: ((...args: any[]) => any) | undefined;
|
|
839
|
-
"onRow-dblclick"?: ((...args: any[]) => any) | undefined;
|
|
840
|
-
"onHeader-click"?: ((...args: any[]) => any) | undefined;
|
|
841
|
-
"onHeader-contextmenu"?: ((...args: any[]) => any) | undefined;
|
|
842
|
-
"onSort-change"?: ((...args: any[]) => any) | undefined;
|
|
843
|
-
"onFilter-change"?: ((...args: any[]) => any) | undefined;
|
|
844
|
-
"onHeader-dragend"?: ((...args: any[]) => any) | undefined;
|
|
845
|
-
}>, {
|
|
769
|
+
}>> & Readonly<{}>, {
|
|
846
770
|
reload: () => void;
|
|
847
771
|
expandAll: () => void;
|
|
848
772
|
collapseAll: () => void;
|
|
@@ -873,26 +797,7 @@ declare const _Table: {
|
|
|
873
797
|
setScrollLeft: (left?: number) => void;
|
|
874
798
|
columns: import("element-plus").TableColumnCtx<any>[];
|
|
875
799
|
updateKeyChildren: (key: string, data: any[]) => void;
|
|
876
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}
|
|
877
|
-
"select-all": (...args: any[]) => any;
|
|
878
|
-
select: (...args: any[]) => any;
|
|
879
|
-
"current-change": (...args: any[]) => any;
|
|
880
|
-
"expand-change": (...args: any[]) => any;
|
|
881
|
-
"selection-change": (...args: any[]) => any;
|
|
882
|
-
"cell-mouse-enter": (...args: any[]) => any;
|
|
883
|
-
"cell-mouse-leave": (...args: any[]) => any;
|
|
884
|
-
"cell-contextmenu": (...args: any[]) => any;
|
|
885
|
-
"cell-click": (...args: any[]) => any;
|
|
886
|
-
"cell-dblclick": (...args: any[]) => any;
|
|
887
|
-
"row-click": (...args: any[]) => any;
|
|
888
|
-
"row-contextmenu": (...args: any[]) => any;
|
|
889
|
-
"row-dblclick": (...args: any[]) => any;
|
|
890
|
-
"header-click": (...args: any[]) => any;
|
|
891
|
-
"header-contextmenu": (...args: any[]) => any;
|
|
892
|
-
"sort-change": (...args: any[]) => any;
|
|
893
|
-
"filter-change": (...args: any[]) => any;
|
|
894
|
-
"header-dragend": (...args: any[]) => any;
|
|
895
|
-
}, string, {
|
|
800
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
896
801
|
tableLayout: "auto" | "fixed";
|
|
897
802
|
border: boolean;
|
|
898
803
|
columns: import("./table-column/table-column").TableColumnProps[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withInstall } from '../utils.js';
|
|
2
2
|
import stdin_default$1 from './table.vue.js';
|
|
3
|
-
export { defaultTableConfig, elSlotsName, omittedTableProps, tableExposeKeys, tableProps } from './table.js';
|
|
3
|
+
export { defaultTableConfig, elSlotsName, omittedTableProps, tableEmitEvents, tableEmitOnEvents, tableEmitOnProps, tableExposeKeys, tableProps } from './table.js';
|
|
4
4
|
export { useTable } from './useTable.js';
|
|
5
5
|
|
|
6
6
|
const _Table = withInstall(stdin_default$1);
|
|
@@ -75,21 +75,25 @@ const TableColumn = defineComponent({
|
|
|
75
75
|
}
|
|
76
76
|
return result;
|
|
77
77
|
});
|
|
78
|
+
const renderLabel = () => createVNode("span", {
|
|
79
|
+
"class": `${prefixCls.value}-label`
|
|
80
|
+
}, [mergedProps.value.label]);
|
|
81
|
+
const renderTooltip = () => createVNode(Fragment, null, [createVNode(ElTooltip, {
|
|
82
|
+
"content": mergedProps.value.tooltip,
|
|
83
|
+
"placement": "top"
|
|
84
|
+
}, {
|
|
85
|
+
default: () => [createVNode(stdin_default$2, {
|
|
86
|
+
"name": "carbon:help",
|
|
87
|
+
"style": {
|
|
88
|
+
marginInlineStart: token.value.marginXXS + "px"
|
|
89
|
+
}
|
|
90
|
+
}, null)]
|
|
91
|
+
})]);
|
|
78
92
|
return () => mergedProps.value.hidden ? null : createVNode(ElTableColumn, mergedProps.value, {
|
|
79
93
|
...slots.value,
|
|
80
|
-
header: slots.value.header
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
"content": mergedProps.value.tooltip,
|
|
84
|
-
"placement": "top"
|
|
85
|
-
}, {
|
|
86
|
-
default: () => [createVNode(stdin_default$2, {
|
|
87
|
-
"name": "carbon:help",
|
|
88
|
-
"style": {
|
|
89
|
-
marginInlineStart: token.value.marginXXS + "px"
|
|
90
|
-
}
|
|
91
|
-
}, null)]
|
|
92
|
-
})]) : void 0),
|
|
94
|
+
header: slots.value.header && mergedProps.value.tooltip ? (...args) => {
|
|
95
|
+
return [slots.value.header(...args), renderTooltip()];
|
|
96
|
+
} : slots.value.header || (mergedProps.value.tooltip ? () => [renderLabel(), renderTooltip()] : void 0),
|
|
93
97
|
default: slotProps => mergedProps.value.columns ? mergedProps.value.columns.map(column => createVNode(TableColumn, column, null)) : slots.value.default?.(slotProps)
|
|
94
98
|
});
|
|
95
99
|
}
|
|
@@ -10,6 +10,11 @@ export interface ToolbarConfig {
|
|
|
10
10
|
fullScreen?: boolean;
|
|
11
11
|
setting?: boolean;
|
|
12
12
|
}
|
|
13
|
+
export declare const tableEmitEvents: string[];
|
|
14
|
+
export declare const tableEmitOnEvents: string[][];
|
|
15
|
+
export declare const tableEmitOnProps: Record<string, {
|
|
16
|
+
type: (...args: any[]) => any;
|
|
17
|
+
}>;
|
|
13
18
|
export declare const tableProps: {
|
|
14
19
|
api: {
|
|
15
20
|
type: PropType<(...args: any[]) => Promise<any>>;
|
|
@@ -143,8 +148,6 @@ export interface TableSlots {
|
|
|
143
148
|
'toolbar-right'?: (props: Record<string, never>) => any;
|
|
144
149
|
}
|
|
145
150
|
export declare const elSlotsName: readonly ["default", "append", "empty"];
|
|
146
|
-
type TableEmitEvents = 'select-all' | 'expand-change' | 'current-change' | 'select' | 'selection-change' | 'cell-mouse-enter' | 'cell-mouse-leave' | 'cell-contextmenu' | 'cell-click' | 'cell-dblclick' | 'row-click' | 'row-contextmenu' | 'row-dblclick' | 'header-click' | 'header-contextmenu' | 'sort-change' | 'filter-change' | 'header-dragend';
|
|
147
|
-
export type TableEmits = (event: TableEmitEvents, ...args: any[]) => void;
|
|
148
151
|
export interface TableCustomExpose {
|
|
149
152
|
reload: () => void;
|
|
150
153
|
expandAll: () => void;
|
|
@@ -224,4 +227,3 @@ export interface TableConfig {
|
|
|
224
227
|
};
|
|
225
228
|
pagination?: Partial<PaginationProps>;
|
|
226
229
|
}
|
|
227
|
-
export {};
|
|
@@ -1,7 +1,40 @@
|
|
|
1
1
|
import elTableProps from 'element-plus/es/components/table/src/table/defaults.mjs';
|
|
2
|
-
import { omit } from 'lodash-es';
|
|
2
|
+
import { upperFirst, camelCase, omit } from 'lodash-es';
|
|
3
3
|
import { tableQueryExposeKeys } from './table-query/table-query.js';
|
|
4
4
|
|
|
5
|
+
const tableEmitEvents = [
|
|
6
|
+
"select-all",
|
|
7
|
+
"expand-change",
|
|
8
|
+
"current-change",
|
|
9
|
+
"select",
|
|
10
|
+
"selection-change",
|
|
11
|
+
"cell-mouse-enter",
|
|
12
|
+
"cell-mouse-leave",
|
|
13
|
+
"cell-contextmenu",
|
|
14
|
+
"cell-click",
|
|
15
|
+
"cell-dblclick",
|
|
16
|
+
"row-click",
|
|
17
|
+
"row-contextmenu",
|
|
18
|
+
"row-dblclick",
|
|
19
|
+
"header-click",
|
|
20
|
+
"header-contextmenu",
|
|
21
|
+
"sort-change",
|
|
22
|
+
"filter-change",
|
|
23
|
+
"header-dragend"
|
|
24
|
+
];
|
|
25
|
+
const tableEmitOnEvents = tableEmitEvents.map((item) => [
|
|
26
|
+
item,
|
|
27
|
+
"on" + upperFirst(camelCase(item))
|
|
28
|
+
]);
|
|
29
|
+
const tableEmitOnProps = tableEmitOnEvents.reduce(
|
|
30
|
+
(obj, [, onName]) => {
|
|
31
|
+
obj[onName] = {
|
|
32
|
+
type: Function
|
|
33
|
+
};
|
|
34
|
+
return obj;
|
|
35
|
+
},
|
|
36
|
+
{}
|
|
37
|
+
);
|
|
5
38
|
const tableExtraProps = {
|
|
6
39
|
api: {
|
|
7
40
|
type: Function
|
|
@@ -115,4 +148,4 @@ const defaultTableConfig = {
|
|
|
115
148
|
}
|
|
116
149
|
};
|
|
117
150
|
|
|
118
|
-
export { defaultTableConfig, elSlotsName, omittedTableProps, tableExposeKeys, tableProps };
|
|
151
|
+
export { defaultTableConfig, elSlotsName, omittedTableProps, tableEmitEvents, tableEmitOnEvents, tableEmitOnProps, tableExposeKeys, tableProps };
|
|
@@ -155,26 +155,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
155
155
|
setScrollLeft: (left?: number) => void;
|
|
156
156
|
columns: import("element-plus").TableColumnCtx<any>[];
|
|
157
157
|
updateKeyChildren: (key: string, data: any[]) => void;
|
|
158
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}
|
|
159
|
-
"select-all": (...args: any[]) => any;
|
|
160
|
-
select: (...args: any[]) => any;
|
|
161
|
-
"current-change": (...args: any[]) => any;
|
|
162
|
-
"expand-change": (...args: any[]) => any;
|
|
163
|
-
"selection-change": (...args: any[]) => any;
|
|
164
|
-
"cell-mouse-enter": (...args: any[]) => any;
|
|
165
|
-
"cell-mouse-leave": (...args: any[]) => any;
|
|
166
|
-
"cell-contextmenu": (...args: any[]) => any;
|
|
167
|
-
"cell-click": (...args: any[]) => any;
|
|
168
|
-
"cell-dblclick": (...args: any[]) => any;
|
|
169
|
-
"row-click": (...args: any[]) => any;
|
|
170
|
-
"row-contextmenu": (...args: any[]) => any;
|
|
171
|
-
"row-dblclick": (...args: any[]) => any;
|
|
172
|
-
"header-click": (...args: any[]) => any;
|
|
173
|
-
"header-contextmenu": (...args: any[]) => any;
|
|
174
|
-
"sort-change": (...args: any[]) => any;
|
|
175
|
-
"filter-change": (...args: any[]) => any;
|
|
176
|
-
"header-dragend": (...args: any[]) => any;
|
|
177
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
158
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
178
159
|
api: {
|
|
179
160
|
type: import("vue").PropType<(...args: any[]) => Promise<any>>;
|
|
180
161
|
};
|
|
@@ -296,26 +277,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
296
277
|
default: boolean;
|
|
297
278
|
};
|
|
298
279
|
preserveExpandedContent: BooleanConstructor;
|
|
299
|
-
}>> & Readonly<{
|
|
300
|
-
"onSelect-all"?: ((...args: any[]) => any) | undefined;
|
|
301
|
-
onSelect?: ((...args: any[]) => any) | undefined;
|
|
302
|
-
"onCurrent-change"?: ((...args: any[]) => any) | undefined;
|
|
303
|
-
"onExpand-change"?: ((...args: any[]) => any) | undefined;
|
|
304
|
-
"onSelection-change"?: ((...args: any[]) => any) | undefined;
|
|
305
|
-
"onCell-mouse-enter"?: ((...args: any[]) => any) | undefined;
|
|
306
|
-
"onCell-mouse-leave"?: ((...args: any[]) => any) | undefined;
|
|
307
|
-
"onCell-contextmenu"?: ((...args: any[]) => any) | undefined;
|
|
308
|
-
"onCell-click"?: ((...args: any[]) => any) | undefined;
|
|
309
|
-
"onCell-dblclick"?: ((...args: any[]) => any) | undefined;
|
|
310
|
-
"onRow-click"?: ((...args: any[]) => any) | undefined;
|
|
311
|
-
"onRow-contextmenu"?: ((...args: any[]) => any) | undefined;
|
|
312
|
-
"onRow-dblclick"?: ((...args: any[]) => any) | undefined;
|
|
313
|
-
"onHeader-click"?: ((...args: any[]) => any) | undefined;
|
|
314
|
-
"onHeader-contextmenu"?: ((...args: any[]) => any) | undefined;
|
|
315
|
-
"onSort-change"?: ((...args: any[]) => any) | undefined;
|
|
316
|
-
"onFilter-change"?: ((...args: any[]) => any) | undefined;
|
|
317
|
-
"onHeader-dragend"?: ((...args: any[]) => any) | undefined;
|
|
318
|
-
}>, {
|
|
280
|
+
}>> & Readonly<{}>, {
|
|
319
281
|
tableLayout: "auto" | "fixed";
|
|
320
282
|
border: boolean;
|
|
321
283
|
columns: TableColumnProps[];
|
|
@@ -2,7 +2,7 @@ import { defineComponent, useSlots, unref, computed, ref, useTemplateRef, mergeP
|
|
|
2
2
|
import { merge, cloneDeep, get } from 'lodash-es';
|
|
3
3
|
import { reactiveComputed, reactiveOmit } from '@vueuse/core';
|
|
4
4
|
import { useZIndex, ElButton } from 'element-plus';
|
|
5
|
-
import { tableProps, defaultTableConfig, elSlotsName, omittedTableProps, tableExposeKeys } from './table.js';
|
|
5
|
+
import { tableEmitEvents, tableProps, tableEmitOnEvents, defaultTableConfig, elSlotsName, omittedTableProps, tableExposeKeys } from './table.js';
|
|
6
6
|
import stdin_default$6 from './table-column/table-column.vue.js';
|
|
7
7
|
import stdin_default$5 from './table-column-editor/table-column-editor.vue.js';
|
|
8
8
|
import stdin_default$2 from './table-query/table-query.vue.js';
|
|
@@ -37,11 +37,20 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
37
37
|
},
|
|
38
38
|
__name: "table",
|
|
39
39
|
props: tableProps,
|
|
40
|
+
emits: tableEmitEvents,
|
|
40
41
|
setup(__props, {
|
|
41
|
-
expose: __expose
|
|
42
|
+
expose: __expose,
|
|
43
|
+
emit: __emit
|
|
42
44
|
}) {
|
|
43
45
|
const props = __props;
|
|
44
46
|
const slots = useSlots();
|
|
47
|
+
const emit = __emit;
|
|
48
|
+
const eventObject = tableEmitOnEvents.reduce((obj, [name, onName]) => {
|
|
49
|
+
obj[onName] = (...args) => {
|
|
50
|
+
emit(name, ...args);
|
|
51
|
+
};
|
|
52
|
+
return obj;
|
|
53
|
+
}, {});
|
|
45
54
|
const {
|
|
46
55
|
t
|
|
47
56
|
} = useLocale();
|
|
@@ -81,7 +90,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
81
90
|
const elTableProps = computed(() => {
|
|
82
91
|
return mergeProps(reactiveOmit(props, omittedTableProps), {
|
|
83
92
|
onSortChange
|
|
84
|
-
});
|
|
93
|
+
}, eventObject);
|
|
85
94
|
});
|
|
86
95
|
const containerStyle = computed(() => {
|
|
87
96
|
return {
|