<template>
    <div class="BannerListBoxStyle1" v-if="skinId=='1'">
        <div v-for="item in component_News" :key="item.id">
            <NuxtLink 
                :href="getLinkPathDetail(item)" 
                :title="item.title"
                :target="item.islink == 1 ? '_blank' : '_self'"
            >
                {{ item.title }}
            </NuxtLink>
        </div>
    </div>
    <div class="BannerListBoxStyle1_skin2" v-if="skinId=='2'">
        <div v-for="item in component_News" :key="item.id">
            <NuxtLink 
                :href="getLinkPathDetail(item)" 
                :title="item.title"
                :target="item.islink == 1 ? '_blank' : '_self'"
            >
                {{ item.title }}
            </NuxtLink>
        </div>
    </div>
</template>

<script setup>
//引入vue
import {ref} from 'vue';
//获得新闻数据
const props = defineProps({
    skinId:String,//皮肤编号
    templateData:Array,//新闻数据
});
//获取新闻数据
const component_News = ref(props.templateData);
</script>

<style lang="less" scoped>
.BannerListBoxStyle1 {
    div {
        cursor: pointer;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        height:26px;
        line-height: 26px;
        margin-bottom: 16px;
        a {
            font-size:18px;
            color: #333;
        }
        &:nth-child(1),&:nth-child(6){
            a {
                color: #004564;
                font-weight: bold;
            }
        }
        &:last-child {
            margin-bottom: 0;
        }
    }
}
.BannerListBoxStyle1_skin2 {
    div {
        cursor: pointer;
        font-size:18px;
        color: #333;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        height:26px;
        line-height: 26px;
        margin-bottom: 16px;
        a {
            font-size:18px;
            color: #333;
        }
        &:nth-child(1),&:nth-child(6){
            a {
                color: #A91B33;
                font-weight: bold;
            }
        }
        &:last-child {
            margin-bottom: 0;
        }
    }
}
</style>