File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,7 @@ const open = async (row: RoleApi.RoleVO) => {
9191defineExpose ({ open }) // 提供 open 方法,用于打开弹窗
9292
9393/** 提交表单 */
94+ const emit = defineEmits ([' success' ]) // 定义 success 事件,用于操作成功后的回调
9495const submitForm = async () => {
9596 // 校验表单
9697 if (! formRef ) return
@@ -109,6 +110,8 @@ const submitForm = async () => {
109110 await PermissionApi .assignRoleMenu (data )
110111 message .success (t (' common.updateSuccess' ))
111112 dialogVisible .value = false
113+ // 发送操作成功的事件
114+ emit (' success' )
112115 } finally {
113116 formLoading .value = false
114117 }
Original file line number Diff line number Diff line change @@ -107,6 +107,7 @@ const open = async (row: RoleApi.RoleVO) => {
107107defineExpose ({ open }) // 提供 open 方法,用于打开弹窗
108108
109109/** 提交表单 */
110+ const emit = defineEmits ([' success' ]) // 定义 success 事件,用于操作成功后的回调
110111const submitForm = async () => {
111112 formLoading .value = true
112113 try {
@@ -121,6 +122,8 @@ const submitForm = async () => {
121122 await PermissionApi .assignRoleDataScope (data )
122123 message .success (t (' common.updateSuccess' ))
123124 dialogVisible .value = false
125+ // 发送操作成功的事件
126+ emit (' success' )
124127 } finally {
125128 formLoading .value = false
126129 }
Original file line number Diff line number Diff line change 156156 <!-- 表单弹窗:添加/修改 -->
157157 <RoleForm ref =" formRef" @success =" getList" />
158158 <!-- 表单弹窗:菜单权限 -->
159- <RoleAssignMenuForm ref =" assignMenuFormRef" />
159+ <RoleAssignMenuForm ref =" assignMenuFormRef" @success = " getList " />
160160 <!-- 表单弹窗:数据权限 -->
161- <RoleDataPermissionForm ref =" dataPermissionFormRef" />
161+ <RoleDataPermissionForm ref =" dataPermissionFormRef" @success = " getList " />
162162</template >
163163<script lang="ts" name="SystemRole" setup>
164164import { DICT_TYPE , getIntDictOptions } from ' @/utils/dict'
You can’t perform that action at this time.
0 commit comments