<template>
    <view>
        <block v-for="(item,index) in corecmsdata" :key="index">
            <!--搜索（修复）-->
            <corecmssearch :corecmsdata="item" v-if="item.widgetCode=='search' "></corecmssearch>
            <!--切换-->
            <corecmstabbar :corecmsdata="item" v-if="item.widgetCode=='tabBar' "></corecmstabbar>
            <!--公告（修复）-->
            <corecmsnotice :corecmsdata="item" v-if="item.widgetCode=='notice' "></corecmsnotice>
            <!--图片轮播（修复）-->
            <corecmsimgSlide :corecmsdata="item" v-if="item.widgetCode=='imgSlide' "></corecmsimgSlide>
            <!--优惠券（修复）-->
            <corecmscoupon :corecmsdata="item" v-if="item.widgetCode=='coupon' "></corecmscoupon>
            <!--空格（修复）-->
            <corecmsblank :corecmsdata="item" v-if="item.widgetCode=='blank' "></corecmsblank>
            <!--多行文本输入区（修复）-->
            <corecmstextarea :corecmsdata="item" v-if="item.widgetCode=='textarea' "></corecmstextarea>
            <!--视频（修复）-->
            <corecmsvideo :corecmsdata="item" v-if="item.widgetCode=='video' "></corecmsvideo>
            <!--图片集（修复）-->
            <corecmsimgWindow :corecmsdata="item" v-if="item.widgetCode=='imgWindow' "></corecmsimgWindow>
            <!--图片--（修复）-->
            <corecmsimgSingle :corecmsdata="item" v-if="item.widgetCode=='imgSingle' "></corecmsimgSingle>
            <!--商品（修复）-->
            <corecmsgoods :corecmsdata="item" v-if="item.widgetCode=='goods' "></corecmsgoods>
            <!--文章（修复）-->
            <corecmsarticle :corecmsdata="item" v-if="item.widgetCode=='article' "></corecmsarticle>
            <!--文章分类（修复）-->
            <corecmsarticleClassify :corecmsdata="item" v-if="item.widgetCode=='articleClassify' "></corecmsarticleClassify>
            <!--宫格自定义导航（修复）-->
            <corecmsnavBar :corecmsdata="item" v-if="item.widgetCode=='navBar' "></corecmsnavBar>
            <!--团购（修复）-->
            <corecmsgroupPurchase :corecmsdata="item" v-if="item.widgetCode=='groupPurchase' "></corecmsgroupPurchase>
            <!--浏览记录（修复）-->
            <corecmsrecord :corecmsdata="item" v-if="item.widgetCode=='record' "></corecmsrecord>
            <!--拼团（修复）-->
            <corecmspinTuan :corecmsdata="item" v-if="item.widgetCode=='pinTuan' "></corecmspinTuan>
            <!--服务（修复）-->
            <corecmsservice :corecmsdata="item" v-if="item.widgetCode=='service' "></corecmsservice>
            <!--弹窗广告-->
            <corecmsadpop :corecmsdata="item" v-if="item.widgetCode=='adpop' "></corecmsadpop>
            <!--文本内容（修复）-->
            <corecmsContent :corecmsdata="item" v-if="item.widgetCode=='content' "></corecmsContent>
        </block>
    </view>
</template>

<script>
    import corecmsimgSlide from '@/components/corecms-page/corecms-imgSlide.vue'
    import corecmssearch from '@/components/corecms-page/corecms-search.vue'
    import corecmsnotice from '@/components/corecms-page/corecms-notice.vue'
    import corecmscoupon from '@/components/corecms-page/corecms-coupon.vue'
    import corecmsblank from '@/components/corecms-page/corecms-blank.vue'
    import corecmstextarea from '@/components/corecms-page/corecms-textarea.vue'
    import corecmsvideo from '@/components/corecms-page/corecms-video.vue'
    import corecmsimgWindow from '@/components/corecms-page/corecms-imgWindow.vue'
    import corecmsimgSingle from '@/components/corecms-page/corecms-imgSingle.vue'
    import corecmsgoods from '@/components/corecms-page/corecms-goods.vue'
    import corecmsarticle from '@/components/corecms-page/corecms-article.vue'
    import corecmsarticleClassify from '@/components/corecms-page/corecms-articleClassify.vue'
    import corecmsnavBar from '@/components/corecms-page/corecms-navBar.vue'
    import corecmsgroupPurchase from '@/components/corecms-page/corecms-groupPurchase.vue'
    import corecmsrecord from '@/components/corecms-page/corecms-record.vue'
    import corecmspinTuan from '@/components/corecms-page/corecms-pinTuan.vue'
    import corecmsservice from '@/components/corecms-page/corecms-service.vue'
    import corecmstabbar from '@/components/corecms-page/corecms-tabbar.vue'
    import corecmsadpop from '@/components/corecms-page/corecms-adpop.vue'
    import corecmsContent from '@/components/corecms-page/corecms-content.vue'

    export default {
        name: 'corecmsPage',
        components: {
            corecmsimgSlide,
            corecmssearch,
            corecmsnotice,
            corecmscoupon,
            corecmsblank,
            corecmstextarea,
            corecmsvideo,
            corecmsimgWindow,
            corecmsimgSingle,
            corecmsgoods,
            corecmsarticle,
            corecmsarticleClassify,
            corecmsnavBar,
            corecmsgroupPurchase,
            corecmsrecord,
            corecmspinTuan,
            corecmsservice,
            corecmstabbar,
            corecmsadpop,
            corecmsContent
        },
        props: {
            corecmsdata: {
                default: function () {
                    return []
                }
            }
        }
    }
</script>
