@gx-design-vue/pro-table 0.1.7 → 0.1.9
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.
|
@@ -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) => {
|