在一個子組件中調用另一個子組件的方法

// 在父組件中中轉
<headNav @onSend="onSend"></headNav>
<Reading ref="reading"></Reading>


methods: {
  onSend () {
    this.$refs.reading.onSend()
   }
},

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章