vue-datepicker-local
vue-datepicker-local copied to clipboard
clearable状态下 点击cls事件会触发显示即dc事件
如题 当clearable状态下时,点击清除会使时间选择器再次出现
clearable状态下 点击cls事件会触发显示即dc事件,有没有比较好的解决方案 Clicking on CLS event in clearable state will trigger the display that is DC event. Is there a better solution?
<input readonly :value="text" @click="showPicker.stop" :class="[show ? 'focus' : '', inputClass]" :disabled="disabled" :placeholder="placeholder" :name="name" v-if="type!=='inline'"/>
// dc (e) {
// this.show = this.$el.contains(e.target) && !this.disabled
// },
submit () {
this.$emit('confirm', this.get())
this.show = false
},
cancel () {
this.show = false
},
showPicker(){
this.show = true
}
},
mounted () {
// document.addEventListener('click', this.dc, true)
},
beforeDestroy () {
// document.removeEventListener('click', this.dc, true)
}