Kaynağa Gözat

debounce控制连续请求接口

gcz 3 yıl önce
ebeveyn
işleme
2a93a8f10a
1 değiştirilmiş dosya ile 3 ekleme ve 0 silme
  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();