@gx-design-vue/pro-table 0.1.0 → 0.1.2
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/_utils/ant-design-vue/table/typings.d.ts +3 -3
- package/dist/_utils/typings.d.ts +1 -1
- package/dist/components/ColumnSetting/index.d.ts +1 -1
- package/dist/components/ListToolBar/index.d.ts +1 -1
- package/dist/components/ToolBar/index.d.ts +2 -2
- package/dist/context/TableContext.d.ts +1 -1
- package/dist/hooks/useColumnSetting.d.ts +4 -4
- package/dist/hooks/useColums.d.ts +2 -2
- package/dist/hooks/useDebounceFn.d.ts +1 -1
- package/dist/hooks/useFetchData.d.ts +1 -1
- package/dist/hooks/useTableScroll.d.ts +2 -2
- package/dist/pro-table.es.js +30068 -0
- package/dist/pro-table.umd.js +13 -13
- package/dist/types/ColumnTypings.d.ts +8 -8
- package/dist/types/SlotsTypings.d.ts +7 -7
- package/dist/types/TableTypings.d.ts +11 -11
- package/package.json +1 -1
- package/dist/pro-table.mjs +0 -22168
|
@@ -3,7 +3,7 @@ import type { FilterValue, SorterResult } from 'ant-design-vue/es/table/interfac
|
|
|
3
3
|
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
4
4
|
export type { TablePaginationConfig, TableRowSelection } from 'ant-design-vue/es/table/interface';
|
|
5
5
|
export type { Key } from 'ant-design-vue/es/vc-table/interface';
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
6
|
+
export type TableFilters = Record<string, FilterValue | null>;
|
|
7
|
+
export type TableSorterRecord = SorterResult<RecordType>;
|
|
8
|
+
export type TableSorter = TableSorterRecord | TableSorterRecord[];
|
|
9
9
|
export type { TableProps, ColumnType, FilterValue, SorterResult };
|
package/dist/_utils/typings.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FunctionalComponent as FC } from 'vue';
|
|
2
2
|
import type { SettingExtraRender } from '../../types/SlotsTypings';
|
|
3
3
|
import './style.less';
|
|
4
|
-
export
|
|
4
|
+
export type ColumnSettingProps = {
|
|
5
5
|
draggable?: boolean;
|
|
6
6
|
checkable?: boolean;
|
|
7
7
|
extra?: SettingExtraRender;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
2
|
import type { ProTableProps, OptionConfig } from '../../types/TableTypings';
|
|
3
3
|
import './style.less';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export type OptionsFunctionType = () => void;
|
|
5
|
+
export type ToolBarProps = {
|
|
6
6
|
headerTitle?: ProTableProps['headerTitle'];
|
|
7
7
|
titleTip?: ProTableProps['titleTip'];
|
|
8
8
|
toolBarBtn?: ProTableProps['toolBarBtn'];
|
|
@@ -4,7 +4,7 @@ import type { SizeType } from '@gx-design-vue/pro-utils';
|
|
|
4
4
|
import type { ProColumnsType } from '../types/ColumnTypings';
|
|
5
5
|
import type { ColumnsState, SettingsAction } from '../hooks/useColumnSetting';
|
|
6
6
|
import type { PaginationProps } from '../_utils';
|
|
7
|
-
export
|
|
7
|
+
export type ContextType = any;
|
|
8
8
|
export interface TableContextProps {
|
|
9
9
|
columns?: ComputedRef<ProColumnsType>;
|
|
10
10
|
cacheColumns?: ComputedRef<ProColumnsType>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Ref } from 'vue';
|
|
2
2
|
import type { ProColumnsType } from '../types/ColumnTypings';
|
|
3
3
|
import type { ProTableProps } from '../types/TableTypings';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export type SettingsOperationType = 'fixed' | 'drop' | 'show' | undefined;
|
|
5
|
+
export type ColumnsState = {
|
|
6
6
|
show?: boolean;
|
|
7
7
|
fixed?: 'right' | 'left' | boolean | undefined;
|
|
8
8
|
order?: number;
|
|
@@ -11,7 +11,7 @@ export declare type ColumnsState = {
|
|
|
11
11
|
icon: boolean;
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type SettingsAction = {
|
|
15
15
|
autoScroll?: Ref<ProTableProps['autoScroll']>;
|
|
16
16
|
sortKeyColumns: Ref<string[]>;
|
|
17
17
|
columnsMap: Record<string, ColumnsState>;
|
|
@@ -20,7 +20,7 @@ export declare type SettingsAction = {
|
|
|
20
20
|
cacheColumnsMap: Record<string, ColumnsState>;
|
|
21
21
|
setColumnsMap: (value: Record<string, ColumnsState>, key?: SettingsOperationType) => void;
|
|
22
22
|
};
|
|
23
|
-
export
|
|
23
|
+
export type ColumnsStateType = {
|
|
24
24
|
value?: Record<string, ColumnsState>;
|
|
25
25
|
onChange?: (map: Record<string, ColumnsState>) => void;
|
|
26
26
|
};
|
|
@@ -2,12 +2,12 @@ import type { Ref, ComputedRef } from 'vue';
|
|
|
2
2
|
import type { ColumnsState } from './useColumnSetting';
|
|
3
3
|
import type { ProTableProps } from '../types/TableTypings';
|
|
4
4
|
import type { ProColumnType, ProColumnsType } from '../types/ColumnTypings';
|
|
5
|
-
export
|
|
5
|
+
export type ConfigColumns = {
|
|
6
6
|
draggabled: ComputedRef<ProTableProps['draggabled']>;
|
|
7
7
|
neverScroll: ComputedRef<ProTableProps['neverScroll']>;
|
|
8
8
|
autoScroll: ComputedRef<ProTableProps['autoScroll']>;
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
type UseColumnsType = {
|
|
11
11
|
scroll: ComputedRef<ProTableProps['scroll']>;
|
|
12
12
|
breakpoint: ComputedRef<boolean>;
|
|
13
13
|
columns: ComputedRef<ProColumnsType>;
|
|
@@ -15,7 +15,7 @@ interface ActionType {
|
|
|
15
15
|
formParamsRef: RecordType;
|
|
16
16
|
onBeforeSearchSubmit: ProTableProps['onBeforeSearchSubmit'];
|
|
17
17
|
}
|
|
18
|
-
export
|
|
18
|
+
export type ConfigFetchData = {
|
|
19
19
|
polling: ComputedRef<ProTableProps['polling']>;
|
|
20
20
|
request: ComputedRef<ProTableProps['request']>;
|
|
21
21
|
postData: ComputedRef<ProTableProps['postData']>;
|
|
@@ -2,7 +2,7 @@ import type { ComputedRef, Ref } from 'vue';
|
|
|
2
2
|
import { type Breakpoint } from '@gx-design-vue/pro-utils';
|
|
3
3
|
import type { ProTableProps } from '../types/TableTypings';
|
|
4
4
|
import type { ProColumnsType } from '../types/ColumnTypings';
|
|
5
|
-
|
|
5
|
+
type ConfigScroll = {
|
|
6
6
|
scroll: ComputedRef<ProTableProps['scroll']>;
|
|
7
7
|
autoScroll: ComputedRef<ProTableProps['autoScroll']>;
|
|
8
8
|
modalScroll: ComputedRef<ProTableProps['modalScroll']>;
|
|
@@ -10,7 +10,7 @@ declare type ConfigScroll = {
|
|
|
10
10
|
rowSelection: ComputedRef<ProTableProps['rowSelection']>;
|
|
11
11
|
scrollBreakpoint: ComputedRef<ProTableProps['scrollBreakpoint']>;
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
type useTableScrollType = {
|
|
14
14
|
columns: ComputedRef<ProColumnsType>;
|
|
15
15
|
innerWidth: Ref<number>;
|
|
16
16
|
screensRef: Ref<Partial<Record<Breakpoint, boolean>>>;
|