子组件名字为ImageUpload
handleUploadSuccess(res) {
this.$emit("input", res.url);
}
this.$emit(“方法名”, 参数);
父组件接收方法
<el-form-item label="菜品图片:" prop="picUrl" >
<ImageUpload @input="test"/>
</el-form-item>
methods{
test(res) {
console.log(res);
},
}