iview [Bug Report]async-validator performs strange when one modal contains two forms

6rqinv9w  于 4个月前  发布在  其他
关注(0)|答案(5)|浏览(70)

Environment

vue 2.5.13

https://jsbin.com/mimexix/

Steps to reproduce

click the scond button, the modal and the first form will show

What is expected?

there is no validator symbol beside the label

What is actually happening?

there is a * beside the label, even without rules.

t2a7ltrp

t2a7ltrp1#

You want to reset the form before clicking the second button @misakamaiyako

eqqqjvef

eqqqjvef2#

resetFields does no effect to the asterisk, and even i remove the validater, the asterisk is still here. i have already changed the samples@Jame0527

wfauudbj

wfauudbj3#

@misakamaiyako
Is this what you expected?
Before:

After:

If you don't want the username label with asterisk just simply don't use for username . Use and style it on your own would be a better choice.

uttx8gqw

uttx8gqw4#

@daiyanze thx for your solution, but i still think that code bug should fixed by code.
@icarusion i just found out that code runing times dosen't equal to the count of the formItem with prop-added, in my case,it only runs three times, but after i changed the conditional to show, it will work as normal and no extra asterisk.

cs7cruho

cs7cruho5#

同遇到这个问题 个别字段上 没有加验证,却出现了 * , 有的加了验证,在 formitem 使用 v-if 的时候,有时候 * 又会丢失。

相关问题