第一种 : 清空表单 普通清空 用于修改 2中写法都行
this.$refs.form.resetFields();
this.$refs['form'].resetFields();
第二种: 彻底清空表单 在dom加载完成后清空 用于新增 还可以加v-if 属性 再判断一次
this.$nextTick(()=>{
this.$refs['form'].resetFields();//清空表单
});
第三种: 彻底清空表单 听说是最优秀的清空方案
this.$refs.form.resetFields() ;
Object.assign(this.form, this.$options.data().form)