<template>
    <div class="imgNewsBigBox">
        <div v-if="templateData.componentList[0].component_style == 1">
            <!-- <news1Style :name="this.$store.state.template.pageData.class[dataSort].content.componentList[0].componentData.name"/> -->
            <news1Style 
                v-if="templateData.componentList[0].data.text.length > 0" 
                :titleLink="componentTitle1" 
                :templateData="templateData.componentList[0].data"
                :skinId="skinId"
            />
            <nodata v-else :dataStyle="2" :dataWidth="720" :dataHeight="440" />
        </div>
        <div v-if="templateData.componentList[0].component_style == 2">
            <news2Style :name="this.$store.state.template.pageData.class[dataSort].content.componentList[0].componentData.name"/>
        </div>
    </div>
</template>

<script setup>
//样式1
import news1Style from '@/components/template/component/list/1200x410/1.vue'
//样式2
import news2Style from '@/components/template/component/list/1200x410/2.vue'
//暂无数据
import nodata from '@/components/template/component/public/nodata.vue'
//引入vue
import {ref} from 'vue';

const props = defineProps({
    skinId: Number,//皮肤id
    templateData:Object,//新闻数据
});
//该通栏下只有一个组件
const componentTitle1 = {
    alias:props.templateData.componentList[0].data.alias,
    aLIas_pinyin:props.templateData.componentList[0].data.pinyin,
    is_url: props.templateData.componentList[0].data.is_url,
    children_count: props.templateData.componentList[0].data.children_count,
    cid:props.templateData.componentList[0].data.category_id
}
</script>

<style lang="less" scoped>
.imgNewsBigBox{
    width: 1200px;
    height: 410px;
    position: relative;
    margin: 0 auto;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: content-box;
    
}
</style>