修复角色管理数据权限回显问题

This commit is contained in:
YunaiV
2023-04-19 20:16:36 +08:00
parent 22e5b45d84
commit 75c4d6608c
3 changed files with 8 additions and 2 deletions

View File

@ -91,6 +91,7 @@ const open = async (row: RoleApi.RoleVO) => {
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
/** 提交表单 */
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
const submitForm = async () => {
// 校验表单
if (!formRef) return
@ -109,6 +110,8 @@ const submitForm = async () => {
await PermissionApi.assignRoleMenu(data)
message.success(t('common.updateSuccess'))
dialogVisible.value = false
// 发送操作成功的事件
emit('success')
} finally {
formLoading.value = false
}