Ant Design Vue表单校验数组类型数据

1. 定义数据 及表单结构

const form = ref({
    dynamicValidateForm: [{
      aas: '', nums: ''
    }]
});



    
        
			
				{{ item.name }}
			
		
        
          
        
    

2. 提交时进行校验即可

async handleSubmit() {
    try {
        await (formRef.value as any).validate()
        ...   
    } catch {}
}

你可能感兴趣的:(AntDesignVue,vue.js,javascript,前端)