fix(role): 🐞 add nextTick for open
- 增加 nextTick(),修复在权限范围为指定机构并且已选择数据时,编辑打开提示 setChecked undefined 问题
This commit is contained in:
parent
6b45ed7e78
commit
c048dcf02a
@ -102,8 +102,10 @@ const open = async (row: RoleApi.RoleVO) => {
|
|||||||
formData.name = row.name
|
formData.name = row.name
|
||||||
formData.code = row.code
|
formData.code = row.code
|
||||||
formData.dataScope = row.dataScope
|
formData.dataScope = row.dataScope
|
||||||
row.dataScopeDeptIds?.forEach((deptId: number) => {
|
nextTick((): void => {
|
||||||
treeRef.value.setChecked(deptId, true, false)
|
row.dataScopeDeptIds?.forEach((deptId: number) => {
|
||||||
|
treeRef.value.setChecked(deptId, true, false)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||||
|
Loading…
Reference in New Issue
Block a user