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

[Component] [Component] [date-picker] el-date-picker缺少keyup事件监听 #16810

Open
huqingchun opened this issue May 10, 2024 · 1 comment · May be fixed by #16819
Open

[Component] [Component] [date-picker] el-date-picker缺少keyup事件监听 #16810

huqingchun opened this issue May 10, 2024 · 1 comment · May be fixed by #16819

Comments

@huqingchun
Copy link

huqingchun commented May 10, 2024

Bug Type: Component

Environment

  • Vue Version: 3.3.4
  • Element Plus Version: 2.7.2
  • Browser / OS: Chrome 80
  • Build Tool: Vite

Reproduction

Related Component

  • el-date-picker
  • el-time-picker
  • el-time-select

Reproduction Link

Element Plus Playground

Steps to reproduce

<script setup lang="ts">
import { ref, version as vueVersion } from 'vue'
import { version as epVersion } from 'element-plus'
import { ElementPlus } from '@element-plus/icons-vue'

const msgup = ref('')
const msgdown = ref('')
const msgpress = ref('')
const value1 = ref('')
function keyup(ev){
  msgup.value = ev.type
}
function keydown(ev){
  msgdown.value = ev.type
}
function keypress(ev){
  msgpress.value = ev.type
}
</script>

<template>
  <h1>{{ msgup }}</h1>
  <h1>{{ msgdown }}</h1>
  <h1>{{ msgpress }}</h1>
    <el-time-picker v-model="value1" @keyup="keyup($event)" @keydown="keydown($event)"
     @keypress="keypress($event)"
     placeholder="Arbitrary time" />

  <p>
    <el-icon color="var(--el-color-primary)"><ElementPlus /></el-icon>
    Element Plus {{ epVersion }} + Vue {{ vueVersion }}
  </p>
</template>

What is Expected?

正常触发配置的keyup keypress事件函数

What is actually happening?

无法触发配置的keyup keypress事件函数

Additional comments

(empty)

@btea
Copy link
Collaborator

btea commented May 15, 2024

Can you describe a specific scenario where you would need them?

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

Successfully merging a pull request may close this issue.

2 participants