版权声明:未经本人同意不得私自转载 https://blog.csdn.net/qq_40190624/article/details/85245654
如果我们使用懒加载的话;在router.js中的顶部不需要写上如:
import dutyCheck from "../components/pages/dutyCheck"
直接写在routes:中就可以
{
path: "/dutyCheck",
component: () => import("../components/pages/dutyCheck.vue")
},
注:只有点击当前的dutyCheck页面才会加载这个页面