element-plus icon indicating copy to clipboard operation
element-plus copied to clipboard

[Component] [popover] 组件设置persistent为false时会导致beforeenter钩子触发两遍

Open 7dingdang0 opened this issue 6 months ago • 2 comments

Bug Type: Component

Environment

  • Vue Version: 3.5.13
  • Element Plus Version: 2.10.1
  • Browser / OS: any
  • Build Tool: Vite

Reproduction

Related Component

  • el-popover

Reproduction Link

Docs

Steps to reproduce

只要把persistent为false就一定复现 <el-popover :persistent="false" @before-enter="beforeEnter" > <template #reference> custom 1

What is Expected?

before-enter 正常触发一次

What is actually happening?

before-enter 异常触发两次

Additional comments

(empty)

7dingdang0 avatar Jun 10 '25 01:06 7dingdang0

@btea Hi, I think it might be necessary to move v-show outside, as using v-if and v-show together for animation control can lead to issues. If you agree, I'd be happy to submit a PR.

packages/components/tooltip/src/content.vue#L11-L12

rzzf avatar Jun 10 '25 06:06 rzzf

@cszhjh Welcome to create PR.

btea avatar Jun 10 '25 06:06 btea

这个有进展了吗

echo-fun avatar Jun 19 '25 13:06 echo-fun

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。

github-actions[bot] avatar Aug 12 '25 16:08 github-actions[bot]