mirror of
https://github.com/tenrok/vue2-datepicker.git
synced 2026-06-24 21:50:36 +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 />;
|
const calendarIcon = this.type === 'time' ? <IconTime /> : <IconCalendar />;
|
||||||
return (
|
return (
|
||||||
<div class={`${prefixClass}-input-wrapper`} onMousedown={this.openPopup}>
|
<div
|
||||||
|
class={`${prefixClass}-input-wrapper`}
|
||||||
|
onMousedown={this.openPopup}
|
||||||
|
onTouchstart={this.openPopup}
|
||||||
|
>
|
||||||
{input}
|
{input}
|
||||||
{this.showClearIcon ? (
|
{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 />)}
|
{this.renderSlot('icon-clear', <IconClose />)}
|
||||||
</i>
|
</i>
|
||||||
) : null}
|
) : null}
|
||||||
|
|||||||
Reference in New Issue
Block a user