@gx-design-vue/pro-table 0.1.8 → 0.1.10
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 +48 -6
- package/dist/hooks/useRowSelection.d.ts +1 -0
- package/dist/pro-table.es.js +15 -7
- package/dist/pro-table.umd.js +10 -10
- package/dist/types/TableTypings.d.ts +4 -0
- package/package.json +1 -1
package/dist/ProTable.d.ts
CHANGED
|
@@ -188,7 +188,12 @@ declare const GProTable: import("vue").DefineComponent<{
|
|
|
188
188
|
};
|
|
189
189
|
expandedRowRender: {
|
|
190
190
|
type: import("vue").PropType<import("ant-design-vue/es/vc-table/interface").ExpandedRowRender<any>>;
|
|
191
|
-
default: any;
|
|
191
|
+
default: any; /**
|
|
192
|
+
* @Author gx12358
|
|
193
|
+
* @DateTime 2022/1/21
|
|
194
|
+
* @lastTime 2022/1/21
|
|
195
|
+
* @description Tabel-loading hooks 方法
|
|
196
|
+
*/
|
|
192
197
|
};
|
|
193
198
|
expandRowByClick: {
|
|
194
199
|
type: import("vue").PropType<boolean>;
|
|
@@ -217,7 +222,12 @@ declare const GProTable: import("vue").DefineComponent<{
|
|
|
217
222
|
indentSize: {
|
|
218
223
|
type: import("vue").PropType<number>;
|
|
219
224
|
default: any;
|
|
220
|
-
};
|
|
225
|
+
}; /**
|
|
226
|
+
* @Author gx12358
|
|
227
|
+
* @DateTime 2022/1/21
|
|
228
|
+
* @lastTime 2022/1/21
|
|
229
|
+
* @description Tabel-scroll hooks 方法
|
|
230
|
+
*/
|
|
221
231
|
expandIconColumnIndex: {
|
|
222
232
|
type: import("vue").PropType<number>;
|
|
223
233
|
default: any;
|
|
@@ -228,6 +238,12 @@ declare const GProTable: import("vue").DefineComponent<{
|
|
|
228
238
|
};
|
|
229
239
|
expandedRowClassName: {
|
|
230
240
|
type: import("vue").PropType<import("ant-design-vue/es/vc-table/interface").RowClassName<any>>;
|
|
241
|
+
/**
|
|
242
|
+
* @Author gx12358
|
|
243
|
+
* @DateTime 2022/1/21
|
|
244
|
+
* @lastTime 2022/1/21
|
|
245
|
+
* @description Tabel-colums hooks 方法
|
|
246
|
+
*/
|
|
231
247
|
default: any;
|
|
232
248
|
};
|
|
233
249
|
childrenColumnName: {
|
|
@@ -268,7 +284,12 @@ declare const GProTable: import("vue").DefineComponent<{
|
|
|
268
284
|
};
|
|
269
285
|
onChange: {
|
|
270
286
|
type: import("vue").PropType<(pagination: import("ant-design-vue/es/table/interface").TablePaginationConfig, filters: Record<string, import("ant-design-vue/es/table/interface").FilterValue | null>, sorter: import("ant-design-vue/es/table/interface").SorterResult<any> | import("ant-design-vue/es/table/interface").SorterResult<any>[], extra: import("ant-design-vue/es/table/interface").TableCurrentDataSource<any>) => void>;
|
|
271
|
-
default: any;
|
|
287
|
+
default: any; /**
|
|
288
|
+
* @Author gx12358
|
|
289
|
+
* @DateTime 2022/1/21
|
|
290
|
+
* @lastTime 2022/1/21
|
|
291
|
+
* @description Tabel-datasource hooks 方法
|
|
292
|
+
*/
|
|
272
293
|
};
|
|
273
294
|
onResizeColumn: {
|
|
274
295
|
type: import("vue").PropType<(w: number, col: import("ant-design-vue/es/table/interface").ColumnType<any>) => void>;
|
|
@@ -533,7 +554,12 @@ declare const GProTable: import("vue").DefineComponent<{
|
|
|
533
554
|
};
|
|
534
555
|
expandedRowRender: {
|
|
535
556
|
type: import("vue").PropType<import("ant-design-vue/es/vc-table/interface").ExpandedRowRender<any>>;
|
|
536
|
-
default: any;
|
|
557
|
+
default: any; /**
|
|
558
|
+
* @Author gx12358
|
|
559
|
+
* @DateTime 2022/1/21
|
|
560
|
+
* @lastTime 2022/1/21
|
|
561
|
+
* @description Tabel-loading hooks 方法
|
|
562
|
+
*/
|
|
537
563
|
};
|
|
538
564
|
expandRowByClick: {
|
|
539
565
|
type: import("vue").PropType<boolean>;
|
|
@@ -562,7 +588,12 @@ declare const GProTable: import("vue").DefineComponent<{
|
|
|
562
588
|
indentSize: {
|
|
563
589
|
type: import("vue").PropType<number>;
|
|
564
590
|
default: any;
|
|
565
|
-
};
|
|
591
|
+
}; /**
|
|
592
|
+
* @Author gx12358
|
|
593
|
+
* @DateTime 2022/1/21
|
|
594
|
+
* @lastTime 2022/1/21
|
|
595
|
+
* @description Tabel-scroll hooks 方法
|
|
596
|
+
*/
|
|
566
597
|
expandIconColumnIndex: {
|
|
567
598
|
type: import("vue").PropType<number>;
|
|
568
599
|
default: any;
|
|
@@ -573,6 +604,12 @@ declare const GProTable: import("vue").DefineComponent<{
|
|
|
573
604
|
};
|
|
574
605
|
expandedRowClassName: {
|
|
575
606
|
type: import("vue").PropType<import("ant-design-vue/es/vc-table/interface").RowClassName<any>>;
|
|
607
|
+
/**
|
|
608
|
+
* @Author gx12358
|
|
609
|
+
* @DateTime 2022/1/21
|
|
610
|
+
* @lastTime 2022/1/21
|
|
611
|
+
* @description Tabel-colums hooks 方法
|
|
612
|
+
*/
|
|
576
613
|
default: any;
|
|
577
614
|
};
|
|
578
615
|
childrenColumnName: {
|
|
@@ -613,7 +650,12 @@ declare const GProTable: import("vue").DefineComponent<{
|
|
|
613
650
|
};
|
|
614
651
|
onChange: {
|
|
615
652
|
type: import("vue").PropType<(pagination: import("ant-design-vue/es/table/interface").TablePaginationConfig, filters: Record<string, import("ant-design-vue/es/table/interface").FilterValue | null>, sorter: import("ant-design-vue/es/table/interface").SorterResult<any> | import("ant-design-vue/es/table/interface").SorterResult<any>[], extra: import("ant-design-vue/es/table/interface").TableCurrentDataSource<any>) => void>;
|
|
616
|
-
default: any;
|
|
653
|
+
default: any; /**
|
|
654
|
+
* @Author gx12358
|
|
655
|
+
* @DateTime 2022/1/21
|
|
656
|
+
* @lastTime 2022/1/21
|
|
657
|
+
* @description Tabel-datasource hooks 方法
|
|
658
|
+
*/
|
|
617
659
|
};
|
|
618
660
|
onResizeColumn: {
|
|
619
661
|
type: import("vue").PropType<(w: number, col: import("ant-design-vue/es/table/interface").ColumnType<any>) => void>;
|
|
@@ -3,6 +3,7 @@ import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
|
3
3
|
import type { ProTableProps } from '../types/TableTypings';
|
|
4
4
|
export declare function useRowSelection(rowKey: Ref<ProTableProps['rowKey']>, rowSelection: Ref<ProTableProps['rowSelection']>): {
|
|
5
5
|
selectedKey: Ref<(string | number)[]>;
|
|
6
|
+
selectedItem: Ref<RecordType[]>;
|
|
6
7
|
selectRowKey: (record: RecordType, selected: any[]) => void;
|
|
7
8
|
selectAllRowKey: (selected: any[], selectedRows: any[], changeRows: any[]) => void;
|
|
8
9
|
removeRowKeys: (keyList: (string | number)[]) => void;
|
package/dist/pro-table.es.js
CHANGED
|
@@ -27788,7 +27788,8 @@ function useRowSelection(rowKey, rowSelection) {
|
|
|
27788
27788
|
}
|
|
27789
27789
|
};
|
|
27790
27790
|
const changeRowKey = () => {
|
|
27791
|
-
|
|
27791
|
+
var _a, _b;
|
|
27792
|
+
rowSelection.value && ((_b = (_a = rowSelection.value) == null ? void 0 : _a.onChange) == null ? void 0 : _b.call(_a, selectedKey.value, selectedItem.value));
|
|
27792
27793
|
};
|
|
27793
27794
|
const selectAllRowKey = (selected, selectedRows, changeRows) => {
|
|
27794
27795
|
if (rowKey.value) {
|
|
@@ -27833,6 +27834,7 @@ function useRowSelection(rowKey, rowSelection) {
|
|
|
27833
27834
|
};
|
|
27834
27835
|
return {
|
|
27835
27836
|
selectedKey,
|
|
27837
|
+
selectedItem,
|
|
27836
27838
|
selectRowKey,
|
|
27837
27839
|
selectAllRowKey,
|
|
27838
27840
|
removeRowKeys,
|
|
@@ -29735,6 +29737,7 @@ const GProTable = defineComponent({
|
|
|
29735
29737
|
});
|
|
29736
29738
|
const {
|
|
29737
29739
|
selectedKey,
|
|
29740
|
+
selectedItem,
|
|
29738
29741
|
changeRowKey,
|
|
29739
29742
|
selectRowKey,
|
|
29740
29743
|
selectAllRowKey,
|
|
@@ -29787,7 +29790,10 @@ const GProTable = defineComponent({
|
|
|
29787
29790
|
virtualScroll: needVirtualScroll.value,
|
|
29788
29791
|
size: unref(sizeRef),
|
|
29789
29792
|
scroll: unref(getScrollRef),
|
|
29790
|
-
loading:
|
|
29793
|
+
loading: {
|
|
29794
|
+
spinning: !!unref(getLoading),
|
|
29795
|
+
...omit$1(props2.loading, "spinning")
|
|
29796
|
+
},
|
|
29791
29797
|
columns: toRaw(unref(getProColumns).filter((column) => column.show || column.show === void 0)),
|
|
29792
29798
|
pagination: toRaw(unref(getPaginationInfo)),
|
|
29793
29799
|
dataSource: unref(getDataSourceRef)
|
|
@@ -29842,6 +29848,10 @@ const GProTable = defineComponent({
|
|
|
29842
29848
|
actionRef: () => {
|
|
29843
29849
|
return {
|
|
29844
29850
|
pageParams: getPaginationInfo.value,
|
|
29851
|
+
rowsSelection: {
|
|
29852
|
+
keys: selectedKey.value,
|
|
29853
|
+
items: selectedItem.value
|
|
29854
|
+
},
|
|
29845
29855
|
getLoadingStatus: getLoading.value || false,
|
|
29846
29856
|
reload,
|
|
29847
29857
|
reloadAndRest: async (callBack) => {
|
|
@@ -29993,7 +30003,7 @@ const GProTable = defineComponent({
|
|
|
29993
30003
|
"toolBarBtn": toolBarBtn
|
|
29994
30004
|
}, null);
|
|
29995
30005
|
return () => {
|
|
29996
|
-
var _a, _b;
|
|
30006
|
+
var _a, _b, _c;
|
|
29997
30007
|
const headerTitleRender = getSlotVNode(slots, props2, "headerTitle");
|
|
29998
30008
|
const titleTipRender = getSlotVNode(slots, props2, "titleTip");
|
|
29999
30009
|
const toolBarBtnRender = getSlotVNode(slots, props2, "toolBarBtn");
|
|
@@ -30008,7 +30018,7 @@ const GProTable = defineComponent({
|
|
|
30008
30018
|
"modal": props2.modalScroll,
|
|
30009
30019
|
"searchMap": formDataRef.value,
|
|
30010
30020
|
"prefixCls": baseClassName,
|
|
30011
|
-
"loading":
|
|
30021
|
+
"loading": (_b = unref(getBindValues).loading) == null ? void 0 : _b.spinning,
|
|
30012
30022
|
"onSearch": handleTableSubmit,
|
|
30013
30023
|
"defaultParams": defaultParamsRef
|
|
30014
30024
|
}, {
|
|
@@ -30016,9 +30026,7 @@ const GProTable = defineComponent({
|
|
|
30016
30026
|
var _a2;
|
|
30017
30027
|
return (_a2 = slots.search) == null ? void 0 : _a2.call(slots);
|
|
30018
30028
|
} : null
|
|
30019
|
-
}), !needVirtualScroll.value && toolbarDom(headerTitleRender, toolBarBtnRender, titleTipRender), !!((
|
|
30020
|
-
"spinning": !!unref(getLoading)
|
|
30021
|
-
}, {
|
|
30029
|
+
}), !needVirtualScroll.value && toolbarDom(headerTitleRender, toolBarBtnRender, titleTipRender), !!((_c = props2.customRender) != null ? _c : slots.customRender) ? createVNode(Spin$1, unref(getBindValues).loading, {
|
|
30022
30030
|
default: () => {
|
|
30023
30031
|
var _a2;
|
|
30024
30032
|
return [renderCustomize(), !!((_a2 = dataSourceRef.value) == null ? void 0 : _a2.length) && createVNode(Pagination$2, mergeProps({
|