2
0
mirror of https://github.com/tenrok/vue2-datepicker.git synced 2026-06-10 12:22:27 +03:00

feat: add slot input

This commit is contained in:
mengxiong10
2019-11-14 16:32:29 +08:00
parent 51f3313865
commit ffd3918536
+16 -14
View File
@@ -8,20 +8,22 @@
}"
>
<div v-if="!inline" class="mx-input-wrapper" @mousedown="openPopup" @touchstart="openPopup">
<input
ref="input"
v-bind="{ name: 'date', type: 'text', autocomplete: 'off', ...inputAttr }"
:class="inputClass"
:disabled="disabled"
:readonly="!editable"
:value="text"
:placeholder="placeholder"
@keydown="handleInputKeydown"
@focus="handleInputFocus"
@blur="handleInputBlur"
@input="handleInputInput"
@change="handleInputChange"
/>
<slot name="input">
<input
ref="input"
v-bind="{ name: 'date', type: 'text', autocomplete: 'off', ...inputAttr }"
:class="inputClass"
:disabled="disabled"
:readonly="!editable"
:value="text"
:placeholder="placeholder"
@keydown="handleInputKeydown"
@focus="handleInputFocus"
@blur="handleInputBlur"
@input="handleInputInput"
@change="handleInputChange"
/>
</slot>
<i v-if="showClearIcon" class="mx-icon-clear" @mousedown.stop="handleClear">
<slot name="icon-clear">
<icon-close></icon-close>