@gx-design-vue/pro-table 0.0.3-rc.5 → 0.0.4-rc.1
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/README.md +5 -1
- package/dist/ProTable.d.ts +23 -16
- 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/index.d.ts +2 -2
- package/dist/pro-table.mjs +856 -863
- package/dist/pro-table.umd.js +1 -1
- package/dist/{pro-table.less → proTable.less} +0 -0
- package/dist/props.d.ts +5 -24
- package/dist/style.less +1 -1
- package/dist/types/ColumnTypings.d.ts +5 -6
- package/dist/types/TableTypings.d.ts +8 -8
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/ProTable.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
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';
|
|
7
6
|
import { proTableProps } from './props';
|
|
8
7
|
import './style/index.less';
|
|
9
8
|
export declare type ProTableProps = Partial<ExtractPropTypes<typeof proTableProps>>;
|
|
10
|
-
declare const
|
|
9
|
+
declare const GProTable: import("vue").DefineComponent<{
|
|
11
10
|
rowSelection: {
|
|
12
11
|
type: import("vue").PropType<import("./types/TableTypings").ProTableRowSelection<any>>;
|
|
13
12
|
default: undefined;
|
|
@@ -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,10 +253,16 @@ 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: {
|
|
260
|
+
/**
|
|
261
|
+
* @Author gx12358
|
|
262
|
+
* @DateTime 2022/1/21
|
|
263
|
+
* @lastTime 2022/1/21
|
|
264
|
+
* @description Tabel-scroll hooks 方法
|
|
265
|
+
*/
|
|
263
266
|
type: import("vue").PropType<(w: number, col: import("ant-design-vue/es/table/interface").ColumnType<any>) => void>;
|
|
264
267
|
default: undefined;
|
|
265
268
|
};
|
|
@@ -328,12 +331,10 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
328
331
|
default: () => import("./types/TableTypings").SearchConfig;
|
|
329
332
|
};
|
|
330
333
|
searchMap: {
|
|
331
|
-
type: import("vue").PropType<import("./types/ColumnTypings").ProSearchMap<"text"
|
|
334
|
+
type: import("vue").PropType<import("./types/ColumnTypings").ProSearchMap<"text">[]>;
|
|
332
335
|
default: () => never[];
|
|
333
336
|
};
|
|
334
337
|
customize: import("vue").PropType<CustomizeRender>;
|
|
335
|
-
actionRef: import("vue").PropType<import("./types/TableTypings").ProCoreActionType>;
|
|
336
|
-
formRef: import("vue").PropType<import("./types/TableTypings").ProCoreFormType>;
|
|
337
338
|
tableClassName: import("vue").PropType<String>;
|
|
338
339
|
tableStyle: {
|
|
339
340
|
type: import("vue").PropType<import("vue").CSSProperties>;
|
|
@@ -405,7 +406,7 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
405
406
|
onReload: import("vue").PropType<(params?: Partial<Record<string, any>> | undefined) => any>;
|
|
406
407
|
onSubmit: import("vue").PropType<(params: Partial<Record<string, any>>) => any>;
|
|
407
408
|
onSizeChange: import("vue").PropType<(size: string) => any>;
|
|
408
|
-
|
|
409
|
+
onLoadingChange: import("vue").PropType<(loading: boolean) => any>;
|
|
409
410
|
onRequestError: import("vue").PropType<(e: Error) => void>;
|
|
410
411
|
onBeforeSearchSubmit: import("vue").PropType<import("./types/TableTypings").RequsetFunction<RecordType>>;
|
|
411
412
|
onColumnsStateChange: import("vue").PropType<(data: import("./hooks/useColumnSetting").ColumnsState[]) => void>;
|
|
@@ -539,10 +540,16 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
539
540
|
default: undefined;
|
|
540
541
|
};
|
|
541
542
|
onChange: {
|
|
542
|
-
type: import("vue").PropType<(pagination: import("ant-design-vue/es/table/interface").TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter:
|
|
543
|
+
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
544
|
default: undefined;
|
|
544
545
|
};
|
|
545
546
|
onResizeColumn: {
|
|
547
|
+
/**
|
|
548
|
+
* @Author gx12358
|
|
549
|
+
* @DateTime 2022/1/21
|
|
550
|
+
* @lastTime 2022/1/21
|
|
551
|
+
* @description Tabel-scroll hooks 方法
|
|
552
|
+
*/
|
|
546
553
|
type: import("vue").PropType<(w: number, col: import("ant-design-vue/es/table/interface").ColumnType<any>) => void>;
|
|
547
554
|
default: undefined;
|
|
548
555
|
};
|
|
@@ -581,10 +588,10 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
581
588
|
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
582
589
|
onReload?: ((...args: any[]) => any) | undefined;
|
|
583
590
|
onSizeChange?: ((...args: any[]) => any) | undefined;
|
|
591
|
+
onLoadingChange?: ((...args: any[]) => any) | undefined;
|
|
584
592
|
onRequestError?: ((...args: any[]) => any) | undefined;
|
|
585
593
|
onBeforeSearchSubmit?: ((...args: any[]) => any) | undefined;
|
|
586
594
|
onColumnsStateChange?: ((...args: any[]) => any) | undefined;
|
|
587
|
-
onLoadingChange?: ((...args: any[]) => any) | undefined;
|
|
588
595
|
}, {
|
|
589
596
|
rowKey: string;
|
|
590
597
|
columns: ProColumns;
|
|
@@ -624,7 +631,7 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
624
631
|
sticky: boolean | import("ant-design-vue/lib/vc-table/interface").TableSticky | undefined;
|
|
625
632
|
size: import("./typing").SizeType;
|
|
626
633
|
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:
|
|
634
|
+
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
635
|
getPopupContainer: import("ant-design-vue/es/table/interface").GetPopupContainer;
|
|
629
636
|
align: import("ant-design-vue/es/vc-table/interface").AlignType;
|
|
630
637
|
autoScroll: boolean;
|
|
@@ -638,7 +645,7 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
638
645
|
request: import("./types/TableTypings").RequsetFunction<any>;
|
|
639
646
|
waitRequest: boolean;
|
|
640
647
|
debounceTime: number;
|
|
641
|
-
searchMap: import("./types/ColumnTypings").ProSearchMap<"text"
|
|
648
|
+
searchMap: import("./types/ColumnTypings").ProSearchMap<"text">[];
|
|
642
649
|
toolBarBtn: ToolBarBtnRender;
|
|
643
650
|
headerTitle: HeaderTitleRender;
|
|
644
651
|
titleTip: TitleTipRender;
|
|
@@ -653,4 +660,4 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
653
660
|
dataSource: any[] | undefined;
|
|
654
661
|
onResizeColumn: (w: number, col: import("ant-design-vue/es/table/interface").ColumnType<any>) => void;
|
|
655
662
|
}>;
|
|
656
|
-
export default
|
|
663
|
+
export default GProTable;
|
|
@@ -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;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ import './design/config.less';
|
|
|
2
2
|
import './design/ant-design-theme.less';
|
|
3
3
|
import './design/ant-design-vue.less';
|
|
4
4
|
import './style/table.less';
|
|
5
|
-
import './
|
|
5
|
+
import './proTable.less';
|
|
6
6
|
import './style.less';
|
|
7
7
|
export { proTableProps } from './props';
|
|
8
8
|
export { default } from './ProTable';
|
|
9
9
|
export type { ProTableProps } from './ProTable';
|
|
10
10
|
export type { RequsetFunction, ProTableRef, ProCoreActionType, ProTabelFeachParams, ProCoreFormType } from './types/TableTypings';
|
|
11
11
|
export type { ProColumn, ProColumns, ProSearchMap } from './types/ColumnTypings';
|
|
12
|
-
export { default as
|
|
12
|
+
export { default as GProTable } from './ProTable';
|