@gx-design-vue/pro-table 0.0.3-rc.5 → 0.0.4
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 +9 -14
- package/dist/_utils/ant-design-vue/table/typings.d.ts +7 -2
- package/dist/components/Form/index.d.ts +3 -3
- package/dist/hooks/useFetchData.d.ts +8 -8
- package/dist/hooks/useTableForm.d.ts +1 -1
- package/dist/pro-table.mjs +857 -864
- package/dist/pro-table.umd.js +1 -1
- package/dist/props.d.ts +5 -24
- package/dist/types/ColumnTypings.d.ts +5 -6
- package/dist/types/TableTypings.d.ts +8 -8
- package/package.json +1 -1
package/dist/ProTable.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ExtractPropTypes } from 'vue';
|
|
2
2
|
import type { RecordType } from './typing';
|
|
3
|
-
import type { FilterValue, SorterResult } from './_utils';
|
|
4
3
|
import type { OptionConfig } from './types/TableTypings';
|
|
5
4
|
import type { ProColumns } from './types/ColumnTypings';
|
|
6
5
|
import type { HeaderTitleRender, TitleTipRender, ToolBarBtnRender, CustomizeRender, SettingExtraRender, OptionsExtraRender } from './types/SlotsTypings';
|
|
@@ -45,12 +44,10 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
45
44
|
default: () => import("./types/TableTypings").SearchConfig;
|
|
46
45
|
};
|
|
47
46
|
searchMap: {
|
|
48
|
-
type: import("vue").PropType<import("./types/ColumnTypings").ProSearchMap<"text"
|
|
47
|
+
type: import("vue").PropType<import("./types/ColumnTypings").ProSearchMap<"text">[]>;
|
|
49
48
|
default: () => never[];
|
|
50
49
|
};
|
|
51
50
|
customize: import("vue").PropType<CustomizeRender>;
|
|
52
|
-
actionRef: import("vue").PropType<import("./types/TableTypings").ProCoreActionType>;
|
|
53
|
-
formRef: import("vue").PropType<import("./types/TableTypings").ProCoreFormType>;
|
|
54
51
|
tableClassName: import("vue").PropType<String>;
|
|
55
52
|
tableStyle: {
|
|
56
53
|
type: import("vue").PropType<import("vue").CSSProperties>;
|
|
@@ -122,7 +119,7 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
122
119
|
onReload: import("vue").PropType<(params?: Partial<Record<string, any>> | undefined) => any>;
|
|
123
120
|
onSubmit: import("vue").PropType<(params: Partial<Record<string, any>>) => any>;
|
|
124
121
|
onSizeChange: import("vue").PropType<(size: string) => any>;
|
|
125
|
-
|
|
122
|
+
onLoadingChange: import("vue").PropType<(loading: boolean) => any>;
|
|
126
123
|
onRequestError: import("vue").PropType<(e: Error) => void>;
|
|
127
124
|
onBeforeSearchSubmit: import("vue").PropType<import("./types/TableTypings").RequsetFunction<RecordType>>;
|
|
128
125
|
onColumnsStateChange: import("vue").PropType<(data: import("./hooks/useColumnSetting").ColumnsState[]) => void>;
|
|
@@ -256,7 +253,7 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
256
253
|
default: undefined;
|
|
257
254
|
};
|
|
258
255
|
onChange: {
|
|
259
|
-
type: import("vue").PropType<(pagination: import("ant-design-vue/es/table/interface").TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter:
|
|
256
|
+
type: import("vue").PropType<(pagination: import("ant-design-vue/es/table/interface").TablePaginationConfig, filters: Record<string, import("ant-design-vue/es/table/interface").FilterValue | null>, sorter: any, extra: import("ant-design-vue/es/table/interface").TableCurrentDataSource<any>) => void>;
|
|
260
257
|
default: undefined;
|
|
261
258
|
};
|
|
262
259
|
onResizeColumn: {
|
|
@@ -328,12 +325,10 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
328
325
|
default: () => import("./types/TableTypings").SearchConfig;
|
|
329
326
|
};
|
|
330
327
|
searchMap: {
|
|
331
|
-
type: import("vue").PropType<import("./types/ColumnTypings").ProSearchMap<"text"
|
|
328
|
+
type: import("vue").PropType<import("./types/ColumnTypings").ProSearchMap<"text">[]>;
|
|
332
329
|
default: () => never[];
|
|
333
330
|
};
|
|
334
331
|
customize: import("vue").PropType<CustomizeRender>;
|
|
335
|
-
actionRef: import("vue").PropType<import("./types/TableTypings").ProCoreActionType>;
|
|
336
|
-
formRef: import("vue").PropType<import("./types/TableTypings").ProCoreFormType>;
|
|
337
332
|
tableClassName: import("vue").PropType<String>;
|
|
338
333
|
tableStyle: {
|
|
339
334
|
type: import("vue").PropType<import("vue").CSSProperties>;
|
|
@@ -405,7 +400,7 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
405
400
|
onReload: import("vue").PropType<(params?: Partial<Record<string, any>> | undefined) => any>;
|
|
406
401
|
onSubmit: import("vue").PropType<(params: Partial<Record<string, any>>) => any>;
|
|
407
402
|
onSizeChange: import("vue").PropType<(size: string) => any>;
|
|
408
|
-
|
|
403
|
+
onLoadingChange: import("vue").PropType<(loading: boolean) => any>;
|
|
409
404
|
onRequestError: import("vue").PropType<(e: Error) => void>;
|
|
410
405
|
onBeforeSearchSubmit: import("vue").PropType<import("./types/TableTypings").RequsetFunction<RecordType>>;
|
|
411
406
|
onColumnsStateChange: import("vue").PropType<(data: import("./hooks/useColumnSetting").ColumnsState[]) => void>;
|
|
@@ -539,7 +534,7 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
539
534
|
default: undefined;
|
|
540
535
|
};
|
|
541
536
|
onChange: {
|
|
542
|
-
type: import("vue").PropType<(pagination: import("ant-design-vue/es/table/interface").TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter:
|
|
537
|
+
type: import("vue").PropType<(pagination: import("ant-design-vue/es/table/interface").TablePaginationConfig, filters: Record<string, import("ant-design-vue/es/table/interface").FilterValue | null>, sorter: any, extra: import("ant-design-vue/es/table/interface").TableCurrentDataSource<any>) => void>;
|
|
543
538
|
default: undefined;
|
|
544
539
|
};
|
|
545
540
|
onResizeColumn: {
|
|
@@ -581,10 +576,10 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
581
576
|
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
582
577
|
onReload?: ((...args: any[]) => any) | undefined;
|
|
583
578
|
onSizeChange?: ((...args: any[]) => any) | undefined;
|
|
579
|
+
onLoadingChange?: ((...args: any[]) => any) | undefined;
|
|
584
580
|
onRequestError?: ((...args: any[]) => any) | undefined;
|
|
585
581
|
onBeforeSearchSubmit?: ((...args: any[]) => any) | undefined;
|
|
586
582
|
onColumnsStateChange?: ((...args: any[]) => any) | undefined;
|
|
587
|
-
onLoadingChange?: ((...args: any[]) => any) | undefined;
|
|
588
583
|
}, {
|
|
589
584
|
rowKey: string;
|
|
590
585
|
columns: ProColumns;
|
|
@@ -624,7 +619,7 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
624
619
|
sticky: boolean | import("ant-design-vue/lib/vc-table/interface").TableSticky | undefined;
|
|
625
620
|
size: import("./typing").SizeType;
|
|
626
621
|
locale: import("ant-design-vue/es/table/interface").TableLocale;
|
|
627
|
-
onChange: (pagination: import("ant-design-vue/es/table/interface").TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter:
|
|
622
|
+
onChange: (pagination: import("ant-design-vue/es/table/interface").TablePaginationConfig, filters: Record<string, import("ant-design-vue/es/table/interface").FilterValue | null>, sorter: any, extra: import("ant-design-vue/es/table/interface").TableCurrentDataSource<any>) => void;
|
|
628
623
|
getPopupContainer: import("ant-design-vue/es/table/interface").GetPopupContainer;
|
|
629
624
|
align: import("ant-design-vue/es/vc-table/interface").AlignType;
|
|
630
625
|
autoScroll: boolean;
|
|
@@ -638,7 +633,7 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
638
633
|
request: import("./types/TableTypings").RequsetFunction<any>;
|
|
639
634
|
waitRequest: boolean;
|
|
640
635
|
debounceTime: number;
|
|
641
|
-
searchMap: import("./types/ColumnTypings").ProSearchMap<"text"
|
|
636
|
+
searchMap: import("./types/ColumnTypings").ProSearchMap<"text">[];
|
|
642
637
|
toolBarBtn: ToolBarBtnRender;
|
|
643
638
|
headerTitle: HeaderTitleRender;
|
|
644
639
|
titleTip: TitleTipRender;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import type { TableProps } from 'ant-design-vue';
|
|
2
|
+
import type { FilterValue, SorterResult } from 'ant-design-vue/es/table/interface';
|
|
3
|
+
import type { RecordType } from '../../../typing';
|
|
2
4
|
export type { ContextSlots } from 'ant-design-vue/es/table/context';
|
|
3
|
-
export type { Key, SortOrder, ColumnFilterItem, ColumnTitle, CompareFn, FilterDropdownProps, GetRowKey,
|
|
5
|
+
export type { Key, SortOrder, ColumnFilterItem, ColumnTitle, CompareFn, FilterDropdownProps, GetRowKey, ColumnsType, ExpandType, TablePaginationConfig, TableAction, TableLocale, TableCurrentDataSource, ColumnType, TableRowSelection, GetPopupContainer } from 'ant-design-vue/es/table/interface';
|
|
4
6
|
export type { AlignType, CellEllipsisType, DataIndex, FixedType, GetComponentProps, RenderedCell } from 'ant-design-vue/es/vc-table/interface';
|
|
5
7
|
export type { TableProps as RcTableProps } from 'ant-design-vue/es/vc-table/Table';
|
|
6
|
-
export type
|
|
8
|
+
export declare type TableFilters = Record<string, FilterValue | null>;
|
|
9
|
+
export declare type TableSorterRecord = SorterResult<RecordType>;
|
|
10
|
+
export declare type TableSorter = TableSorterRecord | TableSorterRecord[];
|
|
11
|
+
export type { TableProps, FilterValue };
|
|
@@ -8,7 +8,7 @@ declare const ProTableForm: import("vue").DefineComponent<{
|
|
|
8
8
|
};
|
|
9
9
|
modal: import("vue").PropType<boolean>;
|
|
10
10
|
searchMap: {
|
|
11
|
-
type: PropType<ProSearchMap<"text"
|
|
11
|
+
type: PropType<ProSearchMap<"text">[]>;
|
|
12
12
|
default: () => never[];
|
|
13
13
|
};
|
|
14
14
|
loading: PropType<boolean>;
|
|
@@ -21,7 +21,7 @@ declare const ProTableForm: import("vue").DefineComponent<{
|
|
|
21
21
|
};
|
|
22
22
|
modal: import("vue").PropType<boolean>;
|
|
23
23
|
searchMap: {
|
|
24
|
-
type: PropType<ProSearchMap<"text"
|
|
24
|
+
type: PropType<ProSearchMap<"text">[]>;
|
|
25
25
|
default: () => never[];
|
|
26
26
|
};
|
|
27
27
|
loading: PropType<boolean>;
|
|
@@ -31,6 +31,6 @@ declare const ProTableForm: import("vue").DefineComponent<{
|
|
|
31
31
|
onSearch?: ((...args: any[]) => any) | undefined;
|
|
32
32
|
}, {
|
|
33
33
|
search: import("../../types/TableTypings").SearchConfig;
|
|
34
|
-
searchMap: ProSearchMap<"text"
|
|
34
|
+
searchMap: ProSearchMap<"text">[];
|
|
35
35
|
}>;
|
|
36
36
|
export default ProTableForm;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ComputedRef } from 'vue';
|
|
2
|
-
import type { SpinProps } from '../_utils';
|
|
1
|
+
import type { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import type { SpinProps, TableSorter } from '../_utils';
|
|
3
3
|
import type { ProTableProps } from '../ProTable';
|
|
4
4
|
import type { RecordType } from '../typing';
|
|
5
|
-
import type { ProTablePagination, ProTablePaginationConfig } from '../types/TableTypings';
|
|
5
|
+
import type { ProTablePagination, ProTabelFeachParams, ProTablePaginationConfig } from '../types/TableTypings';
|
|
6
6
|
import type { ProColumns } from '../types/ColumnTypings';
|
|
7
7
|
interface ActionType {
|
|
8
8
|
getLoading: ComputedRef<boolean | SpinProps | undefined>;
|
|
@@ -20,12 +20,12 @@ export declare type ConfigFetchData = {
|
|
|
20
20
|
polling: ComputedRef<ProTableProps['polling']>;
|
|
21
21
|
request: ComputedRef<ProTableProps['request']>;
|
|
22
22
|
postData: ComputedRef<ProTableProps['postData']>;
|
|
23
|
-
waitRequest:
|
|
23
|
+
waitRequest: Ref<ProTableProps['waitRequest']>;
|
|
24
24
|
debounceTime: ComputedRef<ProTableProps['debounceTime']>;
|
|
25
25
|
dataSource: ComputedRef<ProTableProps['dataSource']>;
|
|
26
26
|
};
|
|
27
|
-
export declare function useConfigFetchData(props: ProTableProps): ConfigFetchData
|
|
28
|
-
export declare function useFetchData({ polling, request, postData, dataSource, waitRequest, debounceTime
|
|
27
|
+
export declare function useConfigFetchData(props: ProTableProps): Omit<ConfigFetchData, 'waitRequest'>;
|
|
28
|
+
export declare function useFetchData({ polling, request, postData, dataSource, waitRequest, debounceTime }: ConfigFetchData, { columns, getLoading, setLoading, setColumns, removeRowKeys, syncSelectedRows, formParamsRef, setPagination, getPaginationInfo, onBeforeSearchSubmit }: ActionType, emit: any): {
|
|
29
29
|
getDataSourceRef: ComputedRef<RecordType[]>;
|
|
30
30
|
isTreeDataRef: ComputedRef<boolean>;
|
|
31
31
|
reSetDataList: (list: RecordType[]) => void;
|
|
@@ -33,7 +33,7 @@ export declare function useFetchData({ polling, request, postData, dataSource, w
|
|
|
33
33
|
key?: string | undefined;
|
|
34
34
|
params: RecordType;
|
|
35
35
|
}) => void;
|
|
36
|
-
handleTableChange: (pagination: ProTablePaginationConfig, filters:
|
|
37
|
-
reload: (info?:
|
|
36
|
+
handleTableChange: (pagination: ProTablePaginationConfig, filters: Record<string, any[] | null>, sorter: TableSorter) => void;
|
|
37
|
+
reload: (info?: ProTabelFeachParams) => Promise<void>;
|
|
38
38
|
};
|
|
39
39
|
export {};
|
|
@@ -10,7 +10,7 @@ export declare function useTableForm({ search, searchMap, params, columns }: {
|
|
|
10
10
|
params: Ref<ProTableProps['params']>;
|
|
11
11
|
columns: ComputedRef<ProTableProps['columns']>;
|
|
12
12
|
}): {
|
|
13
|
-
formDataRef: Ref<ProSearchMap<"text"
|
|
13
|
+
formDataRef: Ref<ProSearchMap<"text">[]>;
|
|
14
14
|
formParamsRef: RecordType;
|
|
15
15
|
defaultParamsRef: RecordType;
|
|
16
16
|
setFormParams: (params: any) => void;
|