@peng_kai/kit 0.2.0-beta.21 → 0.2.0-beta.22
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.
|
@@ -30,12 +30,12 @@ export function useAntdModal<Comp extends Component>(
|
|
|
30
30
|
const compProps = reactive(_comp.props);
|
|
31
31
|
const compRef = useComponentRef(_comp.is);
|
|
32
32
|
const _modalProps: ModalProps = reactive({
|
|
33
|
-
...
|
|
33
|
+
...defaultModalProps,
|
|
34
34
|
...isProxy(modalProps) ? toRefs(modalProps) : modalProps,
|
|
35
35
|
confirmLoading: toRef(() => (compRef as any)?.loading),
|
|
36
36
|
onOk: (e: MouseEvent) => {
|
|
37
37
|
(compRef as any)?.confirm?.(e);
|
|
38
|
-
|
|
38
|
+
modalProps.onOk?.(e);
|
|
39
39
|
},
|
|
40
40
|
});
|
|
41
41
|
const modalSlotName = _comp.type === 'body' ? 'default' : 'modalRender';
|
|
@@ -55,9 +55,10 @@ export function useAntdTable<
|
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
const defineColumns = (columnsGetter: () => LocalColumnsType) => computed(columnsGetter);
|
|
58
|
-
const defineRowSelection = (rowSelectionGetter: () => LocalTableRowSelection) => {
|
|
58
|
+
const defineRowSelection = (rowSelectionGetter: () => LocalTableRowSelection = () => ({})) => {
|
|
59
59
|
const rowSelection = reactive(rowSelectionGetter());
|
|
60
60
|
|
|
61
|
+
rowSelection.preserveSelectedRowKeys ??= true;
|
|
61
62
|
rowSelection.selectedRowKeys ??= [];
|
|
62
63
|
rowSelection.onChange ??= keys => rowSelection.selectedRowKeys = keys;
|
|
63
64
|
|