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:
+10
-2
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user