Browse Source

fix: demo-开窗链接跳转

hanxiaohui 5 months ago
parent
commit
2098522d4c
1 changed files with 9 additions and 1 deletions
  1. 9 1
      src/views/table-demo/components/DemoBaseModal.vue

+ 9 - 1
src/views/table-demo/components/DemoBaseModal.vue

@@ -23,6 +23,9 @@
       visible: false,
       modalExtraProps: {
         destroyOnClose: true,
+        okButtonProps: {
+          loading: false
+        }
       },
     },
   });
@@ -38,7 +41,12 @@
   };
 
   const handleOk = ({}) => {
-    setMVal('visible', false);
+    setMVal("modalExtraProps.okButtonProps.loading", true)
+    setTimeout(() => {
+      setMVal("modalExtraProps.okButtonProps.loading", false)
+      setMVal('visible', false);
+    }, 1000)
+
   };
 
   defineExpose({