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

[Bug Report] [Component] [form] el-from 上由 vbind 动态生成的 ref 属性异常 #6608

Closed
fullmooooon opened this issue Mar 14, 2022 · 3 comments

Comments

@fullmooooon
Copy link

Bug Type: Component

Environment

  • Vue Version: 3.2.21
  • Element Plus Version: 2.0.4
  • Browser / OS: UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36
  • Build Tool: Vite

Reproduction

Related Component

  • el-form

Reproduction Link

Element Plus Playground

Steps to reproduce

点击按钮【1.0.2-beta.71 可以用的验证表单】,能进行表单验证操作

What is Expected?

this.$refs["form0"]
可以正确的访问到第一个 el-form 组件

this.$refs["form0"]
可以正确执行

What is actually happening?

this.$refs["form0"]访问到的组件外层被包了一层数组,即 [el]

我需要 this.$refs["form0"][0] 才能访问到第一个el-form组件

Additional comments

我的项目由 1.0.2-beta.71 升级 2.0.4 后动态生成的ref组件,访问属性异常
本来由 this.$refs["form0"] 可以访问到的组件对象,外层被包了一层数组,必须用 this.$refs["form0"][0] 才能访问到

@fullmooooon
Copy link
Author

Element Plus Playground
这似乎是一个vue的问题

@fullmooooon
Copy link
Author

vuejs/core#5585

@github-actions
Copy link

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 github-actions bot locked and limited conversation to collaborators Apr 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant