Commit 3e2b5e18 by chengyangwang

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

parent 265302d7
...@@ -125,7 +125,9 @@ const handleUpdate = async (rowId: number) => { ...@@ -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);
})
} }
// 提交按钮 // 提交按钮
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment