说明:

debounce和throttle在脚手架的使用,此处以防抖函数debounce为例避免按钮被重复点击

引入:

import lodash from 'lodash'

使用:

直接使用debounce方法

//  审核
      audit: lodash.debounce(function() {
          this.$refs['model'].saveTotalResult(1).then(() => {
            const reportId = this.activeReport.id;
            report.audit(reportId).then(res => {
                 successMsg(res.msg)
            })
          })
        }, 300),

 

相关文章:

  • 2021-06-12
  • 2021-09-30
  • 2021-12-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-20
相关资源
相似解决方案