vue2,做tab,結合以前和新文檔的寫法:可以看出1.0版本和2.0版本的寫法幾乎沒什么改變,然后就是2.0不用extand了,直接用組件語法糖注冊。然后下面這是我的代碼: <!--...-->
<component :is="cpmt" :fData="propsMsg"></component>
<!--...--> var vContent = new Vue({ el:'#content', data:{
cpmt:'summary', propsMsg:'',
...
}, components: {
summary: {
template: '<div>ss</div>',
props: ['fData'],
}
}
...
})然后在兩個版本的表現下截然相反。。。 先截個2.0的圖:然后是1.026的圖:這究竟是怎么回事?到底哪里有錯誤?
各位大佬好,問一個關于vuejs 2.0的 componnet的問題
天涯盡頭無女友
2018-09-12 09:38:25