new?Vue({//爺爺
el:"#example-2",
????????? components:?{
????'u-component':??{//兒子
template:?'<div><mini-child?v-bind:display="display"?v-bind:message="message"></mini-child>A?custom?component!</div>',
?? data:{
?? display:true,
?? message:"Message?in?parent"
?? },
components:{
?? "mini-child":?{//孫子
template:'<div>一個孫子<p?v-if="display">!!!!</p>{{message}}</div>',
props:["display","message"]
}
?? }
}
}
})vue.js:435?[Vue?warn]:?The?"data"?option?should?be?a?function?that?returns?a?per-instance?value?in?component?definitions.warn?@?vue.js:435
vue.js:435?[Vue?warn]:?Property?or?method?"display"?is?not?defined?on?the?instance?but?referenced?during?render.?Make?sure?to?declare?reactive?data?properties?in?the?data?option.
found?in
--->?<UComponent>
???????<Root>warn?@?vue.js:435
vue.js:435?[Vue?warn]:?Property?or?method?"message"?is?not?defined?on?the?instance?but?referenced?during?render.?Make?sure?to?declare?reactive?data?properties?in?the?data?option.
found?in
--->?<UComponent>
???????<Root>求幫幫,這個是什么問題呢?
vue.js 三層父子組件通信
暴躁的代碼
2017-06-05 22:19:02