vue-datepicker-local icon indicating copy to clipboard operation
vue-datepicker-local copied to clipboard

clearable状态下 点击cls事件会触发显示即dc事件

Open wLove-c opened this issue 6 years ago • 1 comments

如题 当clearable状态下时,点击清除会使时间选择器再次出现

clearable状态下 点击cls事件会触发显示即dc事件,有没有比较好的解决方案 Clicking on CLS event in clearable state will trigger the display that is DC event. Is there a better solution?

wLove-c avatar Jan 08 '19 09:01 wLove-c

<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)
  }

wLove-c avatar Jan 08 '19 09:01 wLove-c