vue3 vite Uncaught (in promise) ReferenceError: Cannot access ‘xx‘ before initialization

Uncaught (in promise) ReferenceError: Cannot access 'BasicForm' before initialization这是

When there is a circular reference between components, we can solve it through asynchronous components: defineAsyncComponent,

On the official website of VUE3: https://cn.vuejs.org/guide/components/async.html#basic-usage .

Directly refer to the asynchronous component ( defineAsyncComponent ) provided by the official website , and there are many ways to write it. The following is just one of them.

As originally written:

Modified writing:

Guess you like

Origin blog.csdn.net/qq_18872627/article/details/129437914