vue组件的声明语法:

Vue.component('component-name',{

template:'<p>段落{{prop1}} {{prop2}}</p>',

data:function(){

return {prop1:'aa',prop2:'bb'}

},

methods:{

fn1:function(){},

fn2:function(){}

},

props:['value','label','custom'],

render:function(createElement){

return createElement('div','hello,world')

}

})

04-26 12:08