123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <template>
- <!--皮肤1和皮肤2的 第二个样式是一样的-->
- <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>
- <!--皮肤1和皮肤2的 第二个样式是一样的-->
- <div class="BannerListBoxStyle1" 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;
- font-size:18px;
- color: #333;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- height:26px;
- line-height: 26px;
- margin-bottom: 16px;
- a {
- color: #333;
- }
- &:nth-child(1),&:nth-child(6){
- a {
- color: #333333;
- font-weight: bold;
- }
- }
- &:last-child {
- margin-bottom: 0;
- }
- }
- }
- </style>
|