@gx-design-vue/pro-table 0.2.0-beta.59 → 0.2.0-beta.60
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/ProTable.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { CSSProperties, SlotsType } from 'vue';
|
|
2
|
-
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
3
2
|
import type { FilterValue, Key, SorterResult, SpinProps, TableCurrentDataSource } from './_utils';
|
|
4
3
|
import type { OptionConfig, ProTableProps, SearchConfig } from './types/TableTypings';
|
|
5
4
|
import type { ProColumnsType } from './types/ColumnTypings';
|
|
@@ -662,7 +661,7 @@ declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
662
661
|
settingExtra: DefaultRender;
|
|
663
662
|
optionsExtra: DefaultRender;
|
|
664
663
|
pageItemRender: import("./types/SlotsTypings").PageItemRender | undefined;
|
|
665
|
-
columns: ProColumnsType<Record<string, any>,
|
|
664
|
+
columns: ProColumnsType<Record<string, any>, Record<string, any>> | undefined;
|
|
666
665
|
dataSource: any[] | undefined;
|
|
667
666
|
scroll: {
|
|
668
667
|
x?: number | true | string;
|
|
@@ -728,7 +727,7 @@ declare const ProTable: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
728
727
|
options: boolean | OptionConfig | undefined;
|
|
729
728
|
waitRequest: boolean | undefined;
|
|
730
729
|
debounceTime: number | undefined;
|
|
731
|
-
request: import("./types/TableTypings").RequsetFunction<Record<string, any>,
|
|
730
|
+
request: import("./types/TableTypings").RequsetFunction<Record<string, any>, Record<string, any>> | undefined;
|
|
732
731
|
searchMap: import("./types/ColumnTypings").ProSearchMap<undefined, string>[] | undefined;
|
|
733
732
|
'onUpdate:expandedRowKeys': ((expandedKeys: Key[]) => void) | undefined;
|
|
734
733
|
}, SlotsType<{
|
|
@@ -15,7 +15,7 @@ type UseColumnsType = {
|
|
|
15
15
|
export declare function useConfigColumns(props: ProTableProps): ConfigColumns;
|
|
16
16
|
export declare function useColumns({ scroll, columns, breakpoint, draggabled, autoScroll, neverScroll }: UseColumnsType): {
|
|
17
17
|
breakpoint: ComputedRef<boolean | undefined>;
|
|
18
|
-
getProColumns: ComputedRef<ProColumnType<import("../typing").DefaultRecordType,
|
|
18
|
+
getProColumns: ComputedRef<ProColumnType<import("../typing").DefaultRecordType, Record<string, any>>[]>;
|
|
19
19
|
cacheProColumns: Ref<ProColumnsType, ProColumnsType>;
|
|
20
20
|
setColumns: (columnList: ProColumnsType) => void;
|
|
21
21
|
changeColumns: (columnState: Record<string, ColumnsState>) => void;
|
package/dist/hooks/useTable.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { ComputedRef, Ref } from 'vue';
|
|
2
|
-
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
3
2
|
import type { BaseTableProps } from '../props';
|
|
4
3
|
import { ProCoreActionType, ProCoreFormType, ProTableProps, ProTableRef, RequsetConfig, RequsetFunction } from '../types/TableTypings';
|
|
5
4
|
import type { ProSearchMap } from '../types/ColumnTypings';
|
|
6
|
-
export declare function useTable<T =
|
|
5
|
+
export declare function useTable<T extends object = Record<string, any>, R extends object = Record<string, any>>(tableRef: Ref<ProTableRef<T> | undefined>, options?: {
|
|
7
6
|
defaultValue: Omit<ProTableProps<T, R>, 'request'>;
|
|
8
7
|
request?: RequsetFunction<T, R>;
|
|
9
8
|
}): {
|
|
@@ -64,7 +64,7 @@ export type ProSearchMap<ValueType = 'text', ParamsKey = string> = {
|
|
|
64
64
|
*/
|
|
65
65
|
valueEnum?: ProSchemaValueEnumType[];
|
|
66
66
|
};
|
|
67
|
-
export type ProColumnType<DataValue = DefaultRecordType, SearchParama =
|
|
67
|
+
export type ProColumnType<DataValue = DefaultRecordType, SearchParama = Record<string, any>> = Omit<ColumnType<DataValue>, 'key' | 'dataIndex'> & {
|
|
68
68
|
children?: ProColumnsType<DataValue, SearchParama>;
|
|
69
69
|
uuid?: string | number;
|
|
70
70
|
/** 不在列表中显示 */
|
|
@@ -83,7 +83,7 @@ export type ProColumnType<DataValue = DefaultRecordType, SearchParama = RecordTy
|
|
|
83
83
|
columnEmptyText?: string;
|
|
84
84
|
valueType?: ProColumnsValueType;
|
|
85
85
|
};
|
|
86
|
-
export type ProColumnsType<DataValue = DefaultRecordType, SearchParama =
|
|
86
|
+
export type ProColumnsType<DataValue = DefaultRecordType, SearchParama = Record<string, any>> = ProColumnType<DataValue, SearchParama>[];
|
|
87
87
|
export type ProColumnsValueType = 'text' | 'link' | 'time' | 'dateMonth' | 'dateTime' | {
|
|
88
88
|
node?: string;
|
|
89
89
|
class?: string;
|
|
@@ -103,7 +103,7 @@ export interface ProTableRef<T = RecordType> {
|
|
|
103
103
|
formRef: () => ProCoreFormType;
|
|
104
104
|
actionRef: () => ProCoreActionType;
|
|
105
105
|
}
|
|
106
|
-
export type ProTableProps<DataRecord = Record<string, any>, ParamsType =
|
|
106
|
+
export type ProTableProps<DataRecord extends object = Record<string, any>, ParamsType extends object = Record<string, any>> = Omit<TableProps, 'columns' | 'dataSource'> & Partial<{
|
|
107
107
|
dataSource: DataRecord[];
|
|
108
108
|
tableClassName: string;
|
|
109
109
|
tableStyle: CSSProperties;
|