export default {
    inserted(el, binding) {
        let throttleTime = binding.value; 
        if (!throttleTime) {
            throttleTime = 1000;
        }
        let cbFun;
        el.addEventListener('click', event => {
            if (!cbFun) { // 第一次执行
                cbFun = setTimeout(() => {
                    cbFun = null;
                }, throttleTime);
            } else {
                event && event.stopImmediatePropagation();
            }
        }, true);
    }
}