fix(Rate、Slider): avoid Vue 2.6 event bubble issues (#5350)

This commit is contained in:
neverland
2019-12-22 12:29:14 +08:00
committed by GitHub
parent c3685ac7c1
commit cd6050d3e4
3 changed files with 24 additions and 14 deletions
+5 -2
View File
@@ -61,8 +61,11 @@ export const TouchMixin = Vue.extend({
const { onTouchStart, onTouchMove, onTouchEnd } = (this as any);
on(el, 'touchstart', onTouchStart);
on(el, 'touchmove', onTouchMove);
on(el, 'touchend', onTouchEnd);
on(el, 'touchcancel', onTouchEnd);
if (onTouchEnd) {
on(el, 'touchend', onTouchEnd);
on(el, 'touchcancel', onTouchEnd);
}
}
}
});