环境 ant-design-vue
表单字段显隐通过v-if 控制
需求 清空字段值
鉴于以上表单,需要清空字段acvountName时,运用 this.form.resetfFields(‘accountName’);
没有清空,采用双重清空:
this.form.resetFields(‘accountName’);
this.form.getFieldDecorator(‘accountName’, {initValue: undefined})
结果起作用。
环境 ant-design-vue
表单字段显隐通过v-if 控制
需求 清空字段值
鉴于以上表单,需要清空字段acvountName时,运用 this.form.resetfFields(‘accountName’);
没有清空,采用双重清空:
this.form.resetFields(‘accountName’);
this.form.getFieldDecorator(‘accountName’, {initValue: undefined})
结果起作用。