Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-appreciation
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2744c302
authored
Feb 20, 2025
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix bug
1 parent
73ac1cc0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
src/main.js
src/main.js
View file @
2744c30
...
...
@@ -16,6 +16,31 @@ import '@/filter'
import
{
start
}
from
'@/setup'
Vue
.
config
.
productionTip
=
false
Vue
.
prototype
.
$apis
=
apis
Vue
.
directive
(
'preventReClick'
,
{
bind
:
(
el
,
binding
)
=>
{
let
time
=
binding
.
value
// 防抖时间
if
(
!
time
)
{
// 用户若不设置防抖时间,则默认1s
time
=
1000
}
let
fun
el
.
addEventListener
(
'click'
,
event
=>
{
if
(
!
fun
)
{
// 第一次执行
fun
=
setTimeout
(()
=>
{
fun
=
null
},
time
)
}
else
{
// 直接取消当前事件
event
&&
event
.
stopImmediatePropagation
()
}
},
true
)
}
})
start
()
export
{
bootstrap
,
mount
,
unmount
}
from
'@/setup'
export
const
http
=
params
=>
Vue
.
prototype
.
$http
(
params
)
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment