vue简单的全局组件案例component template

<div id="app">
<assembly></assembly>
</div>

<script type="text/javascript">
Vue.component("assembly",{
template:"<div>前端菜鸟组件!</div>"
})
new Vue({
el:"#app"
})

</script>

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: