chore: 优化代码

This commit is contained in:
dap 2025-01-07 15:19:25 +08:00
parent 273d28be4c
commit 5444098ab7

View File

@ -10,7 +10,7 @@ import { nextTick, onMounted, ref, shallowRef, watch } from 'vue';
import { cloneDeep, findGroupParentIds } from '@vben/utils';
import { Alert, Checkbox, message, RadioGroup, Space } from 'ant-design-vue';
import { Alert, Checkbox, RadioGroup, Space } from 'ant-design-vue';
import { uniq } from 'lodash-es';
import { useVbenVxeGrid } from '#/adapter/vxe-table';
@ -247,13 +247,7 @@ async function handleAssociationChange(e: RadioChangeEvent) {
//
await tableApi.grid.scrollTo(0, 0);
//
//
// if (e.target.value) {
// setTableChecked(lastCheckedKeys.value, records, tableApi, false);
// } else {
// setTableChecked(lastCheckedKeys.value, records, tableApi, true);
// }
//
setTableChecked(lastCheckedKeys.value, records, tableApi, !e.target.value);
updateCheckedNumber();
@ -353,11 +347,6 @@ function getCheckedKeys() {
defineExpose({
getCheckedKeys,
});
function test() {
const keys = getCheckedKeys();
message.success(`keys:${keys.length}`);
}
</script>
<template>
@ -385,7 +374,6 @@ function test() {
</template>
<template #toolbar-tools>
<Space>
<a-button @click="test"> 测试 </a-button>
<a-button @click="setExpandOrCollapse(false)">
{{ $t('pages.common.collapse') }}
</a-button>