打赏

$refs 返回值

1、若ref属性在普通dom元素上返回dom元素。

2、若ref也有在组件上,返回组件的示例。

 

<!-- `vm.$refs.p` will be the DOM node -->
<p ref="p">hello</p>

<!-- `vm.$refs.child` will be the child component instance -->
<child-component ref="child"></child-component>

 

posted @ 2020-05-25 15:31  孟繁贵  阅读(570)  评论(0编辑  收藏  举报
TOP