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
+1 -1
View File
@@ -121,7 +121,7 @@ export default createComponent({
touch.move(event);
if (touch.direction.value === 'horizontal') {
if (touch.isHorizontal()) {
const { clientX } = event.touches[0];
preventDefault(event);
select(getScoreByPosition(clientX));