
Sending Data into a component requires Prop, Sending data out of Component requires Emit

Data Exchange between sibling component is achieved by Central Event Bus. Complicated sibling component data changes uses VueX
component包含 Template, Data, props, methods ?其中Template是必須要的

Register component

install component




如果要從data() 里使用props的值: this.prop
send data out of component:

v-bind和v-model都是讓external data進(jìn)入的




經(jīng)典啊????????
這里是一個(gè)使用event驅(qū)動(dòng)emit 函數(shù) 把數(shù)據(jù)從component.data傳遞到Vue.data里的例子。這個(gè)例子展現(xiàn)了傳入component以及傳出component

首先Input的地方用v-model 和component.message綁定起來。 這樣數(shù)據(jù)傳入了component里。
然后定義Event: v-on: click='send' ?調(diào)用了this.$emit()。 this.emit把message傳入Vue.content里 通過v-on:relay='function' 這個(gè)Tag。 content注意! 在P tag里refer了。。。 {{content}}
V-model = V-bind + V-on


同時(shí)send Multiple data

Sibling components communication?



