@gopowerteam/table-render 0.0.124 → 0.0.125
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/dist/cjs/index.cjs +7 -7
- package/dist/cjs/interfaces/table-column-options.d.ts +6 -0
- package/dist/cjs/table-render/index.d.ts +20 -1
- package/dist/cjs/table-render/table-column-render.d.ts +13 -6
- package/dist/es/index.mjs +432 -374
- package/dist/es/interfaces/table-column-options.d.ts +6 -0
- package/dist/es/table-render/index.d.ts +20 -1
- package/dist/es/table-render/table-column-render.d.ts +13 -6
- package/package.json +1 -1
|
@@ -49,6 +49,12 @@ export interface ExportColumnOptions {
|
|
|
49
49
|
width?: number;
|
|
50
50
|
content?: (record: DataRecord) => string | number | undefined;
|
|
51
51
|
}
|
|
52
|
+
export interface ColumnsGroup {
|
|
53
|
+
title: string;
|
|
54
|
+
children: (ColumnsGroup | {
|
|
55
|
+
key: string;
|
|
56
|
+
})[];
|
|
57
|
+
}
|
|
52
58
|
export type TableColumnsOptions<T = DataRecord> = TableColumnOptions<T>[];
|
|
53
59
|
export type TableColumnsTypeKeyOptions<T = DataRecord> = TableColumnTypeKeyOptions<T>[];
|
|
54
60
|
export type TableColumnsStringKeyOptions<T = DataRecord> = TableColumnStringKeyOptions<T>[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PageableOptions } from '../interfaces/pageable-options';
|
|
2
2
|
import { EventEmits, TableEditEventOptions, TableExportEventOptions, TablePreviewEventOptions, TableReloadEventOptions } from '../hooks';
|
|
3
|
-
import { TableColumnSharedOptions, TableColumnsOptions, TableFormSharedOptions, TableLoadParams } from '../interfaces';
|
|
3
|
+
import { ColumnsGroup, TableColumnSharedOptions, TableColumnsOptions, TableFormSharedOptions, TableLoadParams } from '../interfaces';
|
|
4
4
|
import { RequestPlugin } from '@gopowerteam/request';
|
|
5
5
|
import { DataRecord, FormItemsOptions, FormRenderInstance } from '@gopowerteam/form-render';
|
|
6
6
|
import { PropType, Ref } from 'vue';
|
|
@@ -123,6 +123,15 @@ export declare const TableRender: import('vue').DefineComponent<{
|
|
|
123
123
|
required: false;
|
|
124
124
|
default: boolean;
|
|
125
125
|
};
|
|
126
|
+
columnsGroups: {
|
|
127
|
+
type: PropType<ColumnsGroup[]>;
|
|
128
|
+
required: false;
|
|
129
|
+
default: () => never[];
|
|
130
|
+
};
|
|
131
|
+
rowClass: {
|
|
132
|
+
type: PropType<(record: any) => string>;
|
|
133
|
+
required: false;
|
|
134
|
+
};
|
|
126
135
|
}, {
|
|
127
136
|
tableId: string;
|
|
128
137
|
tableInstance: Ref<import('vue').CreateComponentPublicInstance<Readonly<{
|
|
@@ -1641,6 +1650,15 @@ export declare const TableRender: import('vue').DefineComponent<{
|
|
|
1641
1650
|
required: false;
|
|
1642
1651
|
default: boolean;
|
|
1643
1652
|
};
|
|
1653
|
+
columnsGroups: {
|
|
1654
|
+
type: PropType<ColumnsGroup[]>;
|
|
1655
|
+
required: false;
|
|
1656
|
+
default: () => never[];
|
|
1657
|
+
};
|
|
1658
|
+
rowClass: {
|
|
1659
|
+
type: PropType<(record: any) => string>;
|
|
1660
|
+
required: false;
|
|
1661
|
+
};
|
|
1644
1662
|
}>>, {
|
|
1645
1663
|
autoLoad: boolean;
|
|
1646
1664
|
size: "mini" | "small" | "medium" | "large";
|
|
@@ -1658,6 +1676,7 @@ export declare const TableRender: import('vue').DefineComponent<{
|
|
|
1658
1676
|
hoverable: boolean;
|
|
1659
1677
|
bordered: boolean;
|
|
1660
1678
|
stripe: boolean;
|
|
1679
|
+
columnsGroups: ColumnsGroup[];
|
|
1661
1680
|
}, {}>;
|
|
1662
1681
|
export type TableRenderInstance = InstanceType<typeof TableRender>;
|
|
1663
1682
|
export type TableRenderProps = TableRenderInstance['$props'];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmits } from '../hooks';
|
|
2
2
|
import { RenderColumnType } from '../utils';
|
|
3
|
-
import { TableColumnOptions, TableColumnSharedOptions, TableColumnsOptions } from '../interfaces';
|
|
3
|
+
import { ColumnsGroup, TableColumnOptions, TableColumnSharedOptions, TableColumnsOptions } from '../interfaces';
|
|
4
4
|
import { Ref } from 'vue';
|
|
5
5
|
import { TableColumnData, TableData } from '@arco-design/web-vue';
|
|
6
6
|
|
|
@@ -22,11 +22,18 @@ export declare function toRenderColumn<T>(options?: TableColumnOptions<T>, conte
|
|
|
22
22
|
isRender: boolean;
|
|
23
23
|
type: string | undefined;
|
|
24
24
|
} | undefined;
|
|
25
|
-
export declare function renderTableColumns(columns
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
export declare function renderTableColumns({ columns, columnsOptions, columnsGroups, pageMode, collapsedColumns, events, }: {
|
|
26
|
+
columns: TableColumnsOptions;
|
|
27
|
+
columnsOptions: TableColumnSharedOptions | undefined;
|
|
28
|
+
columnsGroups: ColumnsGroup[];
|
|
29
|
+
pageMode: 'client' | 'server';
|
|
30
|
+
collapsedColumns: Ref<{
|
|
31
|
+
key: string;
|
|
32
|
+
title: string;
|
|
33
|
+
collapsed: boolean;
|
|
34
|
+
}[]>;
|
|
35
|
+
events: EventEmits;
|
|
36
|
+
}): TableColumnData[];
|
|
30
37
|
/**
|
|
31
38
|
* 创建表格列
|
|
32
39
|
* @param options
|