@gx-design-vue/pro-table 0.0.2-rc.9 → 0.0.3-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/dist/ProTable.d.ts +46 -35
- 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 +1101 -1042
- 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,12 +52,18 @@ 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>;
|
|
58
59
|
};
|
|
59
60
|
toolBarBtn: {
|
|
60
|
-
type: import("vue").PropType<import("./typing").ProVueNode>;
|
|
61
|
+
type: import("vue").PropType<import("./typing").ProVueNode>; /**
|
|
62
|
+
* @Author gx12358
|
|
63
|
+
* @DateTime 2022/1/21
|
|
64
|
+
* @lastTime 2022/1/21
|
|
65
|
+
* @description Tabel-loading hooks 方法
|
|
66
|
+
*/
|
|
61
67
|
default: () => undefined;
|
|
62
68
|
};
|
|
63
69
|
headerTitle: {
|
|
@@ -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,18 +230,23 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
224
230
|
default: undefined;
|
|
225
231
|
};
|
|
226
232
|
expandIconColumnIndex: {
|
|
227
|
-
type: import("vue").PropType<number | undefined>;
|
|
233
|
+
type: import("vue").PropType<number | undefined>;
|
|
234
|
+
default: undefined;
|
|
235
|
+
};
|
|
236
|
+
showExpandColumn: {
|
|
237
|
+
type: BooleanConstructor;
|
|
238
|
+
default: undefined; /**
|
|
228
239
|
* @Author gx12358
|
|
229
240
|
* @DateTime 2022/1/21
|
|
230
241
|
* @lastTime 2022/1/21
|
|
231
242
|
* @description Tabel-loading hooks 方法
|
|
232
243
|
*/
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
244
|
+
}; /**
|
|
245
|
+
* @Author gx12358
|
|
246
|
+
* @DateTime 2022/1/21
|
|
247
|
+
* @lastTime 2022/1/21
|
|
248
|
+
* @description Tabel-loading hooks 方法
|
|
249
|
+
*/
|
|
239
250
|
expandedRowClassName: {
|
|
240
251
|
type: import("vue").PropType<import("ant-design-vue/lib/vc-table/interface").RowClassName<any> | undefined>;
|
|
241
252
|
default: undefined;
|
|
@@ -249,12 +260,7 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
249
260
|
default: undefined;
|
|
250
261
|
};
|
|
251
262
|
sticky: {
|
|
252
|
-
type: import("vue").PropType<boolean | import("ant-design-vue/lib/vc-table/interface").TableSticky | undefined>;
|
|
253
|
-
* @Author gx12358
|
|
254
|
-
* @DateTime 2022/1/21
|
|
255
|
-
* @lastTime 2022/1/21
|
|
256
|
-
* @description Tabel-pagetion hooks 方法
|
|
257
|
-
*/
|
|
263
|
+
type: import("vue").PropType<boolean | import("ant-design-vue/lib/vc-table/interface").TableSticky | undefined>;
|
|
258
264
|
default: undefined;
|
|
259
265
|
};
|
|
260
266
|
dropdownPrefixCls: StringConstructor;
|
|
@@ -305,7 +311,7 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
305
311
|
transformCellText: {
|
|
306
312
|
type: import("vue").PropType<import("ant-design-vue/lib/vc-table/interface").TransformCellText<any> | undefined>;
|
|
307
313
|
};
|
|
308
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("loadingChange" | "sizeChange" | "reset" | "
|
|
314
|
+
}, () => 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
315
|
rowSelection: {
|
|
310
316
|
type: import("vue").PropType<import("./types/table").ProTableRowSelection<any>>;
|
|
311
317
|
default: undefined;
|
|
@@ -323,7 +329,7 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
323
329
|
default: undefined;
|
|
324
330
|
};
|
|
325
331
|
request: {
|
|
326
|
-
type: import("vue").PropType<import("./types/table").
|
|
332
|
+
type: import("vue").PropType<import("./types/table").RequsetFunction<any>>;
|
|
327
333
|
default: null;
|
|
328
334
|
};
|
|
329
335
|
virtualScroll: import("vue").PropType<boolean>;
|
|
@@ -351,12 +357,18 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
351
357
|
default: () => undefined;
|
|
352
358
|
};
|
|
353
359
|
actionRef: import("vue").PropType<import("./types/table").ProCoreActionType>;
|
|
360
|
+
formRef: import("vue").PropType<import("./types/table").ProCoreFormType>;
|
|
354
361
|
tableClassName: import("vue").PropType<String>;
|
|
355
362
|
tableStyle: {
|
|
356
363
|
type: import("vue").PropType<import("vue").CSSProperties>;
|
|
357
364
|
};
|
|
358
365
|
toolBarBtn: {
|
|
359
|
-
type: import("vue").PropType<import("./typing").ProVueNode>;
|
|
366
|
+
type: import("vue").PropType<import("./typing").ProVueNode>; /**
|
|
367
|
+
* @Author gx12358
|
|
368
|
+
* @DateTime 2022/1/21
|
|
369
|
+
* @lastTime 2022/1/21
|
|
370
|
+
* @description Tabel-loading hooks 方法
|
|
371
|
+
*/
|
|
360
372
|
default: () => undefined;
|
|
361
373
|
};
|
|
362
374
|
headerTitle: {
|
|
@@ -428,7 +440,7 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
428
440
|
onSizeChange: import("vue").PropType<(size: string) => any>;
|
|
429
441
|
onLadingChange: import("vue").PropType<(loading: boolean) => any>;
|
|
430
442
|
onRequestError: import("vue").PropType<(e: Error) => void>;
|
|
431
|
-
onBeforeSearchSubmit: import("vue").PropType<import("./types/table").
|
|
443
|
+
onBeforeSearchSubmit: import("vue").PropType<import("./types/table").RequsetFunction<RecordType>>;
|
|
432
444
|
onColumnsStateChange: import("vue").PropType<(data: import("./hooks/useColumnSetting").ColumnsState[]) => void>;
|
|
433
445
|
prefixCls: {
|
|
434
446
|
type: import("vue").PropType<string>;
|
|
@@ -523,18 +535,23 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
523
535
|
default: undefined;
|
|
524
536
|
};
|
|
525
537
|
expandIconColumnIndex: {
|
|
526
|
-
type: import("vue").PropType<number | undefined>;
|
|
538
|
+
type: import("vue").PropType<number | undefined>;
|
|
539
|
+
default: undefined;
|
|
540
|
+
};
|
|
541
|
+
showExpandColumn: {
|
|
542
|
+
type: BooleanConstructor;
|
|
543
|
+
default: undefined; /**
|
|
527
544
|
* @Author gx12358
|
|
528
545
|
* @DateTime 2022/1/21
|
|
529
546
|
* @lastTime 2022/1/21
|
|
530
547
|
* @description Tabel-loading hooks 方法
|
|
531
548
|
*/
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
549
|
+
}; /**
|
|
550
|
+
* @Author gx12358
|
|
551
|
+
* @DateTime 2022/1/21
|
|
552
|
+
* @lastTime 2022/1/21
|
|
553
|
+
* @description Tabel-loading hooks 方法
|
|
554
|
+
*/
|
|
538
555
|
expandedRowClassName: {
|
|
539
556
|
type: import("vue").PropType<import("ant-design-vue/lib/vc-table/interface").RowClassName<any> | undefined>;
|
|
540
557
|
default: undefined;
|
|
@@ -548,12 +565,7 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
548
565
|
default: undefined;
|
|
549
566
|
};
|
|
550
567
|
sticky: {
|
|
551
|
-
type: import("vue").PropType<boolean | import("ant-design-vue/lib/vc-table/interface").TableSticky | undefined>;
|
|
552
|
-
* @Author gx12358
|
|
553
|
-
* @DateTime 2022/1/21
|
|
554
|
-
* @lastTime 2022/1/21
|
|
555
|
-
* @description Tabel-pagetion hooks 方法
|
|
556
|
-
*/
|
|
568
|
+
type: import("vue").PropType<boolean | import("ant-design-vue/lib/vc-table/interface").TableSticky | undefined>;
|
|
557
569
|
default: undefined;
|
|
558
570
|
};
|
|
559
571
|
dropdownPrefixCls: StringConstructor;
|
|
@@ -616,7 +628,6 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
616
628
|
onBeforeSearchSubmit?: ((...args: any[]) => any) | undefined;
|
|
617
629
|
onColumnsStateChange?: ((...args: any[]) => any) | undefined;
|
|
618
630
|
onLoadingChange?: ((...args: any[]) => any) | undefined;
|
|
619
|
-
onPostData?: ((...args: any[]) => any) | undefined;
|
|
620
631
|
}, {
|
|
621
632
|
rowKey: string;
|
|
622
633
|
columns: ProColumns;
|
|
@@ -663,7 +674,7 @@ declare const ProTable: import("vue").DefineComponent<{
|
|
|
663
674
|
search: import("./types/table").SearchConfig;
|
|
664
675
|
rowSelection: import("./types/table").ProTableRowSelection<any>;
|
|
665
676
|
pagination: import("./types/table").ProTablePagination;
|
|
666
|
-
request: import("./types/table").
|
|
677
|
+
request: import("./types/table").RequsetFunction<any>;
|
|
667
678
|
waitRequest: boolean;
|
|
668
679
|
debounceTime: number;
|
|
669
680
|
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';
|