排名
                
                
                    6
                
            
                    文章
                
                
                    6
                
            
                    粉丝
                
                
                    16
                
            
                    评论
                
                
                    8
                
            
            {{item.articleTitle}}
            
    {{item.blogName}} : {{item.content}}
        
            ICP备案  :渝ICP备18016597号-1
        
        
            网站信息:2018-2025TNBLOG.NET
        
        
            技术交流:群号656732739
        
        
            联系我们:contact@tnblog.net
        
        
            公网安备:
50010702506256
        
    
50010702506256
        
        
            欢迎加群交流技术
        
    
    
    分类:
    Vue
前言
 什么是防抖与节流暂时先不说了,我这里直接先记录一下
//定义一个过期的定时器
let timer = setTimeout(function () {
}, 0);
//防抖函数
const debounce = (func,time) => {
  if (timer) {
    clearTimeout(timer);
    timer = setTimeout(function () {
      func();
    }, time);  
  }
}
//调用
  debounce(async () => {
          const resultData = await postUrl('jobManager/CronRead', {}, { cron: cron }).finally(() => {
          })
          console.log("我请求了接口")
          methods.setValue("CronNotes", resultData.data)
        },500)评价