mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-23 09:52:57 +08:00
chore(Button): inherit touchstart event
This commit is contained in:
parent
6d3ce89502
commit
322db54c77
@ -44,7 +44,7 @@ export default createComponent({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
emits: ['click', 'touchstart'],
|
emits: ['click'],
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
onClick() {
|
onClick() {
|
||||||
@ -54,10 +54,6 @@ export default createComponent({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onTouchstart(event) {
|
|
||||||
this.$emit('touchstart', event);
|
|
||||||
},
|
|
||||||
|
|
||||||
genContent() {
|
genContent() {
|
||||||
const Content = [];
|
const Content = [];
|
||||||
|
|
||||||
@ -144,7 +140,6 @@ export default createComponent({
|
|||||||
type={this.nativeType}
|
type={this.nativeType}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
onClick={this.onClick}
|
onClick={this.onClick}
|
||||||
onTouchstart={this.onTouchstart}
|
|
||||||
>
|
>
|
||||||
<div class={bem('content')}>{this.genContent()}</div>
|
<div class={bem('content')}>{this.genContent()}</div>
|
||||||
</tag>
|
</tag>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user