$refs调用子组件方法
时间: 2023-11-03 07:21:09 浏览: 93
Vue $emit $refs子父组件间方法的调用实例
使用$refs调用子组件的方法的示例代码中,通过this.$refs.twoChildrenRef.showMessage()可以调用子组件的showMessage方法。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [vue中的$refs(父访子)——访问子组件数据+方法](https://blog.csdn.net/qq_22472619/article/details/129791070)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]
阅读全文