: Cannot read properties of undefined (reading 'url')
时间: 2023-08-28 20:18:31 浏览: 248
这个错误是因为在vue3项目中添加路由并进行跳转时,出现了"Cannot read property 'url' of undefined"的错误提示。根据引用的分析,这个问题可能是由于项目生成的缓存目录导致的。当在项目中添加、编辑或移动组件路径后,可能会导致无法读取到相应的属性。解决这个问题的方法是需要重启vue项目。另外,根据引用提到的代码段"var marker = L.marker([this.site[i].lat, this.site[i].lng], { draggable: true, icon: mapIcon() }).addTo(map);",也可能是在这段代码中出现了无法读取属性'url'的错误。请检查这个代码段中是否存在未定义的属性。如果有的话,可以尝试对其进行修复或调整。<span class="em">1</span><span class="em">2</span>
#### 引用[.reference_title]
- *1* [Vue3报错:cannot read properties of undefined “reading url](https://blog.csdn.net/m0_61020843/article/details/127075652)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [Cannot read properties of undefined (reading ‘createIcon‘) ?](https://blog.csdn.net/qq_41425267/article/details/120429028)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文