|
@@ -1,5 +1,74 @@
|
|
<template>
|
|
<template>
|
|
- 1111
|
|
|
|
|
|
+ <div class="listNewsBox">
|
|
|
|
+ <div class="listNewsTitle" v-if="skinId==1">
|
|
|
|
+ <NuxtLink
|
|
|
|
+ v-if="titleLink.cid"
|
|
|
|
+ :href="getLinkPath(titleLink)"
|
|
|
|
+ :title="titleLink.alias"
|
|
|
|
+ >
|
|
|
|
+ {{titleLink.alias}}
|
|
|
|
+ </NuxtLink>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="listNewsTitle_skin2" v-if="skinId==2">
|
|
|
|
+ <span>
|
|
|
|
+ <NuxtLink
|
|
|
|
+ v-if="titleLink.cid"
|
|
|
|
+ :href="getLinkPath(titleLink)"
|
|
|
|
+ :title="titleLink.alias"
|
|
|
|
+ >
|
|
|
|
+ {{titleLink.alias}}
|
|
|
|
+ </NuxtLink>
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="listNewsContent">
|
|
|
|
+ <div class="listNewsContentItem">
|
|
|
|
+ <div class="listNewsContentItemRight">
|
|
|
|
+ <div v-for="item in component_style1_News2Array">
|
|
|
|
+ <NuxtLink
|
|
|
|
+ :href="getLinkPathDetail(item)"
|
|
|
|
+ :title="item.title"
|
|
|
|
+ :target="item.islink == 1 ? '_blank' : '_self'"
|
|
|
|
+ >
|
|
|
|
+ {{ item.title }}
|
|
|
|
+ </NuxtLink>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="listNewsContentItemLeft" v-for="item in component_style1_News1Array">
|
|
|
|
+ <NuxtLink
|
|
|
|
+ :href="getLinkPathDetail(item)"
|
|
|
|
+ :title="item.title"
|
|
|
|
+ :target="item.islink == 1 ? '_blank' : '_self'"
|
|
|
|
+ >
|
|
|
|
+ <img :src="item.imgurl" />
|
|
|
|
+ <div class="listNewsContentItemLeftTitle">{{ item.title }}</div>
|
|
|
|
+ </NuxtLink>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="listNewsContentItem">
|
|
|
|
+ <div class="listNewsContentItemLeft" v-for="item in component_style1_News1Array_2">
|
|
|
|
+ <NuxtLink
|
|
|
|
+ :href="getLinkPathDetail(item)"
|
|
|
|
+ :title="item.title"
|
|
|
|
+ :target="item.islink == 1 ? '_blank' : '_self'"
|
|
|
|
+ >
|
|
|
|
+ <img :src="item.imgurl" />
|
|
|
|
+ <div class="listNewsContentItemLeftTitle">{{ item.title }}</div>
|
|
|
|
+ </NuxtLink>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="listNewsContentItemRight">
|
|
|
|
+ <div v-for="item in component_style1_News2Array_2">
|
|
|
|
+ <NuxtLink
|
|
|
|
+ :href="getLinkPathDetail(item)"
|
|
|
|
+ :title="item.title"
|
|
|
|
+ :target="item.islink == 1 ? '_blank' : '_self'"
|
|
|
|
+ >
|
|
|
|
+ {{ item.title }}
|
|
|
|
+ </NuxtLink>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
@@ -11,9 +80,120 @@ const props = defineProps({
|
|
templateData:Array,//新闻数据
|
|
templateData:Array,//新闻数据
|
|
skinId:String,//皮肤id
|
|
skinId:String,//皮肤id
|
|
});
|
|
});
|
|
-
|
|
|
|
|
|
+//样式1与样式2共用 start ---------------------------------------->
|
|
|
|
+const component_style1_News1Array = ref({});
|
|
|
|
+const component_style1_News1Array_2 = ref({});
|
|
|
|
+const component_style1_News2Array = ref([]);
|
|
|
|
+const component_style1_News2Array_2 = ref([]);
|
|
|
|
+component_style1_News1Array.value = props.templateData.img.slice(0,1);
|
|
|
|
+component_style1_News1Array_2.value = props.templateData.img.slice(1,2);
|
|
|
|
+component_style1_News2Array.value = props.templateData.text.slice(0,3);
|
|
|
|
+component_style1_News2Array_2.value = props.templateData.text.slice(3,6);
|
|
|
|
+//样式1与样式2共用 end ---------------------------------------->
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
-
|
|
|
|
|
|
+.listNewsBox {
|
|
|
|
+ position: relative;
|
|
|
|
+ .listNewsTitle {
|
|
|
|
+ font-size:22px;
|
|
|
|
+ font-weight:bold;
|
|
|
|
+ height: 40px;
|
|
|
|
+ line-height: 40px;
|
|
|
|
+ border-bottom: 2px solid #004564;
|
|
|
|
+ color:#004564;
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ a {
|
|
|
|
+ color:#004564;
|
|
|
|
+ display: block;
|
|
|
|
+ height: 25px;
|
|
|
|
+ line-height: 25px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .listNewsTitle_skin2 {
|
|
|
|
+ font-size:22px;
|
|
|
|
+ font-weight:bold;
|
|
|
|
+ height: 40px;
|
|
|
|
+ line-height: 40px;
|
|
|
|
+ border-bottom: 2px solid #A91B33;
|
|
|
|
+ color:#A91B33;
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ a {
|
|
|
|
+ color:#A91B33;
|
|
|
|
+ display: block;
|
|
|
|
+ height: 25px;
|
|
|
|
+ line-height: 25px;
|
|
|
|
+ }
|
|
|
|
+ span {
|
|
|
|
+ color:#A91B33;
|
|
|
|
+ height: 25px;
|
|
|
|
+ line-height: 25px;
|
|
|
|
+ border-left: 3px solid #A91B33;
|
|
|
|
+ padding-left: 12px;
|
|
|
|
+ display: block;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .listNewsContent {
|
|
|
|
+ .listNewsContentItem {
|
|
|
|
+ display: flex;
|
|
|
|
+ background: #F9FAFB;
|
|
|
|
+ align-items: flex-start;
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
+ &:last-child {
|
|
|
|
+ margin-bottom: 0;
|
|
|
|
+ }
|
|
|
|
+ .listNewsContentItemLeft {
|
|
|
|
+ width: 170px;
|
|
|
|
+ height: 110px;
|
|
|
|
+ position: relative;
|
|
|
|
+ img {
|
|
|
|
+ display: block;
|
|
|
|
+ width: 170px;
|
|
|
|
+ height: 110px;
|
|
|
|
+ }
|
|
|
|
+ .listNewsContentItemLeftTitle {
|
|
|
|
+ position: absolute;
|
|
|
|
+ bottom: 0;
|
|
|
|
+ z-index: 1;
|
|
|
|
+ width: 100%;
|
|
|
|
+ color: #fff;
|
|
|
|
+ height: 28px;
|
|
|
|
+ background: linear-gradient(0deg, rgba(0, 0, 0, 0.5) 33%, rgba(0, 0, 0, 0) 100%);
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ padding: 0 5px;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
+ white-space: nowrap;
|
|
|
|
+ line-height: 28px;
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .listNewsContentItemRight {
|
|
|
|
+ padding: 10px;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ flex: 1;
|
|
|
|
+ height: 110px;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ div {
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ height: 24px;
|
|
|
|
+ line-height: 24px;
|
|
|
|
+ padding-left: 16px;
|
|
|
|
+ font-size: 18px;
|
|
|
|
+ color:#333333;
|
|
|
|
+ margin-bottom: 10px;
|
|
|
|
+ background: url(http://img.bjzxtw.org.cn/pre/image/png/20250605/1749100871349444.png) no-repeat left center;
|
|
|
|
+ &:last-child {
|
|
|
|
+ margin-bottom: 0;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ a {
|
|
|
|
+ color:#333333;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
</style>
|
|
</style>
|