Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wLove-c opened this issue Jan 8, 2019 · 1 comment
Open

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

wLove-c opened this issue Jan 8, 2019 · 1 comment

Comments

@wLove-c
Copy link

wLove-c commented Jan 8, 2019

如题 当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 wLove-c changed the title clearable状态下 点击cls事件会触发显示即dc事件,有没有比较好的解决方案 clearable状态下 点击cls事件会触发显示即dc事件Clicking on CLS event in clearable state will trigger the display that is DC event. Is there a better solution? clearable状态下 点击cls事件会触发显示即dc事件 Jan 8, 2019
@wLove-c
Copy link
Author

wLove-c commented Jan 8, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant