chore: inherit click event

This commit is contained in:
chenjiahan 2020-08-26 14:14:55 +08:00
parent af94c92614
commit 48ff0f85fb
3 changed files with 2 additions and 16 deletions

View File

@ -83,7 +83,6 @@ export default createComponent({
'blur',
'focus',
'clear',
'click',
'keypress',
'click-input',
'click-left-icon',
@ -346,10 +345,6 @@ export default createComponent({
resetScroll();
},
onClick(event) {
this.$emit('click', event);
},
onClickInput(event) {
this.$emit('click-input', event);
},
@ -585,7 +580,6 @@ export default createComponent({
valueClass={bem('value')}
titleClass={[bem('label', labelAlign), this.labelClass]}
arrowDirection={this.arrowDirection}
onClick={this.onClick}
>
<div class={bem('body')}>
{this.genInput()}

View File

@ -26,7 +26,7 @@ export default createComponent({
},
},
emits: ['click', 'close', 'replay'],
emits: ['close', 'replay'],
data() {
return {
@ -163,9 +163,6 @@ export default createComponent({
vShow={this.show}
class={bem({ wrapable: this.wrapable })}
style={barStyle}
onClick={(event) => {
this.$emit('click', event);
}}
>
{LeftIcon()}
<div ref="wrap" class={bem('wrap')} role="marquee">

View File

@ -48,10 +48,6 @@ export default createComponent({
},
methods: {
onClick() {
this.$emit('click');
},
genText() {
const Text = (
<span class={bem('text', { ellipsis: !this.scrollable })}>
@ -76,7 +72,6 @@ export default createComponent({
return (
<div
role="tab"
aria-selected={this.isActive}
class={[
bem({
active: this.isActive,
@ -84,7 +79,7 @@ export default createComponent({
}),
]}
style={this.style}
onClick={this.onClick}
aria-selected={this.isActive}
>
{this.genText()}
</div>