mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-22 06:31:45 +08:00
fix(NumberKeyboard): avoid Vue 2.6 event bubble issues (#5349)
This commit is contained in:
parent
e037082feb
commit
c3685ac7c1
@ -38,6 +38,10 @@ export default createComponent({
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.bindTouchEvent(this.$el);
|
||||
},
|
||||
|
||||
methods: {
|
||||
onTouchStart(event) {
|
||||
// compatible with Vue 2.6 event bubble bug
|
||||
@ -65,15 +69,7 @@ export default createComponent({
|
||||
|
||||
render() {
|
||||
return (
|
||||
<i
|
||||
role="button"
|
||||
tabindex="0"
|
||||
class={[BORDER, this.className]}
|
||||
onTouchstart={this.onTouchStart}
|
||||
onTouchmove={this.onTouchMove}
|
||||
onTouchend={this.onTouchEnd}
|
||||
onTouchcancel={this.onTouchEnd}
|
||||
>
|
||||
<i role="button" tabindex="0" class={[BORDER, this.className]}>
|
||||
{this.slots('default') || this.text}
|
||||
</i>
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user