Browse Source

fix: 去除onConfirm中的setTimeout

layhuts 1 month ago
parent
commit
71f2e5f504
1 changed files with 3 additions and 5 deletions
  1. 3 5
      playground/src/views/examples/vxe-table/viewed.vue

+ 3 - 5
playground/src/views/examples/vxe-table/viewed.vue

@@ -124,11 +124,9 @@ const [Modal, modalApi] = useVbenModal({
   draggable: true,
   onConfirm: () => {
     modalApi.setState({loading: true});
-    setTimeout(() => {
-      editRow.value && gridApi.markRowAsViewed(editRow.value);
-      modalApi.setState({loading: false});
-      modalApi.close();
-    }, 1500);
+    editRow.value && gridApi.markRowAsViewed(editRow.value);
+    modalApi.setState({loading: false});
+    modalApi.close();
   },
 });