中等Vue
0 1

如何捕获和处理Vue项目中的错误?

【概念释义】

捕获 Vue 错误分层:组件渲染/侦听器errorCaptured 向上冒泡;全局app.config.errorHandler(Vue3)或 Vue.config.errorHandler(Vue2);Promise 未捕获window.onunhandledrejection路由 router.onError接口 axios 拦截器;生产接 Sentry 上报 sourceMap。

【基础使用】

javascript
app.config.

登录查看完整 1119

回答讨论

暂无讨论,登录后可抢先发言

本题库更多题目(50)