vue中路由懒加载实现amd加载文件

一般我们配置路由的时候是import引入:

import log from '@/components/login';
{ path: '/login', component: log , hidden: true },

这样引入,所有的文件都会在页面加载的时候把所有的文件都加载出来,

采用amd方式的话会在页面加载的时候

猜你喜欢

转载自www.cnblogs.com/bieluanlai/p/10788815.html
今日推荐