vue插槽與父子組件傳值

1.父子組件之間的傳值 子組件傳值到父組件 子組件在向父組件傳值的時候,主要是經過子組件經過$emit()函數派發出事件,而後再父組件中經過事件監聽:函數 //好比定義了一個子組件<i-button> <template> <button @click="handleClick"> <slot></slot> </button> </template> <script> exp
相關文章
相關標籤/搜索