Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
88b628bd
Commit
88b628bd
authored
Apr 10, 2019
by
pavelmash
Committed by
iamkun
Apr 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: avoid creating object for performance upgrade (#14776)
parent
f06ef4d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/directives/repeat-click.js
src/directives/repeat-click.js
+2
-2
No files found.
src/directives/repeat-click.js
View file @
88b628bd
...
@@ -6,7 +6,7 @@ export default {
...
@@ -6,7 +6,7 @@ export default {
let
startTime
;
let
startTime
;
const
handler
=
()
=>
vnode
.
context
[
binding
.
expression
].
apply
();
const
handler
=
()
=>
vnode
.
context
[
binding
.
expression
].
apply
();
const
clear
=
()
=>
{
const
clear
=
()
=>
{
if
(
new
Date
()
-
startTime
<
100
)
{
if
(
Date
.
now
()
-
startTime
<
100
)
{
handler
();
handler
();
}
}
clearInterval
(
interval
);
clearInterval
(
interval
);
...
@@ -15,7 +15,7 @@ export default {
...
@@ -15,7 +15,7 @@ export default {
on
(
el
,
'
mousedown
'
,
(
e
)
=>
{
on
(
el
,
'
mousedown
'
,
(
e
)
=>
{
if
(
e
.
button
!==
0
)
return
;
if
(
e
.
button
!==
0
)
return
;
startTime
=
new
Date
();
startTime
=
Date
.
now
();
once
(
document
,
'
mouseup
'
,
clear
);
once
(
document
,
'
mouseup
'
,
clear
);
clearInterval
(
interval
);
clearInterval
(
interval
);
interval
=
setInterval
(
handler
,
100
);
interval
=
setInterval
(
handler
,
100
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment