2020
10-09
10-09
基于Vue全局组件与局部组件的区别说明
1、组件声明<!--全局组件模板father模板--><templateid="father"><div><h3>这是{{name}}</h1><div><p>这是{{data}}</p></div></div></template>varFATHER={template:"#father",data:function(){return{name:"一个全局组件-模板-",data:"数据:18892087118"}}};2、组件注册Vue.component('father',FATHER);3、组件挂载<h5>全局组件1</h5><father></father...
继续阅读 >