按照你弄得封装五,报错
if (res.code === 200) {
Toast("删除成功");
this.showEdit = false;
this.getlist();
}
vue.runtime.esm.js?2b0e:619 [Vue warn]: Error in v-on handler (Promise/async): "TypeError: Cannot read property 'code' of undefined"
found in
---> <VanContactEdit>
<VanPopup>
<ContactList> at src/views/ContactListdemo.vue
<App> at src/App.vue
<Root>
warn @ vue.runtime.esm.js?2b0e:619
logError @ vue.runtime.esm.js?2b0e:1884
globalHandleError @ vue.runtime.esm.js?2b0e:1879
handleError @ vue.runtime.esm.js?2b0e:1839
(anonymous) @ vue.runtime.esm.js?2b0e:1856
Promise.catch (async)
invokeWithErrorHandling @ vue.runtime.esm.js?2b0e:1856
invoker @ vue.runtime.esm.js?2b0e:2179
invokeWithErrorHandling @ vue.runtime.esm.js?2b0e:1854
Vue.$emit @ vue.runtime.esm.js?2b0e:3882
(anonymous) @ index.js?3b16:87
Promise.then (async)
onDelete @ index.js?3b16:86
emit @ functional.js?ba31:39
onClick @ index.js?b650:46
invokeWithErrorHandling @ vue.runtime.esm.js?2b0e:1854
invoker @ vue.runtime.esm.js?2b0e:2179
original._wrapper @ vue.runtime.esm.js?2b0e:6911
vue.runtime.esm.js?2b0e:1888 TypeError: Cannot read property 'code' of undefined
at VueComponent._callee3$ (ContactListdemo.vue?de04:105)
at tryCatch (runtime.js?96cf:45)
at Generator.invoke [as _invoke] (runtime.js?96cf:271)
at Generator.prototype.<computed> [as next] (runtime.js?96cf:97)
at asyncGeneratorStep (asyncToGenerator.js?89ba:5)
at _next (asyncToGenerator.js?89ba:27)