fix: 需要排除menuIds menuIds为string

This commit is contained in:
dap 2024-10-23 11:38:56 +08:00
parent e5625efcf7
commit 68f3ac8c79

View File

@ -5,6 +5,8 @@ import { useVbenDrawer } from '@vben/common-ui';
import { $t } from '@vben/locales';
import { cloneDeep, eachTree, listToTree } from '@vben/utils';
import { omit } from 'lodash-es';
import { useVbenForm } from '#/adapter/form';
import { menuList, tenantPackageMenuTreeSelect } from '#/api/system/menu';
import {
@ -66,7 +68,9 @@ const [BasicDrawer, drawerApi] = useVbenDrawer({
isUpdate.value = !!id;
if (isUpdate.value && id) {
const record = await packageInfo(id);
await formApi.setValues(record);
// menuIds menuIdsstring
// setupMenuTreeSelect
await formApi.setValues(omit(record, ['menuIds']));
}
/**
* 加载菜单树和已勾选菜单