Vue.js路由跳转错误:Uncaught Error: No match for {"name":"RefundList","params":{}} - 解决方法
{"title":"2文件:\n <el-button type="primary" size="small" link @click="toList">返回上一级\n \n \n function toList() {\n router.push({\n name: "RefundList",\n });\n}\n1文件:\nfunction toList() {\n router.push({\n name: "RefundList"\n });\n}\n\n问题:要从2跳转到1,现在在2页面点击了button按钮后,报错:\nUncaught Error: No match for\n {"name":"RefundList","params":{}}内容:这个错误是因为在2文件中的点击事件中,调用的方法名与1文件中的方法名不一致。在2文件中,点击事件的方法名应该为toList,而不是function toList()。\n\n正确的2文件代码应该是这样的:\n\n<el-button type="primary" size="small" link @click="toList">返回上一级\n\nfunction toList() {\n router.push({\n name: "RefundList",\n });\n}\n"}
原文地址: https://www.cveoy.top/t/topic/qr6Y 著作权归作者所有。请勿转载和采集!