Commit 9e24a61b by 胡悦

Merge branch 'v1.0.7' of http://192.168.3.233:8090/glsx/gl_tape into v1.0.7

2 parents f89e3d1a e1795ae9
......@@ -138,7 +138,7 @@ export default {
const carList = uni.getStorageSync(`${e.id}_${e.brandId}_carlist`)
if (carList) {
this.carlist = carList
if (auto && carList.length) this.handleSelect(res[0])
if (auto && carList.length) this.handleSelect(carList[0])
else this.$refs.carBoxVisible.open()
}
})
......
......@@ -98,6 +98,7 @@ export default {
return {
drawStatus: false,
startX: null,
startY: null,
screenWidth: null
};
},
......@@ -162,7 +163,10 @@ export default {
if (this.type != 'preview') this.drawStatus = !this.drawStatus
},
touchStart (e) {
if (!this.drawStatus && e.changedTouches?.length) this.startX = e.changedTouches[0].pageX
if (!this.drawStatus && e.changedTouches?.length) {
this.startX = e.changedTouches[0].pageX
this.startY = e.changedTouches[0].pageY
}
},
touchEnd (e) {
try {
......@@ -172,9 +176,10 @@ export default {
touch = e.changedTouches[0],
isDistanceSignificant = Math.abs(touch.pageX - startX) > screenWidth / 3,
index = toolList.findIndex(item => item.id == id)
if(Math.abs(this.startY - touch.pageY) > 100) return
if (isDistanceSignificant && index != -1) {
const nextId = this.getNextId(index, toolList, startX, halfScreenWidth)
// this.$emit('update:id', nextId)
this.$emit('update:id', nextId)
}
} catch (error) {
console.log(error)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!