diff --git a/src/directives/repeat-click.js b/src/directives/repeat-click.js index 32094c6e..9aaef3ad 100644 --- a/src/directives/repeat-click.js +++ b/src/directives/repeat-click.js @@ -6,7 +6,7 @@ export default { let startTime; const handler = () => vnode.context[binding.expression].apply(); const clear = () => { - if (new Date() - startTime < 100) { + if (Date.now() - startTime < 100) { handler(); } clearInterval(interval); @@ -15,7 +15,7 @@ export default { on(el, 'mousedown', (e) => { if (e.button !== 0) return; - startTime = new Date(); + startTime = Date.now(); once(document, 'mouseup', clear); clearInterval(interval); interval = setInterval(handler, 100);