我明明有emits,为什么还一直报警告呢,警告如下
来源:3-18 Teleport - 瞬间移动 第二部分
邱邱的QQ
2020-10-26
Extraneous non-emits event listeners (closeModal, closeModalNoValid) 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
at <Modal isOpen=false onCloseModal=fn onCloseModalNoValid=fn >
写回答
2回答
-
邱邱的QQ
提问者
2020-10-26
如果我把'close-modal': (payload: any)改成closeModal: (payload: any)这种驼峰形式的写法之后,这个警告就消失了,很奇怪,vue2.x不都是这种横杠分隔的自定义事件写法么
212020-11-03 -
luff丶
2020-12-05
我也遇到了
10
相似问题