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

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b38cc2-2c136.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b38cc2-2c136.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?