zoukankan      html  css  js  c++  java
  • 节流函数

        //节流函数
        throttle(val) {
          //保持this的指向始终指向vue实例
          var that = this;
          clearTimeout(this.timeout); // 每当用户输入的时候把前一个 setTimeout clear 掉
          this.timeout = setTimeout(() => {
            that.serchZZJG(val);
          }, 800);
        },
    

      

    未闻花名
  • 相关阅读:
    LeetCode
    LeetCode
    LeetCode
    LeetCode
    LeetCode
    LeetCode
    LeetCode
    LeetCode
    LeetCode
    LeetCode
  • 原文地址:https://www.cnblogs.com/duokexiao/p/15623539.html
Copyright © 2011-2022 走看看