子组件给父组件传值,父组件中的data打印不出来子组件中this.$confirm('是否继续完善信息?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'}).then(() => { console.log('进入then'); //这个可以出来
this.$emit('listenTochildEvent','子组件传值');
}).catch(() => { this.$message({
type: 'success',
message: '可点击“完善”继续完善信息'
});
});父组件中//Vue<preparation-basic-detail-comp @listenTochildEvent="listenTochildEvent">
</preparation-basic-detail-comp>//JSlistenTochildEvent(data){
console.log(data); //出不来}
添加回答
举报
0/150
提交
取消