@gx-design-vue/pro-table 0.1.8 → 0.1.81
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,
|
|
@@ -29842,6 +29845,10 @@ const GProTable = defineComponent({
|
|
|
29842
29845
|
actionRef: () => {
|
|
29843
29846
|
return {
|
|
29844
29847
|
pageParams: getPaginationInfo.value,
|
|
29848
|
+
rowsSelection: {
|
|
29849
|
+
keys: selectedKey.value,
|
|
29850
|
+
items: selectedItem.value
|
|
29851
|
+
},
|
|
29845
29852
|
getLoadingStatus: getLoading.value || false,
|
|
29846
29853
|
reload,
|
|
29847
29854
|
reloadAndRest: async (callBack) => {
|