Browse Source

debounce控制连续请求接口

gcz 3 năm trước cách đây
mục cha
commit
2a93a8f10a
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  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();