@gx-design-vue/pro-table 0.2.0-beta.10 → 0.2.0-beta.101
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 +220 -792
- package/dist/_utils/ant-design-vue/index.d.ts +4 -2
- package/dist/_utils/ant-design-vue/input/typings.d.ts +1 -0
- package/dist/_utils/ant-design-vue/table/props.d.ts +33 -2
- package/dist/_utils/ant-design-vue/table/typings.d.ts +6 -5
- package/dist/_utils/ant-design-vue/tooltip/typings.d.ts +1 -0
- package/dist/_utils/index.d.ts +1 -1
- package/dist/components/ColumnSetting/index.d.ts +16 -16
- package/dist/components/ColumnSetting/style.d.ts +2 -5
- package/dist/components/Form/dateFormat.d.ts +20 -0
- package/dist/components/Form/index.d.ts +39 -21
- package/dist/components/Form/style.d.ts +2 -5
- package/dist/components/ListToolBar/index.d.ts +21 -21
- package/dist/components/ListToolBar/style.d.ts +2 -5
- package/dist/components/ToolBar/FullscreenIcon.d.ts +1 -1
- package/dist/components/ToolBar/index.d.ts +20 -20
- package/dist/context/TableContext.d.ts +16 -14
- package/dist/hooks/tryOnActivated.d.ts +2 -0
- package/dist/hooks/useColumnSetting.d.ts +6 -6
- package/dist/hooks/useColums.d.ts +92 -11
- package/dist/hooks/useDebounceFn.d.ts +2 -2
- package/dist/hooks/useFetchData.d.ts +19 -14
- package/dist/hooks/useLoading.d.ts +5 -4
- package/dist/hooks/usePagination.d.ts +8 -3
- package/dist/hooks/useRowSelection.d.ts +11 -8
- package/dist/hooks/useTable.d.ts +38 -11
- package/dist/hooks/useTableForm.d.ts +6 -6
- package/dist/hooks/useTableScroll.d.ts +11 -11
- package/dist/hooks/useTableSize.d.ts +2 -2
- package/dist/index.d.ts +6 -5
- package/dist/pro-table.js +2840 -0
- package/dist/pro-table.umd.cjs +1 -0
- package/dist/props.d.ts +89 -358
- package/dist/style.d.ts +2 -6
- package/dist/types/ColumnTypings.d.ts +34 -16
- package/dist/types/SlotsTypings.d.ts +42 -9
- package/dist/types/TableTypings.d.ts +116 -67
- package/dist/utils/utils.d.ts +4 -1
- package/package.json +20 -43
- package/volar.d.ts +3 -3
- package/dist/pro-table.mjs +0 -35085
- package/dist/pro-table.umd.js +0 -364
- package/dist/typing.d.ts +0 -1
- package/dist/utils/config.d.ts +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { RecordType, VueNode } from '@gx-design-vue/pro-utils';
|
|
2
|
-
import type {
|
|
3
|
-
import type { ColumnType } from '../_utils';
|
|
1
|
+
import type { Fn, ProColumn, RecordType, VueNode } from '@gx-design-vue/pro-utils';
|
|
2
|
+
import type { CSSProperties } from 'vue';
|
|
3
|
+
import type { ColumnType, TooltipProps } from '../_utils';
|
|
4
4
|
/**
|
|
5
5
|
* @param text 文本框
|
|
6
6
|
* @param date 日期 YYYY-MM-DD
|
|
@@ -9,7 +9,7 @@ import type { ColumnType } from '../_utils';
|
|
|
9
9
|
* @param time: 时间 HH:mm:ss
|
|
10
10
|
* @param select 下拉选择器
|
|
11
11
|
*/
|
|
12
|
-
export type ProFieldValueType = 'text' | 'date' | '
|
|
12
|
+
export type ProFieldValueType = 'text' | 'select' | 'treeSelect' | 'date' | 'dateWeek' | 'dateQuarter' | 'dateMonth' | 'dateYear' | 'dateRange' | 'time';
|
|
13
13
|
/**
|
|
14
14
|
* @param text 文本框
|
|
15
15
|
* @param date 日期 YYYY-MM-DD
|
|
@@ -19,17 +19,17 @@ export type ProFieldValueType = 'text' | 'date' | 'select' | 'treeSelect' | 'dat
|
|
|
19
19
|
* @param select 下拉选择器
|
|
20
20
|
*/
|
|
21
21
|
export type ProFieldValueFormat = 'YYYY-MM-DD' | 'YYYY-MM' | 'YYYY-MM-DD HH:mm:ss' | 'HH:mm:ss';
|
|
22
|
-
export
|
|
22
|
+
export interface ProSchemaValueEnumType {
|
|
23
23
|
/** @name 演示的文案 */
|
|
24
24
|
text: VueNode | JSX.Element;
|
|
25
25
|
/** @name 演示的value值 */
|
|
26
26
|
value: any;
|
|
27
27
|
/** @name 是否禁用 */
|
|
28
28
|
disabled?: boolean;
|
|
29
|
-
}
|
|
29
|
+
}
|
|
30
30
|
type ProSchemaValueType<ValueType> = (ValueType | ProFieldValueType);
|
|
31
|
-
export
|
|
32
|
-
name
|
|
31
|
+
export interface ProSearchMap<ValueType = 'text', ParamsKey = string> {
|
|
32
|
+
name: ParamsKey;
|
|
33
33
|
/** 选择如何渲染相应的模式 */
|
|
34
34
|
valueType?: ProSchemaValueType<ValueType>;
|
|
35
35
|
/** valueType为date|dateMonth|dateRange|time生效 */
|
|
@@ -55,7 +55,15 @@ export type ProSearchMap<ValueType = 'text'> = {
|
|
|
55
55
|
initialValue?: any;
|
|
56
56
|
/** 针对select、treeselect取值的key */
|
|
57
57
|
valueKey?: string;
|
|
58
|
-
/**
|
|
58
|
+
/** 远程查询数据 */
|
|
59
|
+
request?: Fn;
|
|
60
|
+
/** 查询表单label */
|
|
61
|
+
label?: string;
|
|
62
|
+
/** 查询表单label - 宽度 */
|
|
63
|
+
labelWidth?: string | number;
|
|
64
|
+
/** 查询表单label - 对齐方式 */
|
|
65
|
+
labelAlign?: 'center' | 'left' | 'right';
|
|
66
|
+
/** 表单的属性值(ant-design) */
|
|
59
67
|
field?: RecordType;
|
|
60
68
|
/**
|
|
61
69
|
* 支持 object 和Map,Map 是支持其他基础类型作为 key
|
|
@@ -63,26 +71,36 @@ export type ProSearchMap<ValueType = 'text'> = {
|
|
|
63
71
|
* @name 映射值的类型
|
|
64
72
|
*/
|
|
65
73
|
valueEnum?: ProSchemaValueEnumType[];
|
|
66
|
-
}
|
|
67
|
-
export type ProColumnType<RecordType =
|
|
68
|
-
children?: ProColumnsType<
|
|
74
|
+
}
|
|
75
|
+
export type ProColumnType<DataValue = RecordType, SearchParama = RecordType> = ProColumn<Omit<ColumnType<DataValue>, 'key' | 'dataIndex' | 'width'> & {
|
|
76
|
+
children?: ProColumnsType<DataValue, SearchParama>;
|
|
69
77
|
uuid?: string | number;
|
|
78
|
+
index?: number;
|
|
79
|
+
copyText?: string | ((record: ProColumnType) => string);
|
|
80
|
+
tooltip?: false | (TooltipProps & {
|
|
81
|
+
width?: number;
|
|
82
|
+
targetStyle?: Partial<CSSProperties>;
|
|
83
|
+
hiddenLine?: number;
|
|
84
|
+
class?: string;
|
|
85
|
+
});
|
|
70
86
|
/** 不在列表中显示 */
|
|
71
87
|
show?: boolean;
|
|
88
|
+
key?: keyof DataValue | string | 'action';
|
|
89
|
+
dataIndex?: keyof DataValue | string | 'action';
|
|
72
90
|
/** 列表顺序值 */
|
|
73
91
|
order?: number;
|
|
74
92
|
/** 不在配置工具中显示 */
|
|
75
93
|
hideInSetting?: boolean;
|
|
76
94
|
/** 表单搜索配置 */
|
|
77
|
-
searchConfig?: ProSearchMap
|
|
95
|
+
searchConfig?: ProSearchMap<undefined, keyof DataValue | keyof SearchParama>;
|
|
78
96
|
/** 是否拷贝 */
|
|
79
97
|
copyable?: boolean;
|
|
80
98
|
/** 值为空时,默认取值 */
|
|
81
99
|
columnEmptyText?: string;
|
|
82
100
|
valueType?: ProColumnsValueType;
|
|
83
|
-
}
|
|
84
|
-
export type ProColumnsType<RecordType =
|
|
85
|
-
export type ProColumnsValueType = 'text' | 'link' | 'time' | 'dateMonth' | 'dateTime' | {
|
|
101
|
+
}>;
|
|
102
|
+
export type ProColumnsType<DataValue = RecordType, SearchParama = RecordType> = ProColumnType<DataValue, SearchParama>[];
|
|
103
|
+
export type ProColumnsValueType = 'text' | 'link' | 'time' | 'dateMonth' | 'dateTime' | 'date' | {
|
|
86
104
|
node?: string;
|
|
87
105
|
class?: string;
|
|
88
106
|
attr?: string;
|
|
@@ -1,12 +1,45 @@
|
|
|
1
|
-
import type { CustomRender, WithFalse } from '@gx-design-vue/pro-utils';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import type { CustomRender, RecordType, WithFalse } from '@gx-design-vue/pro-utils';
|
|
2
|
+
import type { ColumnType, RenderExpandIconProps } from '../_utils';
|
|
3
|
+
import type { ProColumnType } from '../types/ColumnTypings';
|
|
4
|
+
export interface ProTableBodyCellProps<T = RecordType> {
|
|
5
|
+
text: any;
|
|
6
|
+
value: any;
|
|
7
|
+
record: T;
|
|
8
|
+
index: number;
|
|
9
|
+
column: ProColumnType<T>;
|
|
10
|
+
}
|
|
11
|
+
export interface AntTabelSlotsType {
|
|
12
|
+
emptyText?: any;
|
|
13
|
+
expandIcon?: RenderExpandIconProps<any>;
|
|
14
|
+
title?: any;
|
|
15
|
+
footer?: any;
|
|
16
|
+
summary?: any;
|
|
17
|
+
expandedRowRender?: any;
|
|
18
|
+
expandColumnTitle?: any;
|
|
19
|
+
bodyCell?: (props: ProTableBodyCellProps<any>) => void;
|
|
20
|
+
headerCell?: (props: {
|
|
21
|
+
title: any;
|
|
22
|
+
column: ColumnType;
|
|
23
|
+
}) => void;
|
|
24
|
+
customFilterIcon?: any;
|
|
25
|
+
customFilterDropdown?: any;
|
|
26
|
+
default: any;
|
|
27
|
+
}
|
|
28
|
+
export type ProTableSlotsKey = 'search' | 'headerTitle' | 'toolBarBtn' | 'titleTip' | 'settingExtra' | 'optionsExtra' | 'pageItemRender' | 'customRender';
|
|
29
|
+
export declare const proTableSlotsKey: ProTableSlotsKey[];
|
|
30
|
+
export type Slots = Readonly<Omit<Record<ProTableSlotsKey, () => void>, 'customRender'> & {
|
|
31
|
+
customRender: (params: CustomRenderResult) => void;
|
|
32
|
+
}>;
|
|
33
|
+
export interface CustomRenderResult<T = RecordType> {
|
|
34
|
+
currentData: T[];
|
|
35
|
+
dataSource: T[];
|
|
36
|
+
}
|
|
37
|
+
export type PageItemFn = (opt: {
|
|
8
38
|
page: number;
|
|
9
39
|
type: 'page' | 'prev' | 'next' | 'jump-prev' | 'jump-next';
|
|
10
40
|
originalElement: any;
|
|
11
|
-
}) => CustomRender
|
|
12
|
-
export type
|
|
41
|
+
}) => CustomRender;
|
|
42
|
+
export type CustomDataFn<T = RecordType> = (params: CustomRenderResult<T>) => CustomRender;
|
|
43
|
+
export type DefaultRender = WithFalse<CustomRender>;
|
|
44
|
+
export type PageItemRender = WithFalse<PageItemFn>;
|
|
45
|
+
export type CustomDataRender<T = RecordType> = WithFalse<CustomDataFn<T>>;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type { DefaultRecordType } from '../typing';
|
|
5
|
-
import type { HeaderTitleRender, ToolBarBtnRender, CustomizeRender, TitleTipRender, OptionsExtraRender, SettingExtraRender, PageItemRender } from './SlotsTypings';
|
|
6
|
-
import type { TableRowSelection, TablePaginationConfig, SpinProps, TableFilters, TableSorter, TableProps } from '../_utils';
|
|
1
|
+
import type { Breakpoint, CustomRender, RecordType, SizeType, VueNode, WithFalse } from '@gx-design-vue/pro-utils';
|
|
2
|
+
import type { ComputedRef, CSSProperties, Ref } from 'vue';
|
|
3
|
+
import type { FilterValue, SelectionSelectFn, SorterResult, TableCurrentDataSource, TablePaginationConfig, TableProps, TableRowSelection } from '../_utils';
|
|
7
4
|
import type { ColumnSettingProps } from '../components/ColumnSetting';
|
|
8
5
|
import type { ColumnsState, ColumnsStateType } from '../hooks/useColumnSetting';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
import type { ProColumnsType, ProColumnType, ProSearchMap } from './ColumnTypings';
|
|
7
|
+
import type { CustomDataRender, DefaultRender, PageItemRender } from './SlotsTypings';
|
|
8
|
+
export interface ProTabelFeachParams<R = RecordType> {
|
|
9
|
+
params?: R;
|
|
10
|
+
filters?: Record<string, FilterValue | null>;
|
|
11
|
+
sorter?: SorterResult | SorterResult[];
|
|
13
12
|
pagination?: ProTablePagination;
|
|
14
13
|
removeKeys?: (string | number)[];
|
|
15
14
|
immediate?: boolean;
|
|
16
15
|
isPolling?: boolean;
|
|
17
|
-
|
|
16
|
+
showLoading?: boolean;
|
|
17
|
+
extra?: TableCurrentDataSource;
|
|
18
|
+
}
|
|
18
19
|
export type TablePaginationPosition = 'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight';
|
|
19
20
|
export type ProFieldEmptyText = string | false;
|
|
20
21
|
export type ProTableRowSelection<T = any> = Omit<TableRowSelection<T>, 'selectedRowKeys'> & {
|
|
@@ -25,31 +26,46 @@ export interface ProTablePaginationConfig extends Omit<TablePaginationConfig, 'p
|
|
|
25
26
|
position?: TablePaginationPosition[];
|
|
26
27
|
}
|
|
27
28
|
export type ProTablePagination = ProTablePaginationConfig | false;
|
|
28
|
-
export
|
|
29
|
+
export interface PageState {
|
|
30
|
+
pageSize: number;
|
|
31
|
+
pageNum: number;
|
|
32
|
+
}
|
|
33
|
+
export interface RequestData<T = any> {
|
|
29
34
|
data: T[] | undefined;
|
|
30
35
|
success: boolean;
|
|
31
36
|
total: number;
|
|
32
|
-
}
|
|
33
|
-
export
|
|
34
|
-
params: {
|
|
35
|
-
pageSize
|
|
36
|
-
pageNum
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
filter:
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
}
|
|
38
|
+
export interface RequsetConfig<T> {
|
|
39
|
+
params: T extends undefined ? PageState : {
|
|
40
|
+
pageSize: number;
|
|
41
|
+
pageNum: number;
|
|
42
|
+
} & Partial<T>;
|
|
43
|
+
sorter: SorterResult | SorterResult[];
|
|
44
|
+
filter: Record<string, FilterValue | null>;
|
|
45
|
+
extra: TableCurrentDataSource;
|
|
46
|
+
}
|
|
47
|
+
export type RequsetFunction<T = any, D = undefined> = (params: RequsetConfig<D>['params'], sort: RequsetConfig<D>['sorter'], filter: RequsetConfig<D>['filter']) => Promise<Partial<RequestData<T>> | undefined>;
|
|
42
48
|
export type ColConfig = Partial<Record<Breakpoint, number>>;
|
|
43
|
-
export
|
|
44
|
-
searchText?: string;
|
|
45
|
-
resetText?: string;
|
|
49
|
+
export interface SearchConfig {
|
|
46
50
|
className?: string;
|
|
51
|
+
actions?: {
|
|
52
|
+
reload?: boolean;
|
|
53
|
+
reset?: boolean;
|
|
54
|
+
searchText?: string;
|
|
55
|
+
resetText?: string;
|
|
56
|
+
};
|
|
47
57
|
defaultCollapsed?: boolean;
|
|
48
|
-
|
|
49
|
-
|
|
58
|
+
type?: 'auto' | 'button';
|
|
59
|
+
reetButton?: boolean;
|
|
50
60
|
collapseRender?: WithFalse<(collapsed?: boolean) => CustomRender>;
|
|
51
61
|
span?: ColConfig;
|
|
52
|
-
|
|
62
|
+
label?: {
|
|
63
|
+
gap?: number;
|
|
64
|
+
colon?: boolean;
|
|
65
|
+
width?: number;
|
|
66
|
+
align?: 'center' | 'left' | 'right';
|
|
67
|
+
};
|
|
68
|
+
}
|
|
53
69
|
export interface OptionConfig {
|
|
54
70
|
reload?: (() => VueNode | JSX.Element) | boolean;
|
|
55
71
|
density?: boolean;
|
|
@@ -57,80 +73,113 @@ export interface OptionConfig {
|
|
|
57
73
|
fullScreen?: (() => VueNode | JSX.Element) | boolean | (() => Promise<void>);
|
|
58
74
|
}
|
|
59
75
|
/** action表格实例 */
|
|
60
|
-
export interface ProCoreActionType {
|
|
61
|
-
|
|
62
|
-
|
|
76
|
+
export interface ProCoreActionType<T = RecordType, R = RecordType> {
|
|
77
|
+
/** @name loadingStatus */
|
|
78
|
+
loading: Ref<boolean>;
|
|
79
|
+
dataSource: ComputedRef<T[]>;
|
|
80
|
+
getLoadingStatus: () => boolean;
|
|
81
|
+
pagination: R | boolean;
|
|
82
|
+
pageState: PageState;
|
|
83
|
+
selectedKeys: ComputedRef<(string | number)[]>;
|
|
84
|
+
selectedItems: ComputedRef<T[]>;
|
|
85
|
+
rowsSelection?: {
|
|
86
|
+
clear: () => void;
|
|
87
|
+
sync: (data: T[]) => void;
|
|
88
|
+
remove: (keys: (string | number)[]) => void;
|
|
89
|
+
select: SelectionSelectFn<T>;
|
|
90
|
+
selectAll: TableRowSelection<T>['onSelectAll'];
|
|
91
|
+
};
|
|
63
92
|
/** @name 刷新 */
|
|
64
|
-
reload
|
|
93
|
+
reload: (info?: ProTabelFeachParams<R>) => void;
|
|
65
94
|
/** @name 刷新并清空表单,重置为第一页 */
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
95
|
+
reloadAndReset: (options?: {
|
|
96
|
+
callBack?: () => void;
|
|
97
|
+
wait?: boolean;
|
|
98
|
+
}) => void;
|
|
99
|
+
/** @name 设置翻页 */
|
|
100
|
+
setPagination: (pagination: ProTablePaginationConfig) => void;
|
|
101
|
+
/** @name 设置翻页、排序、筛选、并且reload */
|
|
102
|
+
setPageAndReload: (pagination: ProTablePaginationConfig, filters?: Record<string, FilterValue | null>, sorter?: SorterResult | SorterResult[], extra?: TableCurrentDataSource) => void;
|
|
69
103
|
/** @name 更新TableData属性值 */
|
|
70
|
-
reSetDataList
|
|
104
|
+
reSetDataList: (data: T[]) => void;
|
|
71
105
|
/** @name 更新TableData属性值 */
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
106
|
+
setDataValue: ({ key, type, params, value }: {
|
|
107
|
+
params: Partial<T>;
|
|
108
|
+
key?: keyof T;
|
|
109
|
+
value?: any;
|
|
110
|
+
type?: 'update' | 'push' | 'delete' | 'unshift';
|
|
75
111
|
}) => void;
|
|
76
112
|
/** @name 改变loading状态 */
|
|
77
|
-
|
|
113
|
+
setLoading: (loading: boolean) => void;
|
|
78
114
|
}
|
|
79
115
|
/** form查询表单实例 */
|
|
80
|
-
export interface ProCoreFormType {
|
|
116
|
+
export interface ProCoreFormType<R = RecordType> {
|
|
81
117
|
/** @name 获取表格-表单请求参数 */
|
|
82
|
-
|
|
118
|
+
getFormState?: () => R;
|
|
83
119
|
/** @name 获取表格-内部表单参数 */
|
|
84
|
-
|
|
120
|
+
getFormInnerState?: () => R;
|
|
85
121
|
/** @name 重置内部表单组件参数 */
|
|
86
|
-
|
|
122
|
+
restFormState?: (callBack?: () => void) => void;
|
|
87
123
|
}
|
|
88
|
-
export interface ProTableRef {
|
|
89
|
-
formRef: () => ProCoreFormType
|
|
90
|
-
actionRef: () => ProCoreActionType
|
|
124
|
+
export interface ProTableRef<T = RecordType, R = RecordType> {
|
|
125
|
+
formRef: () => ProCoreFormType<R>;
|
|
126
|
+
actionRef: () => ProCoreActionType<T, R>;
|
|
91
127
|
}
|
|
92
|
-
export type ProTableProps<RecordType extends
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
128
|
+
export type ProTableProps<DataRecord extends object = RecordType, ParamsType extends object = RecordType> = Omit<TableProps, 'columns' | 'dataSource'> & Partial<{
|
|
129
|
+
dataSource: DataRecord[];
|
|
130
|
+
tableProps: {
|
|
131
|
+
class?: string;
|
|
132
|
+
style?: CSSProperties;
|
|
133
|
+
};
|
|
134
|
+
rowKey: keyof DataRecord;
|
|
96
135
|
titleTipText: string;
|
|
97
136
|
autoScroll: boolean;
|
|
137
|
+
showSearch: boolean;
|
|
138
|
+
keepAliveReload: boolean;
|
|
139
|
+
emptyTextProps: {
|
|
140
|
+
class?: string;
|
|
141
|
+
style?: CSSProperties;
|
|
142
|
+
extraProps?: RecordType;
|
|
143
|
+
};
|
|
98
144
|
columnEmptyText: ProFieldEmptyText;
|
|
145
|
+
showLoading: boolean;
|
|
99
146
|
neverScroll: boolean;
|
|
100
147
|
modalScroll: boolean;
|
|
101
148
|
scrollBreakpoint: Breakpoint | number;
|
|
102
149
|
draggabled: boolean;
|
|
103
150
|
bordered: boolean;
|
|
104
151
|
showIndex: boolean;
|
|
152
|
+
cardBordered: boolean;
|
|
105
153
|
virtualScroll: boolean;
|
|
106
154
|
size: SizeType;
|
|
107
155
|
align: ProColumnType['align'];
|
|
108
156
|
options: OptionConfig | boolean;
|
|
109
157
|
rowSelection: ProTableRowSelection;
|
|
110
|
-
columns: ProColumnsType<
|
|
158
|
+
columns: ProColumnsType<DataRecord, ParamsType>;
|
|
111
159
|
columnsState: ColumnsStateType;
|
|
112
160
|
waitRequest: boolean;
|
|
113
161
|
polling: number;
|
|
114
162
|
debounceTime: number;
|
|
115
|
-
request: RequsetFunction<
|
|
116
|
-
params:
|
|
117
|
-
postData: (data:
|
|
163
|
+
request: RequsetFunction<DataRecord, ParamsType>;
|
|
164
|
+
params: ParamsType;
|
|
165
|
+
postData: (data: DataRecord[]) => DataRecord[];
|
|
118
166
|
pagination: ProTablePagination;
|
|
119
|
-
search: SearchConfig;
|
|
120
|
-
searchMap: ProSearchMap[];
|
|
121
|
-
onReset: (params?: Partial<
|
|
122
|
-
onReload: (params?: Partial<
|
|
123
|
-
onSubmit: (params?: Partial<
|
|
167
|
+
search: SearchConfig | false;
|
|
168
|
+
searchMap: ProSearchMap<undefined, keyof ParamsType | keyof DataRecord>[];
|
|
169
|
+
onReset: (params?: Partial<ParamsType>) => void;
|
|
170
|
+
onReload: (params?: Partial<ParamsType>) => void;
|
|
171
|
+
onSubmit: (params?: Partial<ParamsType>) => void;
|
|
124
172
|
onSizeChange: (size: string) => any;
|
|
125
173
|
onLoadingChange: (loading: boolean) => any;
|
|
126
174
|
onRequestError: (e: Error) => void;
|
|
127
|
-
onBeforeSearchSubmit: RequsetFunction<
|
|
175
|
+
onBeforeSearchSubmit: RequsetFunction<DataRecord, ParamsType>;
|
|
128
176
|
onColumnsStateChange: (data: ColumnsState[]) => void;
|
|
129
|
-
titleTip:
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
177
|
+
titleTip: DefaultRender;
|
|
178
|
+
emptyText: DefaultRender;
|
|
179
|
+
headerTitle: DefaultRender;
|
|
180
|
+
toolBarBtn: DefaultRender;
|
|
181
|
+
customRender: CustomDataRender;
|
|
182
|
+
optionsExtra: DefaultRender;
|
|
183
|
+
settingExtra: DefaultRender;
|
|
135
184
|
pageItemRender: PageItemRender;
|
|
136
185
|
}>;
|
package/dist/utils/utils.d.ts
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import type { ProColumnsValueType } from '../types/ColumnTypings';
|
|
2
|
-
|
|
2
|
+
import type { ProTablePagination } from '../types/TableTypings';
|
|
3
|
+
export declare function valueFormat(value: any, format: ProColumnsValueType | undefined, className: string, hashId: string): any;
|
|
4
|
+
export declare function getCuurentData(data: any[], pageInfo: ProTablePagination): any[];
|
|
5
|
+
export declare function handleCopy(codeStr: string): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gx-design-vue/pro-table",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.101",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite",
|
|
6
6
|
"build": "vite build",
|
|
@@ -14,58 +14,35 @@
|
|
|
14
14
|
"dist",
|
|
15
15
|
"volar.d.ts"
|
|
16
16
|
],
|
|
17
|
+
"type": "module",
|
|
17
18
|
"types": "./dist",
|
|
18
|
-
"main": "./dist/pro-table.umd.
|
|
19
|
-
"module": "./dist/pro-table.
|
|
19
|
+
"main": "./dist/pro-table.umd.cjs",
|
|
20
|
+
"module": "./dist/pro-table.js",
|
|
20
21
|
"exports": {
|
|
21
22
|
".": {
|
|
22
|
-
"import": "./dist/pro-table.
|
|
23
|
-
"require": "./dist/pro-table.umd.
|
|
23
|
+
"import": "./dist/pro-table.js",
|
|
24
|
+
"require": "./dist/pro-table.umd.cjs"
|
|
24
25
|
}
|
|
25
26
|
},
|
|
26
27
|
"dependencies": {
|
|
27
28
|
"@vueuse/core": "^9.10.0",
|
|
28
|
-
"@gx-design-vue/pro-
|
|
29
|
-
"@gx-design-vue/pro-
|
|
30
|
-
"@gx-design-vue/pro-
|
|
31
|
-
"@gx-design-vue/pro-
|
|
32
|
-
"ant-design-vue": "^4.0.0",
|
|
29
|
+
"@gx-design-vue/pro-utils": "^0.2.0-beta.60",
|
|
30
|
+
"@gx-design-vue/pro-hooks": "^0.2.0-beta.42",
|
|
31
|
+
"@gx-design-vue/pro-provider": "^0.1.0-beta.99",
|
|
32
|
+
"@gx-design-vue/pro-app": "^0.1.0-beta.23",
|
|
33
33
|
"dayjs": "^1.11.0",
|
|
34
|
-
"lodash-es": "^4.17.21"
|
|
35
|
-
"vue": "^3.2.45",
|
|
36
|
-
"vue-types": "^4.1.1"
|
|
34
|
+
"lodash-es": "^4.17.21"
|
|
37
35
|
},
|
|
38
36
|
"devDependencies": {
|
|
39
|
-
"@rollup/plugin-typescript": "^8.3.0",
|
|
40
|
-
"@rushstack/eslint-patch": "^1.1.0",
|
|
41
37
|
"@types/lodash-es": "^4.17.6",
|
|
42
|
-
"
|
|
43
|
-
"@types/node": "^16.11.26",
|
|
44
|
-
"@vitejs/plugin-vue": "^4.2.3",
|
|
45
|
-
"@vitejs/plugin-vue-jsx": "^3.0.1",
|
|
46
|
-
"@vue/eslint-config-prettier": "^7.0.0",
|
|
47
|
-
"@vue/eslint-config-typescript": "^10.0.0",
|
|
48
|
-
"@vue/tsconfig": "^0.1.3",
|
|
49
|
-
"eslint": "^8.13.0",
|
|
50
|
-
"eslint-plugin-prettier": "^4.0.0",
|
|
51
|
-
"eslint-plugin-vue": "^8.6.0",
|
|
52
|
-
"jsdom": "^19.0.0",
|
|
53
|
-
"less": "^4.1.2",
|
|
54
|
-
"postcss": "^8.4.12",
|
|
55
|
-
"postcss-html": "^1.4.1",
|
|
56
|
-
"postcss-less": "^6.0.0",
|
|
57
|
-
"prettier": "^2.6.2",
|
|
58
|
-
"rollup": "^2.70.2",
|
|
59
|
-
"stylelint": "^14.7.1",
|
|
60
|
-
"stylelint-config-prettier": "^9.0.3",
|
|
61
|
-
"stylelint-config-recommended": "^7.0.0",
|
|
62
|
-
"stylelint-config-recommended-vue": "^1.4.0",
|
|
63
|
-
"stylelint-config-standard": "^25.0.0",
|
|
64
|
-
"stylelint-order": "^5.0.0",
|
|
65
|
-
"typescript": "^4.6.4",
|
|
66
|
-
"vite": "^4.3.8",
|
|
67
|
-
"vue-eslint-parser": "^9.0.3",
|
|
68
|
-
"vue-tsc": "^1.0.24"
|
|
38
|
+
"typescript": "^5.3.3"
|
|
69
39
|
},
|
|
70
|
-
"
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"vue": ">=3.0.0",
|
|
42
|
+
"ant-design-vue": "^4.1.2"
|
|
43
|
+
},
|
|
44
|
+
"description": "Gx Design Pro Table",
|
|
45
|
+
"authors": [
|
|
46
|
+
"gx12358 <gx12358@gmail.com> (https://github.com/gx12358)"
|
|
47
|
+
]
|
|
71
48
|
}
|
package/volar.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Auto generated component declarations
|
|
2
|
-
declare module
|
|
2
|
+
declare module 'vue' {
|
|
3
3
|
export interface GlobalComponents {
|
|
4
|
-
GProTable: typeof import(
|
|
4
|
+
GProTable: typeof import('@gx-design-vue/pro-table')['GProTable'];
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
export {}
|
|
8
|
+
export {}
|