[bug report] dynamic formitem causes the rule verification of form to be invalid
- Dominant language
- Vue
- Stars
- 54k
- Forks
- 14.4k
- PR merge metrics
- No merged PRs in 30d
Description
### Element UI version
2.13.0
### OS/Browsers version
MacOs 10.13.6 / Chrome 79
### Vue version
2.6.11
### Reproduction Link
https://codepen.io/wgcg/pen/bGNLvPg
### Steps to reproduce
1. click the switch button
2. click "立即创建"
### What is Expected?
"活动形式"的规则进行校验 给予相应的错误提示

### What is actually happening?
没有在活动形式的输入框输入内容 但是校验通过了
**原因**
复用了之前的FormItem实例,不会触发FormItem的mounted事件,也就不会push进form.fields中
**临时解决方案**
1. 给”活动备注“的FormItem组件增加prop属性,这样在mounted时就会把该组件实例push进form.fields中,切换后复用了该组件,会更新它的prop属性,这样就能正常校验了
2. 给"活动形式"的FormItem增加key属性,避免复用
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.