Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
xqz
/
dianDemo
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
af358fb9
authored
2019-06-26 14:54:58 +0800
by
406803045
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
解决首页白屏,添加fastclick
1 parent
3579fed1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
3 deletions
package.json
src/main.js
src/permission.js
package.json
View file @
af358fb
...
...
@@ -16,6 +16,7 @@
},
"dependencies"
:
{
"axios"
:
"0.18.0"
,
"fastclick"
:
"^1.0.6"
,
"lib-flexible"
:
"^0.3.2"
,
"normalize.css"
:
"7.0.0"
,
"vant"
:
"^1.6.19"
,
...
...
src/main.js
View file @
af358fb
...
...
@@ -8,8 +8,18 @@ import store from './store'
import
router
from
'./router'
import
'@/filters'
// filters
import
'@/permission'
// permission 权限
// 解决移动端click事件300毫秒延迟方法
import
FastClick
from
'fastclick'
if
(
'addEventListener'
in
document
)
{
document
.
addEventListener
(
'DOMContentLoaded'
,
function
()
{
FastClick
.
attach
(
document
.
body
)
},
false
)
}
Vue
.
config
.
productionTip
=
false
new
Vue
({
el
:
'#app'
,
router
,
...
...
src/permission.js
View file @
af358fb
import
router
from
'./router'
router
.
beforeEach
(
async
(
to
,
from
,
next
)
=>
{})
router
.
beforeEach
(
async
(
to
,
from
,
next
)
=>
{
next
()
})
router
.
afterEach
(()
=>
{})
...
...
Write
Preview
Styling with
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