dengjie commit : 部分修改样式

This commit is contained in:
clay
2022-10-04 23:03:23 +08:00
parent dd6798e8ce
commit a372dff77c
13 changed files with 209 additions and 318 deletions

View File

@@ -3,23 +3,23 @@
<ul class="ul">
<li v-for="(item,index) in bannerDate" :key="index">
<div v-if="$i18n.locale === 'cn'" @click="clickTo(item.link)">
<div class="card_img" >
<div class="card_img">
<img
:src="item.imgurl"
alt=""/>
</div>
<div class="card_title">
{{item.title}}
{{ item.title }}
</div>
</div>
<div v-if="$i18n.locale === 'en'" @click="clickTo(item.enLink)">
<div class="card_img" >
<div class="card_img">
<img
:src="item.imgurl"
alt=""/>
</div>
<div class="card_title">
{{item.enTitle}}
{{ item.enTitle }}
</div>
</div>
</li>
@@ -46,7 +46,7 @@ export default {
//默认值
classArray: ["one", "two", "three", "four", "five", "six"],
// classArray: ["one", "two", "three", "four", "five"],
leftSlider: true,
leftSlider: true
},
bannerWrap: null,
time: null,
@@ -54,20 +54,20 @@ export default {
classlist: null,
leftBtn: null,
rightBtn: null,
bannerDate:[]
bannerDate: []
};
},
beforeCreate() {
banner("STCplDRCWAA3zcFE0EBTcQI").then(res=>{
this.bannerDate = res.data
})
banner("STCplDRCWAA3zcFE0EBTcQI").then(res => {
this.bannerDate = res.data;
});
},
created() {
},
methods: {
clickTo(link){
clickTo(link) {
//console.log(link)
window.location.href=link;//当前标签页
window.location.href = link;//当前标签页
},
constructor() {
this.bannerWrap = document.getElementsByClassName("banner-card")[0];
@@ -127,13 +127,13 @@ export default {
this.rightBtn.addEventListener("click", () => {
this.rightMove();
});
},
}
},
mounted() {
setTimeout(() =>{
setTimeout(() => {
this.constructor();
},1000);
},
}, 1000);
}
};
</script>
@@ -141,7 +141,7 @@ export default {
.banner-card {
width: 100%;
height: 50rem;
height: 29.4rem;
//background: #f5f5f5;
position: relative;
@@ -156,8 +156,8 @@ export default {
li {
border-radius: 2rem;
width: 40rem;
height: 40rem;
width: 26.5rem;
height: 25.4rem;
position: absolute;
top: 2.5rem;
list-style-type: none;
@@ -187,8 +187,8 @@ export default {
text-align: left;
//width: 36rem;
margin: 2rem auto;
overflow:hidden; //超出的文本隐藏
text-overflow:ellipsis; //溢出用省略号显示
overflow: hidden; //超出的文本隐藏
text-overflow: ellipsis; //溢出用省略号显示
display: -webkit-box; //作为弹性伸缩盒子模型显示。
-webkit-box-orient: vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
-webkit-line-clamp: 2; //显示的行