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] [form, form-item] 在form组件中使用el-form-item组件,使用label插槽时如果插槽是一个组件,那么这个组件的onMounted生命周期钩子会被执行两次 #16424

Open
LMW-lmw opened this issue Apr 9, 2024 · 1 comment · May be fixed by #16759

Comments

@LMW-lmw
Copy link

LMW-lmw commented Apr 9, 2024

Bug Type: Component

Environment

  • Vue Version: 3.3.4
  • Element Plus Version: 2.6.3
  • Browser / OS: Chrome 123.0.0.0 / macOs 14.1.2
  • Build Tool: Vite

Reproduction

Related Component

  • el-form
  • el-form-item

Reproduction Link

Element Plus Playground

Steps to reproduce

打开链接会弹出两次onMounted

What is Expected?

onMounted钩子应该只会执行一次

What is actually happening?

onMounted钩子应该只会执行了两次

Additional comments

(empty)

@meskgron
Copy link

只要有item 只要有label,就会被渲染两次

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

Successfully merging a pull request may close this issue.

3 participants