第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

vue2.0的按需加載的一些疑問

vue2.0的按需加載的一些疑問

慕森王 2019-02-14 18:19:49
import App from '../App'const startIndex = r => require.ensure([], () => r(require('../pages/start/startIndex')), 'startIndex')const second = r => require.ensure([], () => r(require('../pages/second/second')), 'second')export default [{  path: '/',  component: App,  children: [    {      path: '/',      name: 'startIndex',      component: startIndex    },    {      path: '/second',      name: 'second',      component: second    }  ]}]const startIndex = r => require.ensure([], () => r(require('../pages/start/startIndex')), 'startIndex')這樣一句話就實現(xiàn)了按需加載,可以解釋一下為什么嗎,實在找不到資料
查看完整描述

1 回答

?
慕無忌1623718

TA貢獻1744條經(jīng)驗 獲得超4個贊

實際上,這是webpack的功能,跟vue關系不大,參見文檔 - webpack 代碼分離。vue-router的文檔 - 懶加載也提到了。


查看完整回答
反對 回復 2019-02-16
  • 1 回答
  • 0 關注
  • 367 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號