From b709de30b9ed491258082589274763f1f4960657 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Fri, 1 Aug 2025 11:40:23 +0800 Subject: [PATCH] perf: Partial style optimization --- .../component/AccessSettingDrawer.vue | 6 +-- ui/src/views/hit-test/index.vue | 25 ++++----- ui/src/views/login/index.vue | 52 +++++++++++-------- .../ModelResourceIndex.vue | 30 +++++++---- ui/src/views/system-setting/email/index.vue | 3 +- 5 files changed, 66 insertions(+), 50 deletions(-) diff --git a/ui/src/views/application/component/AccessSettingDrawer.vue b/ui/src/views/application/component/AccessSettingDrawer.vue index 22f6523f9..ff3553b89 100644 --- a/ui/src/views/application/component/AccessSettingDrawer.vue +++ b/ui/src/views/application/component/AccessSettingDrawer.vue @@ -53,7 +53,7 @@ {{ $t('views.application.applicationAccess.copyUrl') }} {{ $t('views.application.applicationAccess.wechatPlatform') }} {{ $t('views.application.applicationAccess.copyUrl') }} {{ $t('views.application.applicationAccess.dingtalkPlatform') }} {{ $t('views.application.applicationAccess.copyUrl') }} {{ $t('views.application.applicationAccess.wecomPlatform') }}
-

{{ questionTitle }}

+

+ {{ questionTitle }} +

@@ -95,11 +97,13 @@
@@ -190,21 +194,18 @@
{{ $t('common.cancel') }} - {{ + {{ $t('common.confirm') }}
-
+
diff --git a/ui/src/views/login/index.vue b/ui/src/views/login/index.vue index fd03747c0..4a3ee7d6e 100644 --- a/ui/src/views/login/index.vue +++ b/ui/src/views/login/index.vue @@ -180,32 +180,38 @@ const rules = ref>({ }) const loginHandle = () => { - loading.value = true - loginFormRef.value - ?.validate() - .then(() => { + if (!loginFormRef.value) { + return + } + loginFormRef.value.validate((valid) => { + if (valid) { + loading.value = true if (loginMode.value === 'LDAP') { - login.asyncLdapLogin(loginForm.value).then(() => { - locale.value = localStorage.getItem('MaxKB-locale') || getBrowserLang() || 'en-US' - loading.value = false - router.push({ name: 'home' }) - }).catch(() => { - loading.value = false - }) + login + .asyncLdapLogin(loginForm.value) + .then(() => { + locale.value = localStorage.getItem('MaxKB-locale') || getBrowserLang() || 'en-US' + loading.value = false + router.push({ name: 'home' }) + }) + .catch(() => { + loading.value = false + }) } else { - login.asyncLogin(loginForm.value).then(() => { - locale.value = localStorage.getItem('MaxKB-locale') || getBrowserLang() || 'en-US' - localStorage.setItem('workspace_id', 'default') - loading.value = false - router.push({ name: 'home' }) - }).catch(() => { - loading.value = false - }) + login + .asyncLogin(loginForm.value) + .then(() => { + locale.value = localStorage.getItem('MaxKB-locale') || getBrowserLang() || 'en-US' + localStorage.setItem('workspace_id', 'default') + loading.value = false + router.push({ name: 'home' }) + }) + .catch(() => { + loading.value = false + }) } - }) - .catch(() => { - loading.value = false - }) + } + }) } function makeCode() { diff --git a/ui/src/views/system-resource-management/ModelResourceIndex.vue b/ui/src/views/system-resource-management/ModelResourceIndex.vue index 0680746fc..9d11600f9 100644 --- a/ui/src/views/system-resource-management/ModelResourceIndex.vue +++ b/ui/src/views/system-resource-management/ModelResourceIndex.vue @@ -163,13 +163,17 @@