this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
this.$modal.confirm('是否确认启用新增用户?').then(() => {
return this.addUser(this.form);
}).then(response => {
this.open = false;
this.getList();
this.$modal.msgSuccess("操作成功!");
}).catch(() => {});
} else {
this.$modal.msgError("操作失败!");
}
}
});
vue confirm使用
最新推荐文章于 2024-07-20 16:46:53 发布