Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
walk_daka_h5
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
穆启卓
walk_daka_h5
Commits
5dff25e9
Commit
5dff25e9
authored
Apr 25, 2019
by
穆启卓
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
provide / inject 处理vue重新路由到当前页面
parent
e66965e9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletions
+21
-1
App.vue
src/App.vue
+19
-1
HaveJoinedGame.vue
src/views/HaveJoinedGame.vue
+2
-0
No files found.
src/App.vue
View file @
5dff25e9
<
template
>
<
template
>
<div
id=
"app"
>
<div
id=
"app"
>
<router-view/>
<router-view
v-if=
"isRouterAlive"
/>
<HelloWorld></HelloWorld>
<HelloWorld></HelloWorld>
</div>
</div>
</
template
>
</
template
>
...
@@ -10,6 +10,16 @@
...
@@ -10,6 +10,16 @@
components
:
{
components
:
{
HelloWorld
HelloWorld
},
},
provide
()
{
return
{
reload
:
this
.
reload
}
},
data
()
{
return
{
isRouterAlive
:
true
}
},
mounted
()
{
mounted
()
{
// 是否直接打开报名页
// 是否直接打开报名页
(()
=>
{
(()
=>
{
...
@@ -54,6 +64,14 @@
...
@@ -54,6 +64,14 @@
false
false
);
);
})(
window
);
})(
window
);
},
methods
:
{
reload
()
{
this
.
isRouterAlive
=
false
;
this
.
$nextTick
(()
=>
{
this
.
isRouterAlive
=
true
;
})
}
}
}
};
};
</
script
>
</
script
>
...
...
src/views/HaveJoinedGame.vue
View file @
5dff25e9
...
@@ -154,6 +154,7 @@ export default {
...
@@ -154,6 +154,7 @@ export default {
Reborn
,
Reborn
,
ShareModal
ShareModal
},
},
inject
:
[
'reload'
],
data
()
{
data
()
{
return
{
return
{
swiperOption
:
{
swiperOption
:
{
...
@@ -232,6 +233,7 @@ export default {
...
@@ -232,6 +233,7 @@ export default {
week
:
this
.
next_period
week
:
this
.
next_period
}
}
});
});
this
.
reload
();
}
else
{
}
else
{
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
"PartakeChallenge"
,
name
:
"PartakeChallenge"
,
...
...
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