vue3常见问题及解决办法(一)——Failed to resolve component: Popconfirm

问题描述

出现警告:
runtime-core.esm-bundler.js:6584 [Vue warn]: Failed to resolve component: Popconfirm
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.
at <List onVnodeUnmounted=fn ref=Ref< undefined > key="/lims/wf/resultentry/bysample/sample/List" >

问题分析

处理组件“Popconfirm”失败。
源文件在"/lims/wf/resultentry/bysample/sample/List"。
文件中删除时提示用户确认删除,使用了一个提示确认对话框组件,该组件未import。

<Popconfirm title="确定删除吗?" @confirm="onDeleteRow(props)">
    <a>删除</a>
</Popconfirm>

解决办法

引入该组件的定义。
import { Popconfirm } from 'ant-design-vue'

posted @ 2022-05-25 10:07  马洪彪  阅读(10217)  评论(0编辑  收藏  举报