1.?子傳父
? ? ?父:? ? ? ?<v-on:father="son"><>
? ? ? ? ? ? ? ? son(val){
? ? ? ? ? ? ? ? ?val就是子傳過來的值了
? ? ? ? ? ? ? ? ?}
? ? 子:this.$emit('father',要傳的值)
2.父?jìng)髯?/p>
? ? ?父:? ?<v-bind:currentFlow='currentFlow'? ?v-bind:expertProjects='expertProjects'><>
? ? ?子:props: ['currentFlow', 'expertProjects'],
3.子調(diào)用父的事件
?父:? ? ? ?<v-on:father="son"><>
? ? ? ? ? ? ? ? son(){
? ? ? ? ? ? this.getform()? ? //假設(shè)這是要調(diào)用的父組件的事件
? ? ? ? ? ? ? ? ?}
? ? 子:this.$emit('father')
4.父調(diào)用子事件
? ?<ref="son"><>
? ? 父:? this.$refs.son.showReport()
? ? ?子:showReport(){? ?//假設(shè)這是要調(diào)用的子組件的事件
? ? ?}