本文介绍了vue.js $refs和$emit 父子组件交互的方法,分享给大家,废话不多说直接看代码:
<strong>父调子 $refs (把父组件的数据传给子组件) </strong><br><br><template>
<div id=app>
<input type=button name= id= @click=parentCall value=父调子 />
<hello ref=chil>//hello组件
</div>
</template>
[removed]
import hello from './components/Hell