router.js
MyRoutes:{
path: '/',
name: '首页',
component: Salary,
children: [
{
path: 'other',
name: '其他数据',
// component: EmployeeSalary,//没有这个 component 的时候,就会出现路由跳级,相当于/ 路径下没有router-view 来展示 other 路径对应的组件
children: [
{
path: 'children',
name: '',
component: Employee // 父组件都没有展示,所以父组件的子组件也不会展示
},
],
},
],
},
<div class="main-nav">
<transition name="fade-transform" mode="out-in">
<router-view></router-view>
</transition>
</div>
const createRouter = () =>
new VueRouter({
mode: 'history',
base: process.env.BASE_URL,
routes: MyRoutes,
});
本文地址:https://blog.csdn.net/Sue_Vivian/article/details/107519563
如对本文有疑问, 点击进行留言回复!!
offset、client、scroll (width,height、left,top、X,Y)
网友评论