父组件中引入子组件
import ParagraphInfo from './ParagraphInfo.vue';
export default {
components:{ParagraphInfo}
}
子组件调用父组件,同时传递多个参数
<el-icon>
<DeleteFilled @click="this.$emit('deleteDocumentPara', paragraph.paragraph_id, 'para')"/>
</el-icon>
父组件中接受
<ParagraphInfo @deleteDocumentPara="deleteDocumentPara"></ParagraphInfo>
deleteDocumentPara(...childParameters){
console.log("childParameter0", childParameters[0])
console.log("childParameter1", childParameters[1])
console.log("childParameter2", childParameters[2])
}