zheng 4 روز پیش
والد
کامیت
9cf9e0bd99
1فایلهای تغییر یافته به همراه6 افزوده شده و 3 حذف شده
  1. 6 3
      17.Vue3/project4/src/store/count.ts

+ 6 - 3
17.Vue3/project4/src/store/count.ts

@@ -34,9 +34,12 @@ export const useCountStore = defineStore('count1', {
             console.log("执行")
             // await new Promise((reslove)=>setTimeout(reslove,1000));
             // this.addCount()
-            await new Promise((reslove)=>setTimeout(reslove,1000));
-            this.addCount1()
-            console.log("结束",this.count);
+            // await new Promise((reslove)=>setTimeout(reslove,1000));
+            await this.addCount1();
+            // await setTimeout(() => {
+            //     this.addCount1()
+            //     }, 1000);
+            console.log("结束", this.count);
         }
     }
 });