// 路由懒加载 (原来写法) // export const loadView = (view) => { // return () => import(`@/views/${view}`) // } //新写法 export const loadView = (view) => { return (resolve) => require([`@/views/${view}`], resolve) };