diff --git a/client/components/share/NumInput.vue b/client/components/share/NumInput.vue index ebc1cdc9..5b816c60 100644 --- a/client/components/share/NumInput.vue +++ b/client/components/share/NumInput.vue @@ -10,23 +10,30 @@ @@ -65,6 +72,7 @@ export default @Component({ class NumInput extends NumInputProps { filteredValue = 0; error = false; + t = ''; created() { this.mask = '#'.repeat(this.max.toString().length); @@ -117,9 +125,27 @@ class NumInput extends NumInputProps { } onMouseUp() { + if (this.inTouch) + return; this.startClickRepeat = false; this.clickRepeat = false; } + + onTouchStart(event, way) { + if (!this.$isMobileDevice) + return; + if (event.touches.length == 1) { + this.inTouch = true; + this.onMouseDown({button: 0}, way); + } + } + + onTouchEnd() { + if (!this.$isMobileDevice) + return; + this.inTouch = false; + this.onMouseUp(); + } } //-----------------------------------------------------------------------------