runtime-core.esm-bundler.js:2259 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '__asyncLoader')
时间: 2023-10-17 09:35:47 浏览: 201
这个错误是由于无法读取'__asyncLoader'属性引起的。根据引用的信息,这个问题可能是由于使用了Vue3 script setup语法糖导致的。在Vue3中,使用script setup语法糖时,必须将useRoute和useRouter函数写在setup函数中,否则会导致undefined错误,无法获取路由数据和路由方法。因此,为了解决这个问题,你需要将useRoute和useRouter函数放在setup函数中使用。这样就可以正常获取路由数据和路由方法,避免了出现'__asyncLoader'属性的undefined错误。请尝试按照这个方法进行修改并重新运行你的代码。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [[Vue warn]: Unhandled error during execution -- 【vue bug】](https://blog.csdn.net/ZY_FlyWay/article/details/112599854)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [vue3 runtime-core.esm-bundler.js:221 Uncaught TypeError: route.push is not a function](https://blog.csdn.net/m0_46151522/article/details/131457058)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文