vue:vue引入组建的多种写法

vue的路由组件中,引入模块的两种写法:(@等价于..)
死的写法:不是按需加载
1:import Index from '@/components/Index'(import Index from '../components/Index')
活的写法:按需加载
2:const disconnect = (resolve) => {
import('pages/disconnect/disconnect').then(template => {
resolve(template)
})
}

猜你喜欢

转载自www.cnblogs.com/llqwm/p/9152079.html