Explorar o código

fix: 去除onConfirm中的setTimeout

layhuts hai 1 mes
pai
achega
71f2e5f504
Modificáronse 1 ficheiros con 3 adicións e 5 borrados
  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();
   },
 });