Commit c05cc0bf by 前端

箭头

1 parent 343e2d2b
......@@ -10,7 +10,7 @@
<!-- 左箭头 end -->
<!-- 右箭头 开始 -->
<div class="right_arrow" v-if="current < 5">
<div class="right_arrow">
<div class="arrow_inner" @click="rightClickEvent">
<img src="@/assets/images/arrow_right.png" class="img" alt="" />
<img src="@/assets/images/arrow_circle.png" class="circle" alt="" />
......@@ -122,4 +122,4 @@ export default {
transform: rotate(360deg);
}
}
</style>
\ No newline at end of file
</style>
......@@ -77,25 +77,25 @@ export default {
this.activeName = data
})
document.addEventListener('touchstart', function (event) {
_this.startX = event.touches[0].pageX
})
// document.addEventListener('touchstart', function (event) {
// _this.startX = event.touches[0].pageX
// })
document.addEventListener('touchmove', function (event) {
_this.moveX = event.touches[0].pageX - _this.startX
})
// document.addEventListener('touchmove', function (event) {
// _this.moveX = event.touches[0].pageX - _this.startX
// })
document.addEventListener('touchend', function () {
let m = _this.moveX
if (m < -30) {
console.log('向左滑动事件被触发!')
// document.addEventListener('touchend', function () {
// let m = _this.moveX
// if (m < -30) {
// console.log('向左滑动事件被触发!')
_this.nextClick()
} else if (m > 30) {
console.log('向右滑动事件被触发!')
_this.prevClick()
}
})
// _this.nextClick()
// } else if (m > 30) {
// console.log('向右滑动事件被触发!')
// _this.prevClick()
// }
// })
},
methods: {
// selectVal(val) {
......@@ -120,9 +120,10 @@ export default {
//this.current = 0
// window.open('https://bi-view.beta.glsx.com.cn/#/home', '_blank')
// return false
this.$router.push({
name: 'boutiqueDetail'
})
// this.$router.push({
// name: 'boutiqueDetail'
// })
index = -1
}
this.transitionName = 'slide-left'
this.current = index + 1
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!