fix: 修复el-tree组件setCheckedKeys设置一旦选中父级子级也被选中
This commit is contained in:
parent
265302d7dd
commit
3e2b5e1887
@ -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);
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 提交按钮
|
// 提交按钮
|
||||||
|
Loading…
Reference in New Issue
Block a user