解决方案:loading(),以编辑功能为例:
update(row, index, done, loading) {
putObj(this.form).then(() => {
this.getList(this.page)
done();
this.$notify({
title: '成功',
message: '修改成功',
type: 'success',
duration: 2000
})
}).catch(() => {
loading();
});
},
loading() 是一个函数,执行这个函数可以中断表单无法编辑的状态。
官网介绍:loading用于中断操作。