項目中需根據(jù)后臺接口,給當前登錄人動態(tài)生成菜單欄。我的做法是獲取接口數(shù)據(jù)后,遍歷數(shù)據(jù) 動態(tài)push router問題出在動態(tài)push router時 menu.component = lazyLoading(menu.component); //menu.component時接口返回的一級菜單的資源路徑 例如 有一個頁面叫myTestListmenu.component = ‘test/myTestList’然后我用lazyLoading import 對應的.vue頁面資源//lazyLoadingexport default (url) =>()=>import(@/views/${url}.vue)一開始 項目中頁面比較少,現(xiàn)在對應的.vue差不多有80個左右,我發(fā)現(xiàn)熱更新時間特別久,每次修改一個字符串,都要等待幾分鐘。求教問題出在哪里?怎么解決這種問題呢?
添加回答
舉報
0/150
提交
取消