zouyu
2023-11-17 d8ac6057eaad648687699e25a575f3b7b8c1b102
1
2
3
4
5
6
7
8
9
10
11
12
import Vue from 'vue'
import { debounce } from '@/util/operateControlRule.js'
const thinclick = Vue.directive('thinclick', {
  bind(el, binding, vnode) {
    const that = vnode.context
    const callFun = debounce(binding.value, 500, that)
    el.onclick = (e) => {
      callFun()
    }
  }
})
export { thinclick }