配置路由指向一个空白页面,在空白页面中挂载视图组件。可以达到效果。index.vue <template> <transition name="router-fade" mode="out-in"> <router-view></router-view> </transition> </template> router.js export default [{ path: '/', component: App, children: [ {path: '', component:index}, {path: 'orderDetail', component:orderDetail} ] }];
配置路由指向一个空白页面,在空白页面中挂载视图组件。可以达到效果。
index.vue
router.js