-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
Description
Version
1.4.8
Environment
mac10.15.1 、谷歌78.0.3904.108、vue2.6
Reproduction link
https://codesandbox.io/s/vue-antd-template-vi0wt
Steps to reproduce
组件定义
<template>
<a-form :form="form">
<a-form-item label="money">
<a-input-number
v-decorator="['money', {rules: [{required: true}],validateTrigger: 'blur'}]"
/>
</a-form-item>
<a-form-item label="count">
<a-input-number
v-decorator="['count', {rules: [{required: true}]}]"
/>
</a-form-item>
<a-button @click="submitForm">提交</a-button>
</a-form>
</template>
<script>
export default {
name: "App",
data() {
return {
form: {}
};
},
created() {
this.form = this.$form.createForm(this)
},
methods: {
submitForm() {
this.form.validateFields(undefined, (err, data) => {
console.log(data)
})
}
}
};
</script>
What is expected?
使用 validateTrigger: 'blur' 时 正常返回数字类型
What is actually happening?
使用 validateTrigger: 'blur' 时 返回了字符串类型