Vue 3 Component emitted event “confirmForm“ but it is neither declared in the emit

1. 报错原因

组件触发了事件"confirmForm",但它没有在emit中声明

2.错误代码

const myemit = defineEmits('confirmForm');

3. 正确

const myemit = defineEmits(['confirmForm']);

你可能感兴趣的:(Vue常见问题,vue.js,前端,javascript)