Przeglądaj źródła

debounce控制连续请求接口

gcz 3 lat temu
rodzic
commit
2a93a8f10a
1 zmienionych plików z 3 dodań i 0 usunięć
  1. 3 0
      src/views/index.vue

+ 3 - 0
src/views/index.vue

@@ -203,6 +203,9 @@
         this.getPageData();
       },
       getPageData(){
+        debounce(this.debounceGetData, 500, false)
+      },
+      debounceGetData(){
         if(this.page==1){
           this.getPage1numerical();
           this.getPage1echarts01();