From 06546e81c72e1cfb244f8012a235ca6bda6315d9 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Sun, 22 Dec 2019 22:31:15 +0800 Subject: [PATCH] refactor: login page. --- src/views/user/Login.vue | 89 ++++++++++++++++++++++++++++------------ 1 file changed, 62 insertions(+), 27 deletions(-) diff --git a/src/views/user/Login.vue b/src/views/user/Login.vue index 979fc4207..7ecfa90e7 100644 --- a/src/views/user/Login.vue +++ b/src/views/user/Login.vue @@ -3,7 +3,10 @@ -
+ +
+ + - - - - + + + + + + 恢复默认 + + + 保存设置 + - - - 恢复默认 - - - - + + + + +
@@ -149,21 +185,20 @@ export default { this.$router.replace({ name: 'Dashboard' }) } }, - handleApiModifyModalOpen() { - this.apiUrl = this.defaultApiUrl - this.apiModifyVisible = true - }, handleApiModifyOk() { this.setApiUrl(this.apiUrl) this.apiModifyVisible = false }, - handleApiModifyCancel() { - this.apiModifyVisible = false - }, handleApiUrlRestore() { this.restoreApiUrl() this.apiUrl = this.defaultApiUrl }, + toggleShowApiForm() { + this.apiModifyVisible = !this.apiModifyVisible + if (this.apiModifyVisible) { + this.apiUrl = this.defaultApiUrl + } + }, toggleHidden() { this.resetPasswordButton = !this.resetPasswordButton }