Skip to content

Commit

Permalink
fix(acl): reset load status after failed request
Browse files Browse the repository at this point in the history
  • Loading branch information
Kinplemelon committed Jul 15, 2024
1 parent 6feeb8f commit c6b942f
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/views/Modules/components/AuthMnesia/AddACLDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,20 @@ export default {
}
this.addLoading = true
const { ...data } = this.record
const res = await addAcl(data)
if (res.result === 'ok') {
this.$message.success(this.$t('Base.createSuccess'))
this.$emit('added')
this.showDialog = false
try {
const res = await addAcl(data)
if (res.result === 'ok') {
this.$message.success(this.$t('Base.createSuccess'))
this.$emit('added')
this.showDialog = false
}
} catch (error) {
//
} finally {
setTimeout(() => {
this.addLoading = false
}, 200)
}
setTimeout(() => {
this.addLoading = false
}, 200)
})
},
},
Expand Down

0 comments on commit c6b942f

Please sign in to comment.