vue data的表单属性定义
data() {
return {
ruleForm: {
name: null, // 机房名称
area: null, // 区域
desc: null// 备注
}
}
}
清空表单调用 close Dialog 关闭的回调
<el-dialog
:title="titleMap[dialogStatus]"
:visible.sync="dialogVisible"
width="30%"
@closed="setruleFormClear"
>
</el-dialog>
methods
setruleFormClear() {
this.ruleForm = {
area: null,
name: null,
desc: null
}
}