chore(touch): add isVertical/isHorizontal

This commit is contained in:
chenjiahan
2020-09-14 20:56:28 +08:00
parent 46e158fa01
commit c8d573cbe7
7 changed files with 18 additions and 12 deletions

View File

@@ -210,7 +210,7 @@ export default createComponent({
const onTouchMove = (event) => {
touch.move(event);
if (touch.direction.value === 'vertical') {
if (touch.isVertical()) {
preventDefault(event);
const { clientX, clientY } = event.touches[0];