【home 组件】

1. 功能实现
pull/1/MERGE
YunaiV 2023-06-27 22:43:47 +08:00
parent b1da35a040
commit afad547b14
1 changed files with 8 additions and 17 deletions

View File

@ -2,18 +2,16 @@
<view style="touch-action: none;">
<view class="home" style="position:fixed;" :style="{ top: top + 'px'}" id="right-nav" @touchmove.stop.prevent="setTouchMove">
<view class="homeCon bg-color-red" :class="homeActive === true ? 'on' : ''" v-if="homeActive">
<navigator hover-class='none' url='/pages/index/index' open-type='switchTab' class='iconfont icon-shouye-xianxing'></navigator>
<navigator hover-class='none' url='/pages/order_addcart/order_addcart' open-type='switchTab' class='iconfont icon-caigou-xianxing'></navigator>
<navigator hover-class='none' url='/pages/user/index' open-type='switchTab' class='iconfont icon-yonghu1'></navigator>
<navigator hover-class='none' url='/pages/index/index' open-type='switchTab'
class='iconfont icon-shouye-xianxing' />
<navigator hover-class='none' url='/pages/order_addcart/order_addcart' open-type='switchTab'
class='iconfont icon-caigou-xianxing' />
<navigator hover-class='none' url='/pages/user/index' open-type='switchTab'
class='iconfont icon-yonghu1' />
</view>
<view @click="open" class="pictrueBox">
<view class="pictrue">
<image :src="
homeActive === true
? '/static/images/close.gif'
: '/static/images/open.gif'
"
class="image" />
<image :src="homeActive === true ? '/static/images/close.gif' : '/static/images/open.gif'" class="image" />
</view>
</view>
</view>
@ -34,12 +32,8 @@
computed: mapGetters(["homeActive"]),
methods: {
setTouchMove(e) {
var that = this;
if (e.touches[0].clientY < 545 && e.touches[0].clientY > 66) {
that.top = e.touches[0].clientY
// that.setData({
// top: e.touches[0].clientY
// })
this.top = e.touches[0].clientY
}
},
open: function() {
@ -47,12 +41,9 @@
this.$store.commit("CLOSE_HOME") :
this.$store.commit("OPEN_HOME");
}
},
created() {
}
};
</script>
<style scoped>
.pictrueBox {
width: 130rpx;