Commit 4c0a5e8c by moon69

修复数据权限无法回显的问题

parent 0230a4af
......@@ -102,12 +102,11 @@ const open = async (row: RoleApi.RoleVO) => {
formData.name = row.name
formData.code = row.code
formData.dataScope = row.dataScope
await nextTick()
// 需要在 DOM 渲染完成后,再设置选中状态
nextTick(() => {
row.dataScopeDeptIds?.forEach((deptId: number) => {
treeRef.value.setChecked(deptId, true, false)
})
row.dataScopeDeptIds?.forEach((deptId: number) => {
treeRef.value.setChecked(deptId, true, false)
})
}
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
......
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