const dialogModel = reactive<AddDeptModel>({
type: "",
id: "",
pid: "",
parentName: "",
manager: "",
deptAddress: "",
deptPhone: "",
name: "",
deptCode: "",
orderNum: "",
});
比如有一个弹出里的数据是reactive定义的,您填写数据,如果关闭弹窗,然后在打开弹窗,之前的填的还会显示,有啥方便的方法重置呢,vue2我是用this.$options.data()重置为初始值。
定义一个重置方法