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

feat: add slot input

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