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] [time-picker] 支持通过点击空白处确认修改,但是没有正确处理 handleOpen() #17237

Open
wanganjun opened this issue Jun 17, 2024 · 2 comments · May be fixed by #17276

Comments

@wanganjun
Copy link

Bug Type: Component

Environment

  • Vue Version: 3.4.27
  • Element Plus Version: 2.7.5
  • Browser / OS: Chrome 125.0.6422.176 (arm64) / macOS 13.6.1
  • Build Tool: Vite

Reproduction

Related Component

  • el-time-picker

Reproduction Link

Element Plus Playground

Steps to reproduce

  1. 打开 time-picker 弹窗
  2. 修改时间
  3. 点击空白处

What is Expected?

弹窗保持打开状态,不要关闭

What is actually happening?

弹窗关闭

Additional comments

经过测试 el-date-picker 可以保持弹窗打开

@wanganjun wanganjun changed the title [Component] [time-picker] 支持通过点击空白处确认修改,但是无法保持弹窗的打开状态 [Component] [time-picker] 支持通过点击空白处确认修改,但是没有正确处理 handleOpen() Jun 17, 2024
@wanganjun
Copy link
Author

wanganjun commented Jun 18, 2024

@jany555555

业务是这样的:用户在 time-picker 选择一个时间后,如果不符合要求,就在 @change 事件里面调用 handleOpen(),用代码主动打开弹窗,让用户重新再选一个时间

经过测试:用户点击 time-picker 的弹窗的【OK】按钮,@change 事件里面调用 handleOpen() 是可以打开弹窗的。但是用户点击空白处,@change 事件里面调用 handleOpen() 没法打开弹窗

所以期望的行为是 time-picker 的 handleOpen() 能保持弹窗的打开状态,但是实际上不行

@Panzer-Jack
Copy link

我想我解决了这个问题,PR #17276

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.

3 participants
@wanganjun @Panzer-Jack and others