这里面包含了两个需要知道的
一个是懒加载 就是 页面需要时就加载 不需要时不加载
但是 你必须要在路由中配置 就是一句代码 具体看下面的
页面加不加在 怎么实现的懒加载 和你半毛钱的关系都没有
你只需要再路由中这样写就ok了 记得 在路由中哦
meta在路由中一般都是充当权限判断的
啥意思
就是 你的页面跳转时
有了meta 你就拿meta做判断
判断为true 就可以跳转到下一个路由
否则不让跳转 怎么判断呢???
你要先写上meta 写了
再去别的地方搜索meta如何判断吧
涉及到路由守卫
尽量看一下我说的话吧
//懒加载
const PickUpAppointmentList = resolve => require(['@/views/BookingManagement/PickUpAppointmentList/PickUpAppointmentList'], resolve)
const PickUpLastPeo = resolve => require(['@/views/BookingManagement/PickUpLastPeo/PickUpLastPeo'], resolve)
const PickUpLoadManagement = resolve => require(['@/views/BookingManagement/PickUpLoadManagement/PickUpLoadManagement'], resolve)
export default [
{
path: '/PickUpAppointmentList',
component: PickUpAppointmentList,
meta: {id: 'REM010010', title: '接送预约名单'}
},
{
path: '/PickUpLastPeo',
component: PickUpLastPeo,
meta: {id: 'REM020010', title: '接送剩余人数'}
},
{
path: '/PickUpLoadManagement',
component: PickUpLoadManagement,
meta: {id: 'REM030010', title: '接送线路管理'}
}
]