vue异步按需加载组件

1 components: {
 2     AddCustomerSchedule(resolve) {
 3       require(["../components/AddCustomer"], resolve);
 4     },
 5     AddPeopleSchedule(resolve) {
 6       require(["../components/AddPeople"], resolve);
 7     },
 8     CustomerInfoSchedule(resolve) {
 9       require(["../components/CustomerInfo"], resolve);
10     },
11     VisitRecordSchedule(resolve) {
12       require(["../components/VisitRecord"], resolve);
13     },
14   },
component:resolve => require(['@/component/helloworld'],resolve);

 https://www.cnblogs.com/jun-qi/p/10931205.html

posted @ 2020-07-28 18:01  ThisCall  阅读(952)  评论(0编辑  收藏  举报