@gx-design-vue/pro-table 0.0.2-rc.9 → 0.0.3
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 +34 -31
- package/dist/components/ColumnSetting/style.less +1 -3
- package/dist/components/Form/style.less +1 -8
- package/dist/components/ListToolBar/style.less +1 -0
- package/dist/components/ToolBar/style.less +5 -6
- package/dist/design/ant-design-theme.less +4 -0
- package/dist/design/ant-design-vue.less +19 -0
- package/dist/design/config.less +0 -5
- package/dist/hooks/useFetchData.d.ts +2 -1
- package/dist/hooks/useRowSelection.d.ts +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/pro-table.less +5 -0
- package/dist/pro-table.mjs +1107 -1048
- package/dist/pro-table.umd.js +1 -1
- package/dist/props.d.ts +31 -19
- package/dist/style/index.less +18 -0
- package/dist/style/table.less +0 -18
- package/dist/style.css +1 -1
- package/dist/style.less +3 -5
- package/dist/types/column.d.ts +9 -2
- package/dist/types/table.d.ts +21 -11
- package/dist/utils/utils.d.ts +2 -0
- package/package.json +2 -2
package/dist/ProTable.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
24
24
|
default: undefined;
|
|
25
25
|
};
|
|
26
26
|
request: {
|
|
27
|
-
type: import("vue").PropType<import("./types/table").
|
|
27
|
+
type: import("vue").PropType<import("./types/table").RequsetFunction<any>>;
|
|
28
28
|
default: null;
|
|
29
29
|
};
|
|
30
30
|
virtualScroll: import("vue").PropType<boolean>;
|
|
@@ -52,6 +52,7 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
52
52
|
default: () => undefined;
|
|
53
53
|
};
|
|
54
54
|
actionRef: import("vue").PropType<import("./types/table").ProCoreActionType>;
|
|
55
|
+
formRef: import("vue").PropType<import("./types/table").ProCoreFormType>;
|
|
55
56
|
tableClassName: import("vue").PropType<String>;
|
|
56
57
|
tableStyle: {
|
|
57
58
|
type: import("vue").PropType<import("vue").CSSProperties>;
|
|
@@ -102,7 +103,12 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
102
103
|
size: {
|
|
103
104
|
type: import("vue").PropType<import("./typing").SizeType>;
|
|
104
105
|
default: string;
|
|
105
|
-
};
|
|
106
|
+
}; /**
|
|
107
|
+
* @Author gx12358
|
|
108
|
+
* @DateTime 2022/1/21
|
|
109
|
+
* @lastTime 2022/1/21
|
|
110
|
+
* @description Tabel-Form(搜索) hooks 方法
|
|
111
|
+
*/
|
|
106
112
|
align: {
|
|
107
113
|
type: import("vue").PropType<import("ant-design-vue/es/vc-table/interface").AlignType>;
|
|
108
114
|
default: string;
|
|
@@ -129,7 +135,7 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
129
135
|
onSizeChange: import("vue").PropType<(size: string) => any>;
|
|
130
136
|
onLadingChange: import("vue").PropType<(loading: boolean) => any>;
|
|
131
137
|
onRequestError: import("vue").PropType<(e: Error) => void>;
|
|
132
|
-
onBeforeSearchSubmit: import("vue").PropType<import("./types/table").
|
|
138
|
+
onBeforeSearchSubmit: import("vue").PropType<import("./types/table").RequsetFunction<RecordType>>;
|
|
133
139
|
onColumnsStateChange: import("vue").PropType<(data: import("./hooks/useColumnSetting").ColumnsState[]) => void>;
|
|
134
140
|
prefixCls: {
|
|
135
141
|
type: import("vue").PropType<string>;
|
|
@@ -224,12 +230,7 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
224
230
|
default: undefined;
|
|
225
231
|
};
|
|
226
232
|
expandIconColumnIndex: {
|
|
227
|
-
type: import("vue").PropType<number | undefined>;
|
|
228
|
-
* @Author gx12358
|
|
229
|
-
* @DateTime 2022/1/21
|
|
230
|
-
* @lastTime 2022/1/21
|
|
231
|
-
* @description Tabel-loading hooks 方法
|
|
232
|
-
*/
|
|
233
|
+
type: import("vue").PropType<number | undefined>;
|
|
233
234
|
default: undefined;
|
|
234
235
|
};
|
|
235
236
|
showExpandColumn: {
|
|
@@ -249,16 +250,17 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
249
250
|
default: undefined;
|
|
250
251
|
};
|
|
251
252
|
sticky: {
|
|
252
|
-
type: import("vue").PropType<boolean | import("ant-design-vue/lib/vc-table/interface").TableSticky | undefined>;
|
|
253
|
+
type: import("vue").PropType<boolean | import("ant-design-vue/lib/vc-table/interface").TableSticky | undefined>;
|
|
254
|
+
default: undefined;
|
|
255
|
+
};
|
|
256
|
+
dropdownPrefixCls: StringConstructor;
|
|
257
|
+
dataSource: {
|
|
258
|
+
/**
|
|
253
259
|
* @Author gx12358
|
|
254
260
|
* @DateTime 2022/1/21
|
|
255
261
|
* @lastTime 2022/1/21
|
|
256
262
|
* @description Tabel-pagetion hooks 方法
|
|
257
263
|
*/
|
|
258
|
-
default: undefined;
|
|
259
|
-
};
|
|
260
|
-
dropdownPrefixCls: StringConstructor;
|
|
261
|
-
dataSource: {
|
|
262
264
|
type: import("vue").PropType<any[] | undefined>;
|
|
263
265
|
default: undefined;
|
|
264
266
|
};
|
|
@@ -305,7 +307,7 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
305
307
|
transformCellText: {
|
|
306
308
|
type: import("vue").PropType<import("ant-design-vue/lib/vc-table/interface").TransformCellText<any> | undefined>;
|
|
307
309
|
};
|
|
308
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("loadingChange" | "sizeChange" | "reset" | "
|
|
310
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("loadingChange" | "sizeChange" | "reset" | "change" | "requestError" | "reload" | "submit" | "expandedRowsChange" | "expand" | "beforeSearchSubmit" | "columnsStateChange")[], "loadingChange" | "sizeChange" | "reset" | "change" | "requestError" | "reload" | "submit" | "expandedRowsChange" | "expand" | "beforeSearchSubmit" | "columnsStateChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
309
311
|
rowSelection: {
|
|
310
312
|
type: import("vue").PropType<import("./types/table").ProTableRowSelection<any>>;
|
|
311
313
|
default: undefined;
|
|
@@ -323,7 +325,7 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
323
325
|
default: undefined;
|
|
324
326
|
};
|
|
325
327
|
request: {
|
|
326
|
-
type: import("vue").PropType<import("./types/table").
|
|
328
|
+
type: import("vue").PropType<import("./types/table").RequsetFunction<any>>;
|
|
327
329
|
default: null;
|
|
328
330
|
};
|
|
329
331
|
virtualScroll: import("vue").PropType<boolean>;
|
|
@@ -351,6 +353,7 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
351
353
|
default: () => undefined;
|
|
352
354
|
};
|
|
353
355
|
actionRef: import("vue").PropType<import("./types/table").ProCoreActionType>;
|
|
356
|
+
formRef: import("vue").PropType<import("./types/table").ProCoreFormType>;
|
|
354
357
|
tableClassName: import("vue").PropType<String>;
|
|
355
358
|
tableStyle: {
|
|
356
359
|
type: import("vue").PropType<import("vue").CSSProperties>;
|
|
@@ -401,7 +404,12 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
401
404
|
size: {
|
|
402
405
|
type: import("vue").PropType<import("./typing").SizeType>;
|
|
403
406
|
default: string;
|
|
404
|
-
};
|
|
407
|
+
}; /**
|
|
408
|
+
* @Author gx12358
|
|
409
|
+
* @DateTime 2022/1/21
|
|
410
|
+
* @lastTime 2022/1/21
|
|
411
|
+
* @description Tabel-Form(搜索) hooks 方法
|
|
412
|
+
*/
|
|
405
413
|
align: {
|
|
406
414
|
type: import("vue").PropType<import("ant-design-vue/es/vc-table/interface").AlignType>;
|
|
407
415
|
default: string;
|
|
@@ -428,7 +436,7 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
428
436
|
onSizeChange: import("vue").PropType<(size: string) => any>;
|
|
429
437
|
onLadingChange: import("vue").PropType<(loading: boolean) => any>;
|
|
430
438
|
onRequestError: import("vue").PropType<(e: Error) => void>;
|
|
431
|
-
onBeforeSearchSubmit: import("vue").PropType<import("./types/table").
|
|
439
|
+
onBeforeSearchSubmit: import("vue").PropType<import("./types/table").RequsetFunction<RecordType>>;
|
|
432
440
|
onColumnsStateChange: import("vue").PropType<(data: import("./hooks/useColumnSetting").ColumnsState[]) => void>;
|
|
433
441
|
prefixCls: {
|
|
434
442
|
type: import("vue").PropType<string>;
|
|
@@ -523,12 +531,7 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
523
531
|
default: undefined;
|
|
524
532
|
};
|
|
525
533
|
expandIconColumnIndex: {
|
|
526
|
-
type: import("vue").PropType<number | undefined>;
|
|
527
|
-
* @Author gx12358
|
|
528
|
-
* @DateTime 2022/1/21
|
|
529
|
-
* @lastTime 2022/1/21
|
|
530
|
-
* @description Tabel-loading hooks 方法
|
|
531
|
-
*/
|
|
534
|
+
type: import("vue").PropType<number | undefined>;
|
|
532
535
|
default: undefined;
|
|
533
536
|
};
|
|
534
537
|
showExpandColumn: {
|
|
@@ -548,16 +551,17 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
548
551
|
default: undefined;
|
|
549
552
|
};
|
|
550
553
|
sticky: {
|
|
551
|
-
type: import("vue").PropType<boolean | import("ant-design-vue/lib/vc-table/interface").TableSticky | undefined>;
|
|
554
|
+
type: import("vue").PropType<boolean | import("ant-design-vue/lib/vc-table/interface").TableSticky | undefined>;
|
|
555
|
+
default: undefined;
|
|
556
|
+
};
|
|
557
|
+
dropdownPrefixCls: StringConstructor;
|
|
558
|
+
dataSource: {
|
|
559
|
+
/**
|
|
552
560
|
* @Author gx12358
|
|
553
561
|
* @DateTime 2022/1/21
|
|
554
562
|
* @lastTime 2022/1/21
|
|
555
563
|
* @description Tabel-pagetion hooks 方法
|
|
556
564
|
*/
|
|
557
|
-
default: undefined;
|
|
558
|
-
};
|
|
559
|
-
dropdownPrefixCls: StringConstructor;
|
|
560
|
-
dataSource: {
|
|
561
565
|
type: import("vue").PropType<any[] | undefined>;
|
|
562
566
|
default: undefined;
|
|
563
567
|
};
|
|
@@ -616,7 +620,6 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
616
620
|
onBeforeSearchSubmit?: ((...args: any[]) => any) | undefined;
|
|
617
621
|
onColumnsStateChange?: ((...args: any[]) => any) | undefined;
|
|
618
622
|
onLoadingChange?: ((...args: any[]) => any) | undefined;
|
|
619
|
-
onPostData?: ((...args: any[]) => any) | undefined;
|
|
620
623
|
}, {
|
|
621
624
|
rowKey: string;
|
|
622
625
|
columns: ProColumns;
|
|
@@ -663,7 +666,7 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
663
666
|
search: import("./types/table").SearchConfig;
|
|
664
667
|
rowSelection: import("./types/table").ProTableRowSelection<any>;
|
|
665
668
|
pagination: import("./types/table").ProTablePagination;
|
|
666
|
-
request: import("./types/table").
|
|
669
|
+
request: import("./types/table").RequsetFunction<any>;
|
|
667
670
|
waitRequest: boolean;
|
|
668
671
|
debounceTime: number;
|
|
669
672
|
searchMap: import("./types/column").ProSearchMap<"text", "date">[];
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
@import '../../design/config.less';
|
|
2
|
-
|
|
3
|
-
@import 'ant-design-vue/es/tree-select/style/index.less';
|
|
4
|
-
@import 'ant-design-vue/es/button/style/index.less';
|
|
5
|
-
@import 'ant-design-vue/es/form/style/index.less';
|
|
6
|
-
@import 'ant-design-vue/es/select/style/index.less';
|
|
7
|
-
@import 'ant-design-vue/es/time-picker/style/index.less';
|
|
8
|
-
@import 'ant-design-vue/es/date-picker/style/index.less';
|
|
9
|
-
@import 'ant-design-vue/es/input/style/index.less';
|
|
2
|
+
@import '../../design/ant-design-theme.less';
|
|
10
3
|
|
|
11
4
|
@pro-table-form-prefix-cls: ~'@{gx-prefix-pro}-table-form';
|
|
12
5
|
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
@import '../../design/config.less';
|
|
2
|
-
|
|
3
|
-
@import 'ant-design-vue/es/menu/style/index.less';
|
|
4
|
-
@import 'ant-design-vue/es/popover/style/index.less';
|
|
5
|
-
@import 'ant-design-vue/es/dropdown/style/index.less';
|
|
6
|
-
@import 'ant-design-vue/es/tooltip/style/index.less';
|
|
2
|
+
@import '../../design/ant-design-theme.less';
|
|
7
3
|
|
|
8
4
|
.@{gx-prefix-pro}-table-list-toolbar {
|
|
9
5
|
&-title {
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
gap: 8px;
|
|
10
9
|
flex: 1;
|
|
11
|
-
font-size:
|
|
10
|
+
font-size: @font-size-lg;
|
|
12
11
|
font-weight: 500;
|
|
13
12
|
line-height: 24px;
|
|
14
13
|
color: @label-color;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@import 'ant-design-vue/es/empty/style/index.less';
|
|
2
|
+
@import 'ant-design-vue/es/tree/style/index.less';
|
|
3
|
+
@import 'ant-design-vue/es/checkbox/style/index.less';
|
|
4
|
+
@import 'ant-design-vue/es/grid/style/index.less';
|
|
5
|
+
@import 'ant-design-vue/es/pagination/style/index.less';
|
|
6
|
+
@import 'ant-design-vue/es/spin/style/index.less';
|
|
7
|
+
@import 'ant-design-vue/es/space/style/index.less';
|
|
8
|
+
@import 'ant-design-vue/es/table/style/index.less';
|
|
9
|
+
@import 'ant-design-vue/es/tree-select/style/index.less';
|
|
10
|
+
@import 'ant-design-vue/es/button/style/index.less';
|
|
11
|
+
@import 'ant-design-vue/es/form/style/index.less';
|
|
12
|
+
@import 'ant-design-vue/es/select/style/index.less';
|
|
13
|
+
@import 'ant-design-vue/es/time-picker/style/index.less';
|
|
14
|
+
@import 'ant-design-vue/es/date-picker/style/index.less';
|
|
15
|
+
@import 'ant-design-vue/es/input/style/index.less';
|
|
16
|
+
@import 'ant-design-vue/es/menu/style/index.less';
|
|
17
|
+
@import 'ant-design-vue/es/popover/style/index.less';
|
|
18
|
+
@import 'ant-design-vue/es/dropdown/style/index.less';
|
|
19
|
+
@import 'ant-design-vue/es/tooltip/style/index.less';
|
package/dist/design/config.less
CHANGED
|
@@ -11,6 +11,7 @@ interface ActionType {
|
|
|
11
11
|
setLoading: (loading: boolean | SpinProps) => void;
|
|
12
12
|
setColumns: (columnList: ProColumns) => void;
|
|
13
13
|
removeRowKeys: (keyList: (string | number)[]) => void;
|
|
14
|
+
syncSelectedRows: (dataList: any[]) => void;
|
|
14
15
|
columns: ComputedRef<ProColumns>;
|
|
15
16
|
formParamsRef: RecordType;
|
|
16
17
|
onBeforeSearchSubmit: ProTableProps['onBeforeSearchSubmit'];
|
|
@@ -24,7 +25,7 @@ export declare type ConfigFetchData = {
|
|
|
24
25
|
dataSource: ComputedRef<ProTableProps['dataSource']>;
|
|
25
26
|
};
|
|
26
27
|
export declare function useConfigFetchData(props: ProTableProps): ConfigFetchData;
|
|
27
|
-
export declare function useFetchData({ polling, request, postData, dataSource, waitRequest, debounceTime, }: ConfigFetchData, { columns, getLoading, setLoading, setColumns, removeRowKeys, formParamsRef, setPagination, getPaginationInfo, onBeforeSearchSubmit }: ActionType, emit: any): {
|
|
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): {
|
|
28
29
|
getDataSourceRef: ComputedRef<RecordType[]>;
|
|
29
30
|
isTreeDataRef: ComputedRef<boolean>;
|
|
30
31
|
reSetDataList: (list: RecordType[]) => void;
|
|
@@ -7,4 +7,5 @@ export declare function useRowSelection(rowKey: Ref<ProTableProps['rowKey']>, ro
|
|
|
7
7
|
selectAllRowKey: (selected: any[], selectedRows: any[], changeRows: any[]) => void;
|
|
8
8
|
removeRowKeys: (keyList: (string | number)[]) => void;
|
|
9
9
|
changeRowKey: () => void;
|
|
10
|
+
syncSelectedRows: (dataList: any[]) => void;
|
|
10
11
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import './design/config.less';
|
|
2
|
+
import './design/ant-design-theme.less';
|
|
3
|
+
import './design/ant-design-vue.less';
|
|
2
4
|
import './style/table.less';
|
|
5
|
+
import './pro-table.less';
|
|
3
6
|
import './style.less';
|
|
4
7
|
export { proTableProps } from './props';
|
|
5
8
|
export { default } from './ProTable';
|
|
6
9
|
export type { ProTableProps } from './ProTable';
|
|
10
|
+
export type { RequsetFunction, ProCoreActionTypeConfig, ProTabelFeachParams } from './types/table';
|
|
11
|
+
export type { ProColumn, ProColumns } from './types/column';
|
|
7
12
|
export { default as ProTable } from './ProTable';
|