ElemeFE / element

A Vue.js 2.0 UI Toolkit for Web
https://element.eleme.io/
MIT License
54.12k stars 14.64k forks source link

[bug report] this. $refs [formname]. Validate is not a function #18866

Open Saisimon opened 4 years ago

Saisimon commented 4 years ago

Element UI version

2.13.0

OS/Browsers version

macOS 10.15.2/Chrome 79.0.3945.130

Vue version

2.6.11

Reproduction Link

https://codepen.io/Saisimon/pen/PoqmOwr

Steps to reproduce

标签外添加
标签,validate 方法失效。去除 v-for,可以成功验证。 ### What is Expected? 循环内能成功验证 ### What is actually happening? 提示 this.$refs[formName].validate is not a function
element-bot commented 4 years ago

Translation of this issue:

Element UI version

2.13.0

OS/Browsers version

macOS 10.15.2/Chrome 79.0.3945.130

Vue version

2.6.11

Reproduction Link

https://codepen.io/Saisimon/pen/PoqmOwr

Steps to reproduce

Add < div V-for = "I in 1" > tag outside the < El form > tag, the validate method is invalid. Remove V-for and you can verify it successfully.

What is Expected?

Successful verification within the cycle

What is actually happening?

Tip this. $refs [formname]. Validate is not a function

xofred commented 3 years ago

我之前把 el-form 放进 el-tab-pane 循环里面,validateresetFields 也报一样的错。现在改为 el-form 和多个 el-tab-pane 是同级的,用事件来控制 form 的数据,例如增减 tab 时改变 form 的数据

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.