
1第一种方式如图
{
path: '/',
name: 'home',
component:()=>import('@/pages/home/home')
//component: Home
}
2 利用函数懒加载


3单个组件懒加载

1第一种方式如图
{
path: '/',
name: 'home',
component:()=>import('@/pages/home/home')
//component: Home
}
2 利用函数懒加载
3单个组件懒加载
本文标题:vue 路由组件懒加载几种方式
本文链接:https://www.haomeiwen.com/subject/agncyqtx.html
网友评论