a***@126.com
a***@126.com
  • 发布:2018-10-02 15:27
  • 更新:2018-10-07 12:06
  • 阅读:1490

自定义组件引入显示的是标签

分类:uni-app

为什么2个引入一样的方法,第一个显示了引入的内容,第二个却把标签显示出来了,而不是显示引入的内容呢?

import Vue from 'vue'  
import App from './App'  
/*导入的组件*/  
import indexlb from '/components/indexlb.vue'  
import pageBzbk from './components/bzbk.vue'  

/*引用组件声明*/  

Vue.component('page-bzbk',pageBzbk)  
Vue.component('page-indexlb',indexlb)  

Vue.config.productionTip = false  

App.mpType = 'app'  

const app = new Vue({  
    ...App  
})  
app.$mount()  
<template name="page-indexlb">  
    <view>  
        <view class="page-body">  
            <view class="page-section page-section-spacing swiper">  
                <swiper :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration" :circular="circular">  
                    <bclok v-for="(value, index) in data" :key="index">  
                    <swiper-item>  
                        <view class="swiper-item color1">  
                            <image :src="value.images" mode=""></image>  
                        </view>  
                    </swiper-item>  
                    </bclok>  
                </swiper>  
            </view>  
        </view>  
    </view>  
</template>  

<script>  
    export default {  
        data(){  
            return{  
                title: 'swiper',  
                background: ['color1', 'color2', 'color3'],  
                indicatorDots: true,  
                autoplay: true,  
                interval: 2000,  
                duration: 500,  
                circular:true,  
                name: "page-indexlb",  
                data:[  
                    {  
                        id:'1',  
                        images:'../../static/20181001_01.jpg'  
                    },  
                    {  
                        id:'2',  
                        images:'../../static/20181001_01.jpg'  
                    },  
                    {  
                        id:'3',  
                        images:'../../static/20181001_01.jpg'  
                    }  
                ]  
            }  
        }  
    }  
</script>  

<style>  

</style>  
2018-10-02 15:27 负责人:无 分享
已邀请:
DCloud_UNI_GSQ

DCloud_UNI_GSQ

检查一下命名,重新运行试一下

该问题目前已经被锁定, 无法添加新回复