We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f06ef4d commit 88b628bCopy full SHA for 88b628b
src/directives/repeat-click.js
@@ -6,7 +6,7 @@ export default {
6
let startTime;
7
const handler = () => vnode.context[binding.expression].apply();
8
const clear = () => {
9
- if (new Date() - startTime < 100) {
+ if (Date.now() - startTime < 100) {
10
handler();
11
}
12
clearInterval(interval);
@@ -15,7 +15,7 @@ export default {
15
16
on(el, 'mousedown', (e) => {
17
if (e.button !== 0) return;
18
- startTime = new Date();
+ startTime = Date.now();
19
once(document, 'mouseup', clear);
20
21
interval = setInterval(handler, 100);
0 commit comments