From 606c8ab571a35b6401525884ec8e540900fc7944 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Thu, 2 Jan 2020 18:11:37 +0800 Subject: [PATCH] feat: add loading message when sending password recovery code. --- src/views/interface/ThemeList.vue | 14 +++++++++----- src/views/user/ResetPassword.vue | 14 +++++++++++--- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/views/interface/ThemeList.vue b/src/views/interface/ThemeList.vue index 8a7550d6f..6359eae2b 100644 --- a/src/views/interface/ThemeList.vue +++ b/src/views/interface/ThemeList.vue @@ -300,11 +300,15 @@ export default { }, handleUpdateTheme(themeId) { const hide = this.$message.loading('更新中...', 0) - themeApi.update(themeId).then(response => { - hide() - this.$message.success('更新成功!') - this.loadThemes() - }) + themeApi + .update(themeId) + .then(response => { + this.$message.success('更新成功!') + this.loadThemes() + }) + .finally(() => { + hide() + }) }, handleDeleteTheme(key) { themeApi.delete(key).then(response => { diff --git a/src/views/user/ResetPassword.vue b/src/views/user/ResetPassword.vue index 4a8a8c4e7..c58cecf10 100644 --- a/src/views/user/ResetPassword.vue +++ b/src/views/user/ResetPassword.vue @@ -67,6 +67,7 @@ v-model="resetParam.password" type="password" placeholder="新密码" + autocomplete="new-password" > { - this.$message.info('邮件发送成功,五分钟内有效') - }) + const hide = this.$message.loading('发送中...', 0) + adminApi + .sendResetCode(this.resetParam) + .then(response => { + this.$message.info('邮件发送成功,五分钟内有效') + }) + .finally(() => { + hide() + }) }, handleResetPassword() { if (!this.resetParam.username) {