页面格式
homo.vue为使用组件的页面,另外四个为组件的页面
注册组件
<script>
import homeAlbum from './home-album.vue';
import homeNew from './home-new.vue';
import homeRecommond from './home-recommond.vue'
import homeCategory from './home-category.vue'
export default{
components:{
homeAlbum,homeNew,homeRecommond,homeCategory
}
}
</script>
使用组件
<template>
<div>
<home-album></home-album>
<home-category></home-category>
<home-new></home-new>
<home-recommond></home-recommond>
</div>
</template>