Browse Source

提交回调

guicheng 4 months ago
parent
commit
4707aa6b9f
2 changed files with 4 additions and 2 deletions
  1. 2 2
      src/views/Template/template/hook.tsx
  2. 2 0
      src/views/Template/template/index.vue

+ 2 - 2
src/views/Template/template/hook.tsx

@@ -142,14 +142,14 @@ export function useUser() {
       const { status, info }: any = await http.Request({
         url: UserUrl.User.userDelete.method,
         method: UserUrl.User.userDelete.url,
-        params: { SysAdminId: row.Id }
+        params: row.Id
       });
       if (status === "1") {
         ElMessage({
           message: "删除成功",
           type: "success"
         });
-        onSearch(ruleFormRef);
+        onSearch(ruleFormRef.value);
       } else {
         ElMessageBox.alert(info, "提示", {
           confirmButtonText: "关闭",

+ 2 - 0
src/views/Template/template/index.vue

@@ -38,12 +38,14 @@ const {
 } = useUser();
 // 关闭修改弹窗
 const closeEditVisible = () => {
+  onSearch(ruleFormRef.value);
   editVisible.value = false;
 };
 // 注册修改弹窗交互
 provide("closeEditVisible", closeEditVisible);
 // 关闭添加弹窗
 const closeAddVisible = () => {
+  onSearch(ruleFormRef.value);
   addVisible.value = false;
 };
 // 注册添加弹窗交互