deming/pageC/components/merchant/list-item.vue

61 lines
1.2 KiB
Vue
Raw Normal View History

2020-07-06 01:10:34 +00:00
<template>
<view class="listItem">
2020-08-13 07:41:03 +00:00
<view v-if="type == '2'" class="video-container">
<image :src="url" mode="aspectFill" class="video"></image>
2020-08-20 06:46:57 +00:00
<view class="backs"></view>
2020-08-13 07:41:03 +00:00
<image src="/static/videoPlay.png" mode="aspectFill" class="play-video"></image>
</view>
2020-08-09 10:39:35 +00:00
<image v-else :src="url" mode="aspectFill"></image>
2020-07-06 01:10:34 +00:00
</view>
</template>
<style lang="scss" scoped>
.listItem{
width: 365rpx;
height: 500rpx;
2020-08-09 10:39:35 +00:00
overflow: hidden;
2020-08-13 07:41:03 +00:00
> image {
2020-07-06 01:10:34 +00:00
width: 100%;
height: 100%;
2020-08-09 10:39:35 +00:00
margin-bottom: 20rpx;
2020-07-06 01:10:34 +00:00
}
2020-08-13 07:41:03 +00:00
.video-container {
width: 100%;
height: 100%;
margin-bottom: 20rpx;
position: relative;
.video {
width: 100%;
height: 100%;
}
2020-08-20 06:46:57 +00:00
.backs {
width: 100%;
height: 100%;
position: absolute;
top: 0;
right: 0;
background-color: rgba($color: #000000, $alpha: 0.35);
z-index: 9;
}
2020-08-13 07:41:03 +00:00
.play-video {
position: absolute;
width: 100rpx;
height: 100rpx;
z-index: 19;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
2020-07-06 01:10:34 +00:00
}
</style>
<script>
export default {
name:"listItem",
data(){
return {
}
},
2020-08-20 09:39:30 +00:00
props:['url','type'],
2020-07-06 01:10:34 +00:00
}
</script>