From 4d289c0a45da60bd02ad551ef71de9b63ee1190d Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Thu, 23 May 2024 14:32:49 +0800 Subject: [PATCH] refactor: improve code base of user-related (#5975) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### What type of PR is this? /area ui /kind improvement /milestone 2.16.x #### What this PR does / why we need it: 优化和用户管理相关的所有对话框显示逻辑,减少不必要的渲染开销和请求。 #### Special notes for your reviewer: 改动范围如下: 1. 用户密码修改 2. 用户资料修改 3. 用户创建 4. 重新登录 #### Does this PR introduce a user-facing change? ```release-note 优化和用户管理相关的所有对话框显示逻辑,减少不必要的渲染开销和请求。 ``` --- .../modules/system/users/UserDetail.vue | 15 +++- .../modules/system/users/UserList.vue | 54 +++++++---- .../users/components/UserCreationModal.vue | 65 ++++---------- .../users/components/UserEditingModal.vue | 74 +++------------ .../components/UserPasswordChangeModal.vue | 49 +++------- ui/src/components/login/LoginModal.vue | 16 ++-- ui/uc-src/modules/profile/Profile.vue | 11 ++- .../components/PasswordChangeModal.vue | 64 ++++--------- .../components/ProfileEditingModal.vue | 90 ++++++------------- 9 files changed, 150 insertions(+), 288 deletions(-) diff --git a/ui/console-src/modules/system/users/UserDetail.vue b/ui/console-src/modules/system/users/UserDetail.vue index 5cdd44883..6af169095 100644 --- a/ui/console-src/modules/system/users/UserDetail.vue +++ b/ui/console-src/modules/system/users/UserDetail.vue @@ -95,14 +95,23 @@ const tabbarItems = computed(() => { function handleRouteToUC() { window.location.href = "/uc"; } + +function onPasswordChangeModalClose() { + passwordChangeModal.value = false; + refetch(); +}