优化移动端滑动返回

This commit is contained in:
kuaifan 2022-05-12 15:08:58 +08:00
parent ece17b2aee
commit 1d4602db0b

View File

@ -65,7 +65,7 @@ export default {
}, },
touchend() { touchend() {
// //
if (this.x > 90) { if (this.x > 90 && this.show) {
this.onBack(); this.onBack();
} }
this.x = 0 this.x = 0
@ -88,10 +88,8 @@ export default {
this.cacheDrawerOverlay[this.cacheDrawerOverlay.length - 1].close(); this.cacheDrawerOverlay[this.cacheDrawerOverlay.length - 1].close();
return; return;
} }
if (this.show) {
this.goBack(); this.goBack();
} }
}
}, },
}; };
</script> </script>