问题:
(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'警告解决方法 - 有匪 - 博客园
备注:
结论:一般开发状态此报警可忽略。