2
0
mirror of https://github.com/tenrok/vue2-datepicker.git synced 2026-06-17 21:30:35 +03:00

fix: compatible with mobile click events (#334)

This commit is contained in:
mengxiong10
2021-11-17 10:45:15 +08:00
parent 384dd7b18b
commit 1a45263a0e
+10 -2
View File
@@ -476,10 +476,18 @@ export default {
);
const calendarIcon = this.type === 'time' ? <IconTime /> : <IconCalendar />;
return (
<div class={`${prefixClass}-input-wrapper`} onMousedown={this.openPopup}>
<div
class={`${prefixClass}-input-wrapper`}
onMousedown={this.openPopup}
onTouchstart={this.openPopup}
>
{input}
{this.showClearIcon ? (
<i class={`${prefixClass}-icon-clear`} onMousedown={this.handleClear}>
<i
class={`${prefixClass}-icon-clear`}
onMousedown={this.handleClear}
onTouchstart={this.handleClear}
>
{this.renderSlot('icon-clear', <IconClose />)}
</i>
) : null}