<template>
    <div class="imgNewsBigBox">
        <div v-if="templateData[0].component_style.toString()=='1'">
            <news1Style 
                :titleLink="componentTitle1" 
                :templateData="templateData[0].componentData.data"
                :skinId="skinId"
            />
        </div>
        <div v-if="templateData[0].component_style.toString()=='2'">
            <news2Style 
                :titleLink="componentTitle1" 
                :templateData="templateData[0].componentData.data"
                :skinId="skinId"
            />
        </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[0].componentData.data.alias,
    aLIas_pinyin:props.templateData[0].componentData.data.pinyin,
    is_url: props.templateData[0].componentData.data.is_url ?? 0,//如果is_url为空 则默认为0
    children_count: props.templateData[0].componentData.data.children_count ?? 0,//如果children_count为空 则默认为0
    cid:props.templateData[0].componentData.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>