Problems with local components of vue

Environment: vuecli3
question: local component reference, whether vue can use components at multiple levels

the question may be difficult to understand, for example

/ / Root component
App.vue

/ / create custom components
A.vue
B.vue
C.vue

the App root component import is introduced, and the components locally registers the A _ Magi B ~ M C component, which is used normally.

now the problem is
1. A component is introduced into the App root component import, and components registers Group A locally
2. The B component is introduced in the A component import, and the B component is locally registered in components.

if you do so, you will get an error
whether vue does not support this relationship. You can only register globally
if you do, what should you do? try many times but fail
ask the minister to answer

.

App.vue

demoA

demoB

err

Jun.26,2022

nested components are allowed. What is the error message?


the code of the screenshot is fine, but your directory structure is a little strange. Take a look at


if there is no problem in introducing demoA.
your demoA is under components, demoB is under components/config, and the reference should be
import demoB from'. / onfig/demoB', why are there components in the path?

Menu