1、通常我们这样加载组件,

import JobNumInformation from "@/components/views/order-center/orderlist/JobNumInformation"

然后在components中注册下,这样我们就可以在当前页面使用这个组件了

components{

JobNumInformation

}

2、延迟加载组件:在我们要使用组件时才加载该组件

vue异步加载组件

使用() => import('JobNumInformation from "@/components/views/order-center/orderlist/JobNumInformation"')替代前面示例中的import JobNumInformation from "@/components/views/order-center/orderlist/JobNumInformation"。Vue一旦请求渲染将会延迟加载该组件。 

vue异步加载组件

vue异步加载组件

vue异步加载组件

相关文章:

  • 2021-10-25
  • 2022-01-19
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-17
  • 2022-12-23
  • 2021-12-11
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案