cyl/dev
parent
ac6a23d28c
commit
bf9758043c
@ -0,0 +1,113 @@
|
||||
<template>
|
||||
<!-- 推广卡片 -->
|
||||
<div class="promotion-page">
|
||||
<div class="link" @mouseleave="handleModel">
|
||||
<div class="item g_flex_row_between"
|
||||
v-for="(item,index) in list" :key="index"
|
||||
@mouseenter="handleEnter(item,index)"
|
||||
@mouseleave="handleLeave(item,index)"
|
||||
:class="index == active ? 'item-active' : ''"
|
||||
>
|
||||
<div class="item-logo g_flex_none">
|
||||
<img src="../../../../static/img/gyl.jpg" class="img" />
|
||||
</div>
|
||||
<div class="item-title g_flex_1 g_flex_column_center">
|
||||
<div class="title-text">{{item.title}}</div>
|
||||
<div class="title-subtext">{{ item.subtitle }}</div>
|
||||
</div>
|
||||
<div class="mock"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'promotion',
|
||||
data() {
|
||||
return {
|
||||
active:-1,
|
||||
list:[
|
||||
{
|
||||
logo:'../../../../static/img/gyl.jpg',
|
||||
title:'扫描二维码',
|
||||
subtitle:'打开「伯才供应链」小程序'
|
||||
},
|
||||
{
|
||||
logo:'../../../../static/img/gyl.jpg',
|
||||
title:'扫描二维码',
|
||||
subtitle:'添加专属客户经理企业微信'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleEnter($item,$index){
|
||||
if($index == 0){
|
||||
this.active = 1
|
||||
}else{
|
||||
this.active = 0
|
||||
}
|
||||
},
|
||||
handleLeave($item,$index){
|
||||
if($index == 0){
|
||||
this.active = 1
|
||||
}else{
|
||||
this.active = 0
|
||||
}
|
||||
},
|
||||
handleModel(){
|
||||
this.active = -1
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.promotion-page{
|
||||
.link{
|
||||
.item{
|
||||
border-radius: 8px;
|
||||
box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 0px;
|
||||
// border: 1px solid #dcdcdc;
|
||||
padding: 16px;
|
||||
background-color: #fff;
|
||||
margin-bottom: 12px;
|
||||
transition: all 0.2s;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
.item-logo{
|
||||
margin-right: 12px;
|
||||
.img{
|
||||
width: 90px;
|
||||
height: 90px;
|
||||
}
|
||||
}
|
||||
.item-title{
|
||||
.title-text,.title-subtext{
|
||||
color: #7f7f7f;
|
||||
font-size: 14px;
|
||||
line-height: 2;
|
||||
}
|
||||
}
|
||||
.mock{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 122px;
|
||||
backdrop-filter: blur(0px);
|
||||
border-radius: 8px;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
}
|
||||
.item-active{
|
||||
box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
|
||||
transform: scale(1.01);
|
||||
.mock{
|
||||
backdrop-filter: blur(3px);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue