Skip to content

Commit

Permalink
fix(ui/counter): fix the bug that the long-press event of the counter…
Browse files Browse the repository at this point in the history
… component does not take effect
  • Loading branch information
ayangweb committed Mar 17, 2022
1 parent aca8be6 commit cc35d33
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/varlet-vue2-ui/src/counter/Counter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
disabled: !ripple || disabled || readonly || disableDecrement || !decrementButton || isMin,
}"
@click="decrement"
@touchstart="pressDecrement"
@touchend="releaseDecrement"
@touchcancel="releaseDecrement"
@touchstart.native="pressDecrement"
@touchend.native="releaseDecrement"
@touchcancel.native="releaseDecrement"
/>
<input
class="var-counter__input"
Expand All @@ -48,9 +48,9 @@
disabled: !ripple || disabled || readonly || disableIncrement || !incrementButton || isMax,
}"
@click="increment"
@touchstart="pressIncrement"
@touchend="releaseIncrement"
@touchcancel="releaseIncrement"
@touchstart.native="pressIncrement"
@touchend.native="releaseIncrement"
@touchcancel.native="releaseIncrement"
/>
</div>

Expand Down
3 changes: 3 additions & 0 deletions packages/varlet-vue2-ui/src/icon/Icon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,11 @@ export default defineComponent({
methods: {
toSizeUnit,
isURL,
toNumber,
onClickIcon() {
this.getListeners().onClick?.()
},
Expand Down

0 comments on commit cc35d33

Please sign in to comment.