Skip to content

[Component] [dialog, select] el-dialog组件通过v-model绑定变量是否显示,有时无法通过修改变量关闭el-dialog #12261

@oxkser

Description

@oxkser

Bug Type: Component

Environment

  • Vue Version: 3.2.13
  • Element Plus Version: 2.3.1
  • Browser / OS: Chrome 111.0.5563.65 / win10 20H2
  • Build Tool: Vue CLI

Reproduction

Related Component

  • el-dialog
  • el-select

Reproduction Link

Element Plus Playground

Steps to reproduce

点击el-input输入框使输入框聚焦,并弹出el-dialog组件,然后通过点击el-dialog中#footer中的取消按钮关闭弹窗.

What is Expected?

弹窗被关闭

What is actually happening?

弹窗关闭后,立刻被重新打开,因为弹窗被关闭时重新触发了el-input的focus事件,这并不是我们所期望的(点击右上角的关闭按钮时不存在这个问题),并且这在element-plus2.2.22版本中并不存在这个问题

Additional comments

(empty)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions