Skip to content

The test environment is packaged. After the clearValidate of the form is executed, the class name is not cleared, resulting in style problems. #5731

@havenothingtosay

Description

@havenothingtosay
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

2.2.8

Environment

vue 3.2.26

Reproduction link

Edit on CodeSandbox

Steps to reproduce

只有测试环境打包会出现该问题,本地和生产环境都没有问题(提供的在线链接没什么用,但是不提供无法提交)

  1. 表单不填写必填项,点击提交,触发提示信息,此时dom上会增加类名"ant-form-item-has-error ant-form-item-with-help"
  2. 调用clearValidate(),清空表单校验信息,但是类名只去掉了"ant-form-item-has-error",未去掉"ant-form-item-with-help",导致样式出现问题:margin-bottom: 0;表单项之间没有间距

image

What is expected?

能正确去除类名

What is actually happening?

类名没有完全清除,导致样式问题

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions