
<el-button type="primary" @click="openBtn">点击调用</el-button>
//添加ref
<ReportTraceQuery :reportTraceQueryShow.sync="reportTraceQueryShow" ref="reportTraceQuery"></ReportTraceQuery>
//调用
openMark() {
this.$refs.reportTraceQuery.reportTraceQueryTableData();
this.reportTraceQueryShow = true
},
//注:reportTraceQueryTableData()是子组件的方法
标签: 子组件
上面是“vue主页点击按钮如何调用子组件方法”的全面内容,想了解更多关于 vuejs 内容,请继续关注web建站教程。
当前网址:https://m.ipkd.cn/webs_4.html
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

微伞小游戏Wesane网页版在线玩小游戏官网入口
程序员带你探寻带“闻”字、气质纯雅的女孩名字
Buy Me a Coffee官方网址入口
布雷克影院:最新电影、热门电视剧、经典动漫和综艺节目
css3动画边框渐变闪光效果的按钮
vue+百度echarts做一个饼图