代码如下图所示,浏览器运行后,不会执行console.log('error')
main.ts
export function createApp() {
const app = createSSRApp(App)
app.config.errorHandler = (err, instance, info) => {
console.log('error')
}
return {
app
}
}
index.vue
const obj:object={}
obj.fn()
2***@qq.com
感谢老铁, 我也遇到了. 希望官方重视起来
2023-06-07 21:03