小码问答,有问必答!

2022-07-06 14:25

Extraneous non-emits event listeners were passed to component如何解决

2022-07-06 14:25 回答了这个问题

我自己做了个组件,<template>下直接是个<el-dialog>,给dialog中table的row添加了个select事件报如下异常:

Extraneous non-emits event listeners (select) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option. 

请大神们给指导。

你在el-dialog外面加个<div>应该就好了,加个根元素。

0条评论

我要评论