nk-shop2.0/components/activityHome.vue

62 lines
1.2 KiB
Vue
Raw Normal View History

2024-01-18 17:45:52 +08:00
<template>
<view class="a_h_home">
<view class="a_h_body" v-if="show">
2024-01-26 13:58:33 +08:00
<image @click.stop="open()" class="a_h_bg" mode="widthFix" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/tow_price_card.webp"></image>
2024-01-25 11:01:27 +08:00
<image v-if="showClose" @click.stop="close()" class="a_h_close" src="../static/images/wt_close.png"></image>
2024-01-18 17:45:52 +08:00
</view>
</view>
</template>
<script>
export default {
2024-01-25 11:01:27 +08:00
props:{
showClose: {
type: Boolean,
default: true
}
},
2024-01-18 17:45:52 +08:00
data(){
return {
show: true
}
},
methods:{
open(){
2024-01-23 11:36:51 +08:00
this.$emit('click');
2024-01-18 17:45:52 +08:00
},
close(){
this.show = false;
}
}
}
</script>
<style lang="scss">
.a_h_home{
position: fixed;
2024-01-23 11:36:51 +08:00
bottom: 25vh;
2024-01-18 17:45:52 +08:00
right: 30rpx;
2024-01-23 11:36:51 +08:00
z-index: 10;
width: 180rpx;
// height: 150rpx;
2024-01-18 17:45:52 +08:00
.a_h_bg{
height: 100%;
width: 100%;
}
.a_h_body{
width: 100%;
height: 100%;
// background-color: #eee;
position: relative;
.a_h_close{
position: absolute;
right: 5rpx;
top: 5rpx;
width: 30rpx;
height: 30rpx;
2024-01-23 11:36:51 +08:00
background-color: rgba(#000, 0.4);
border-radius: 50%;
2024-01-18 17:45:52 +08:00
}
}
}
</style>