How to dynamically change the components imported by import in vue

1. Requirements: the
page has 50 components, which are required to be loaded dynamically.
if you load dynamically through the is attribute, you need to import all components first. It is troublesome to register.

2. Question:
is require
in the data attribute a path that can be dynamically imported by import or require, thus dynamically changing different components

Mar.22,2021

official recommendation < component: is= "currentView" > < / component >


No first import there is no good solution for now, but you can use an external file to specialize import components, then export all components,
call .components


image.png

structure is shown in figure

Menu