mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-06 21:10:38 +00:00
Use ES6 syntax for hooks in transition key
This commit is contained in:
parent
d9fe4b9612
commit
a99161f685
@ -41,7 +41,12 @@ require('<%= pluginPath %>')
|
|||||||
// root instance
|
// root instance
|
||||||
// here we inject the router and store to all child components,
|
// here we inject the router and store to all child components,
|
||||||
// making them available everywhere as `this.$router` and `this.$store`.
|
// making them available everywhere as `this.$router` and `this.$store`.
|
||||||
const defaultTransition = <%= serialize(transition) %>
|
const defaultTransition = <%=
|
||||||
|
serialize(transition)
|
||||||
|
.replace('beforeEnter(', 'function(').replace('enter(', 'function(').replace('afterEnter(', 'function(')
|
||||||
|
.replace('enterCancelled(', 'function(').replace('beforeLeave(', 'function(').replace('leave(', 'function(')
|
||||||
|
.replace('afterLeave(', 'function(').replace('leaveCancelled(', 'function(')
|
||||||
|
%>
|
||||||
const app = {
|
const app = {
|
||||||
router,
|
router,
|
||||||
<%= (store ? 'store,' : '') %>
|
<%= (store ? 'store,' : '') %>
|
||||||
|
Loading…
Reference in New Issue
Block a user