fix: 修复el-tree组件setCheckedKeys设置一旦选中父级子级也被选中

This commit is contained in:
chengyangwang 2023-03-01 17:09:03 +08:00
parent 265302d7dd
commit 3e2b5e1887

View File

@ -125,7 +125,9 @@ const handleUpdate = async (rowId: number) => {
const res = await TenantPackageApi.getTenantPackageApi(rowId) const res = await TenantPackageApi.getTenantPackageApi(rowId)
unref(formRef)?.setValues(res) unref(formRef)?.setValues(res)
// //
unref(treeRef)?.setCheckedKeys(res.menuIds) res.menuIds?.forEach((item: any) => {
unref(treeRef)?.setChecked(item, true,false);
})
} }
// //