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')

}

})

 

相关文章:

  • 2022-12-23
  • 2021-06-20
  • 2021-11-05
  • 2022-01-09
  • 2022-12-23
  • 2021-06-29
  • 2021-08-09
猜你喜欢
  • 2022-02-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-17
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案