vue3调试问题:控制台出现‘Unhandled error during execution of component event handler‘警告

 

问题: 

(1)版本dd-admin-20220209;

(2)runtime-core.esm-bundler.js:38 [Vue warn]: Unhandled error during execution of component event handler 
  at <ElButton type="primary" loading=false onClick=fn<confirmModifyFn> > 
  at <ElOverlay custom-mask-event="" mask=true overlay-class=undefined  ... > 
  at <BaseTransition onAfterEnter=fn<afterEnter> onAfterLeave=fn<afterLeave> onBeforeLeave=fn<beforeLeave>  ... > 
  at <Transition name="dialog-fade" onAfterEnter=fn<afterEnter> onAfterLeave=fn<afterLeave>  ... > 
  at <ElDialog modelValue=true onUpdate:modelValue=fn title="文件"  ... > 
  at <ImageList> 
  at <ImageManage onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< Proxy {…}[[Handler]]: Object[[Target]]: Object[[IsRevoked]]: false > > 
  at <RouterView> 
  at <ElContainer class="content" > 
  at <ElContainer key=0 class="container" > 
  at <App>
warn2 @ runtime-core.esm-bundler.js:38
logError @ runtime-core.esm-bundler.js:212
handleError @ runtime-core.esm-bundler.js:204
callWithErrorHandling @ runtime-core.esm-bundler.js:158
callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:164
emit$1 @ runtime-core.esm-bundler.js:718
(匿名) @ runtime-core.esm-bundler.js:7220
handleClick @ button.vue:142
createElementBlock.onClick._cache.<computed>._cache.<computed> @ button.vue?vue&type=template&id=802c5c76&lang.js:20
callWithErrorHandling @ runtime-core.esm-bundler.js:155
callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:164
invoker @ runtime-dom.esm-bundler.js:366
runtime-core.esm-bundler.js:38 [Vue warn]: Unhandled error during execution of native event handler 
  at <ElButton type="primary" loading=false onClick=fn<confirmModifyFn> > 
  at <ElOverlay custom-mask-event="" mask=true overlay-class=undefined  ... > 
  at <BaseTransition onAfterEnter=fn<afterEnter> onAfterLeave=fn<afterLeave> onBeforeLeave=fn<beforeLeave>  ... > 
  at <Transition name="dialog-fade" onAfterEnter=fn<afterEnter> onAfterLeave=fn<afterLeave>  ... > 
  at <ElDialog modelValue=true onUpdate:modelValue=fn title="文件"  ... > 
  at <ImageList> 
  at <ImageManage onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< Proxy {…} > > 
  at <RouterView> 
  at <ElContainer class="content" > 
  at <ElContainer key=0 class="container" > 
  at <App>

解决:

Unhandled error during execution of component event handler 译为: 组件事件处理程序执行期间未处理的错误操作流程。

即: this.$confirm()方法未处理取消按钮触发的事件,所以就需要 catch 去捕捉这个错误即可。

详情转发:2021-11-22 VUE3控制台出现'Unhandled error during execution of component event handler'警告解决方法 - 有匪 - 博客园

备注:

结论:一般开发状态此报警可忽略。

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值