函数节流精简版-vue

登陆界面的函数节流,防止快速点击

 loginStart() {
                if (this.loginThrottle) {
                    return;
                }
                this.login();
                this.loginThrottle = true;
                setTimeout(() => {
                    this.loginThrottle = false;
                }, 1000);
            },

  

posted @ 2023-03-18 08:44  ikun、  阅读(2)  评论(0编辑  收藏  举报