vue3项目一直转圈,没有报错,不显示页面

时间:2025-01-15 13:54:07
antd Form 手动清除校验信息

S_65432: 我解决了, // 表单input onFocus时,关闭校验 封装了一个方法, /* * listName: formlist的name, form:form表单的ref,name:子项的name值,index:下标 */ closeValidate = (listName, form, name, index) => { // ('表单校验',listName, [form].getFieldValue()) const formData = (([form].getFieldValue())) ('获取错误信息',formData) // ('formData', formData[listName].map(item => {return({...item, errors:null})})) const validate = { name: [listName, index, name], value: formData[listName][index][name], errors: null } ('取消校验', validate) [form].setFields([validate]) } < validateTrigger={'onBlur'} {...restField} name={[name, formItem[0].name]} rules={formItem[0].rules}> <Input placeholder='请输入标题' onFocus={()=>{(listName, triggerRef, formItem[0].name, name)}}/> </>