Vuejs2 组件仅呈现元素名称而不是模板内容

Vuejs2 组件仅呈现元素名称而不是模板内容,vuejs2,Vuejs2,我刚开始使用Vue,遇到一个问题,组件无法为我渲染 <template> <div> <GalleryCollectionBlueBottles /> </div> </template> <script> import GalleryCollectionBlueBottles from '@/components/collections/GalleryCollectionBl

我刚开始使用Vue,遇到一个问题,组件无法为我渲染

<template>

    <div>
        <GalleryCollectionBlueBottles />
    </div>

</template>

<script>

    import GalleryCollectionBlueBottles from '@/components/collections/GalleryCollectionBlueBottles.vue'

    export default {
        name: 'GalleryCollections'
    }

</script>

从“@/components/collections/GalleryCollectionBlueBottles.vue”导入GalleryCollectionBlueBottles
导出默认值{
名称:“GalleryCollections”
}
当我在浏览器中检查页面时,我看到的只是一个带有组件名称的元素,而不是像往常一样的组件内容

上面的组件名为
GalleryCollections
,我要导入的组件名为
GalleryCollectionBlueBottles


希望有人能帮上忙,也希望这是我忽略的一件简单的事情:)

您还需要在脚本标记中的关键字components{…}like中声明组件


从“@/components/collections/GalleryCollectionBlueBottles.vue”导入GalleryCollectionBlueBottles
导出默认值{
名称:'GalleryCollections',
组成部分:{
厨房收藏蓝瓶
}
}

您还需要在关键字components{…}like中声明脚本标记内的组件


从“@/components/collections/GalleryCollectionBlueBottles.vue”导入GalleryCollectionBlueBottles
导出默认值{
名称:'GalleryCollections',
组成部分:{
厨房收藏蓝瓶
}
}