Selaa lähdekoodia

debounce控制连续请求接口

gcz 3 vuotta sitten
vanhempi
sitoutus
2a93a8f10a
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  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();