Uncaught (in promise) ReferenceError: Cannot access 'BasicForm' before initialization這是
組件之間出現循環(huán)引用時導致,我們可以通過異步組件:defineAsyncComponent解決,
在VUE3的官網:https://cn.vuejs.org/guide/components/async.html#basic-usage。
直接引用官網提供的異步組件(defineAsyncComponent),寫法多種。以下只是其中一種。
如原來的寫法:文章來源:http://www.zghlxwxcb.cn/news/detail-523912.html

修改后的寫法:文章來源地址http://www.zghlxwxcb.cn/news/detail-523912.html

到了這里,關于vue3 vite Uncaught (in promise) ReferenceError: Cannot access ‘xx‘ before initialization的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網!