[Vue warn]: Error in v-on handler: "TypeError: Cannot read properties of undefined (reading 'resetFields')"
时间: 2023-10-14 13:04:04 浏览: 184
Sawyer-zh#study-note#Vue-js路由报错TypeError-Cannot-read-property-c-
这个错误发生在v-on的处理程序中,错误消息是"TypeError: Cannot read properties of undefined (reading 'resetFields')"。根据引用,这个错误提示表明在处理程序中尝试读取一个未定义的属性'skuId'导致的。根据引用的代码片段,我们可以看到在addAsset方法中,如果this.name或this.price为空,则会出现警告并返回。然后,在这个方法中,一个名为asset的对象被创建,并且该对象的id属性的值是this.list数组中最后一个元素的id属性值加1。最后,这个asset对象被推送到this.list数组中。根据这个信息,我无法直接找到出错的地方,因为代码片段中没有关于'resetFields'的任何信息。所以,我需要更多的代码和上下文信息才能更准确地找到问题的原因。可以提供更多的代码和上下文信息吗?<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [Vue报错:Error in v-on handler: “TypeError: Cannot read properties of undefined (reading ‘skuId‘)...](https://blog.csdn.net/weixin_56035334/article/details/125550545)[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* [[Vue warn]: Error in v-on handler: “TypeError: Cannot read properties of undefined (reading ‘id‘)...](https://blog.csdn.net/moly_moly/article/details/126527431)[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 ]
阅读全文