@gx-design-vue/pro-table 0.1.0 → 0.1.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/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.mjs +6122 -5347
- package/dist/pro-table.umd.js +13 -13
- package/dist/style.css +1 -1
- 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
|
@@ -9,7 +9,7 @@ import type { ColumnType } from '../_utils';
|
|
|
9
9
|
* @param time: 时间 HH:mm:ss
|
|
10
10
|
* @param select 下拉选择器
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
12
|
+
export type ProFieldValueType = 'text' | 'date' | 'select' | 'treeSelect' | 'dateMonth' | 'dateRange' | 'time';
|
|
13
13
|
/**
|
|
14
14
|
* @param text 文本框
|
|
15
15
|
* @param date 日期 YYYY-MM-DD
|
|
@@ -18,8 +18,8 @@ export declare type ProFieldValueType = 'text' | 'date' | 'select' | 'treeSelect
|
|
|
18
18
|
* @param time: 时间 HH:mm:ss
|
|
19
19
|
* @param select 下拉选择器
|
|
20
20
|
*/
|
|
21
|
-
export
|
|
22
|
-
export
|
|
21
|
+
export type ProFieldValueFormat = 'YYYY-MM-DD' | 'YYYY-MM' | 'YYYY-MM-DD HH:mm:ss' | 'HH:mm:ss';
|
|
22
|
+
export type ProSchemaValueEnumType = {
|
|
23
23
|
/** @name 演示的文案 */
|
|
24
24
|
text: VueNode | JSX.Element;
|
|
25
25
|
/** @name 演示的value值 */
|
|
@@ -27,8 +27,8 @@ export declare type ProSchemaValueEnumType = {
|
|
|
27
27
|
/** @name 是否禁用 */
|
|
28
28
|
disabled?: boolean;
|
|
29
29
|
};
|
|
30
|
-
|
|
31
|
-
export
|
|
30
|
+
type ProSchemaValueType<ValueType> = (ValueType | ProFieldValueType);
|
|
31
|
+
export type ProSearchMap<ValueType = 'text'> = {
|
|
32
32
|
name?: string;
|
|
33
33
|
/** 选择如何渲染相应的模式 */
|
|
34
34
|
valueType?: ProSchemaValueType<ValueType>;
|
|
@@ -64,7 +64,7 @@ export declare type ProSearchMap<ValueType = 'text'> = {
|
|
|
64
64
|
*/
|
|
65
65
|
valueEnum?: ProSchemaValueEnumType[];
|
|
66
66
|
};
|
|
67
|
-
export
|
|
67
|
+
export type ProColumnType<RecordType = DefaultRecordType> = ColumnType<RecordType> & {
|
|
68
68
|
children?: ProColumnsType<RecordType>;
|
|
69
69
|
uuid?: string | number;
|
|
70
70
|
/** 不在列表中显示 */
|
|
@@ -81,8 +81,8 @@ export declare type ProColumnType<RecordType = DefaultRecordType> = ColumnType<R
|
|
|
81
81
|
columnEmptyText?: string;
|
|
82
82
|
valueType?: ProColumnsValueType;
|
|
83
83
|
};
|
|
84
|
-
export
|
|
85
|
-
export
|
|
84
|
+
export type ProColumnsType<RecordType = DefaultRecordType> = (ProColumnType<RecordType>)[];
|
|
85
|
+
export type ProColumnsValueType = 'text' | 'link' | 'time' | 'dateMonth' | 'dateTime' | {
|
|
86
86
|
node?: string;
|
|
87
87
|
class?: string;
|
|
88
88
|
attr?: string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { CustomRender, WithFalse } from '@gx-design-vue/pro-utils';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
2
|
+
export type HeaderTitleRender = WithFalse<CustomRender>;
|
|
3
|
+
export type TitleTipRender = WithFalse<CustomRender>;
|
|
4
|
+
export type ToolBarBtnRender = WithFalse<CustomRender>;
|
|
5
|
+
export type OptionsExtraRender = WithFalse<CustomRender>;
|
|
6
|
+
export type SettingExtraRender = WithFalse<CustomRender>;
|
|
7
|
+
export type PageItemRender = WithFalse<(opt: {
|
|
8
8
|
page: number;
|
|
9
9
|
type: 'page' | 'prev' | 'next' | 'jump-prev' | 'jump-next';
|
|
10
10
|
originalElement: any;
|
|
11
11
|
}) => CustomRender>;
|
|
12
|
-
export
|
|
12
|
+
export type CustomizeRender = WithFalse<(dataSource: any[]) => CustomRender>;
|
|
@@ -6,7 +6,7 @@ import type { HeaderTitleRender, ToolBarBtnRender, CustomizeRender, TitleTipRend
|
|
|
6
6
|
import type { TableRowSelection, TablePaginationConfig, SpinProps, TableFilters, TableSorter, TableProps } from '../_utils';
|
|
7
7
|
import type { ColumnSettingProps } from '../components/ColumnSetting';
|
|
8
8
|
import type { ColumnsState, ColumnsStateType } from '../hooks/useColumnSetting';
|
|
9
|
-
export
|
|
9
|
+
export type ProTabelFeachParams = {
|
|
10
10
|
params?: any;
|
|
11
11
|
filters?: TableFilters;
|
|
12
12
|
sorter?: TableSorter;
|
|
@@ -15,9 +15,9 @@ export declare type ProTabelFeachParams = {
|
|
|
15
15
|
immediate?: boolean;
|
|
16
16
|
isPolling?: boolean;
|
|
17
17
|
};
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
18
|
+
export type TablePaginationPosition = 'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight';
|
|
19
|
+
export type ProFieldEmptyText = string | false;
|
|
20
|
+
export type ProTableRowSelection<T = any> = TableRowSelection<T> & {
|
|
21
21
|
defaultSelectKeys: (string | number)[];
|
|
22
22
|
defaultSelectRows: T[];
|
|
23
23
|
};
|
|
@@ -25,13 +25,13 @@ export interface ProTablePaginationConfig extends Omit<TablePaginationConfig, 'p
|
|
|
25
25
|
total?: number;
|
|
26
26
|
position?: TablePaginationPosition[];
|
|
27
27
|
}
|
|
28
|
-
export
|
|
29
|
-
export
|
|
28
|
+
export type ProTablePagination = ProTablePaginationConfig | false;
|
|
29
|
+
export type RequestData<T = any> = {
|
|
30
30
|
data: T[] | undefined;
|
|
31
31
|
success: boolean;
|
|
32
32
|
total: number;
|
|
33
33
|
} & RecordType;
|
|
34
|
-
export
|
|
34
|
+
export type RequsetConfig = {
|
|
35
35
|
params: {
|
|
36
36
|
pageSize?: number;
|
|
37
37
|
pageNum?: number;
|
|
@@ -39,9 +39,9 @@ export declare type RequsetConfig = {
|
|
|
39
39
|
sort: TableSorter;
|
|
40
40
|
filter: TableFilters;
|
|
41
41
|
};
|
|
42
|
-
export
|
|
43
|
-
export
|
|
44
|
-
export
|
|
42
|
+
export type RequsetFunction<T = any> = (params: RequsetConfig['params'], sort: RequsetConfig['sort'], filter: RequsetConfig['filter']) => Promise<Partial<RequestData<T>>>;
|
|
43
|
+
export type ColConfig = Partial<Record<Breakpoint, number>>;
|
|
44
|
+
export type SearchConfig = {
|
|
45
45
|
searchText?: string;
|
|
46
46
|
resetText?: string;
|
|
47
47
|
className?: string;
|
|
@@ -90,7 +90,7 @@ export interface ProTableRef {
|
|
|
90
90
|
formRef: () => ProCoreFormType;
|
|
91
91
|
actionRef: () => ProCoreActionType;
|
|
92
92
|
}
|
|
93
|
-
export
|
|
93
|
+
export type ProTableProps<RecordType extends DefaultRecordType = DefaultRecordType> = Omit<TableProps<RecordType>, 'columns'> & Partial<{
|
|
94
94
|
tableClassName: string;
|
|
95
95
|
tableStyle: CSSProperties;
|
|
96
96
|
rowKey: string;
|