From 894454e95674a868303e9091aa602bc5ef988d56 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Tue, 16 Dec 2025 11:37:04 +0800 Subject: [PATCH] perf: Optimize some styles --- ui/src/components/card-box/index.vue | 4 ++-- ui/src/components/folder-tree/MoveToDialog.vue | 2 +- ui/src/styles/element-plus.scss | 3 +++ ui/src/views/application/index.vue | 8 ++++++-- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ui/src/components/card-box/index.vue b/ui/src/components/card-box/index.vue index 2aae667e1..f90ca1c0d 100644 --- a/ui/src/components/card-box/index.vue +++ b/ui/src/components/card-box/index.vue @@ -10,7 +10,7 @@ -
+
{{ title }} @@ -118,7 +118,7 @@ function subHoveredEnter() { .status-tag { position: absolute; right: 16px; - top: 15px; + top: 14px; } } diff --git a/ui/src/components/folder-tree/MoveToDialog.vue b/ui/src/components/folder-tree/MoveToDialog.vue index 9949a30e7..1b65175ad 100644 --- a/ui/src/components/folder-tree/MoveToDialog.vue +++ b/ui/src/components/folder-tree/MoveToDialog.vue @@ -38,7 +38,7 @@ import { SourceTypeEnum } from '@/enums/common' import KnowledgeApi from '@/api/knowledge/knowledge' import ApplicationApi from '@/api/application/application' import ToolApi from '@/api/tool/tool' -const { folder, application } = useStore() +const { folder } = useStore() const emit = defineEmits(['refresh']) const props = defineProps({ diff --git a/ui/src/styles/element-plus.scss b/ui/src/styles/element-plus.scss index f328af2cf..7ab7c6d0d 100644 --- a/ui/src/styles/element-plus.scss +++ b/ui/src/styles/element-plus.scss @@ -35,6 +35,8 @@ // tree .el-tree { background: none; + color: var(--el-text-color-primary); + font-weight: 400; } .el-tree-node__content { border-radius: var(--el-border-radius-base); @@ -46,6 +48,7 @@ .el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content { background: var(--el-color-primary-light-9); color: var(--el-color-primary); + font-weight: 500; } .el-tree-node__expand-icon { color: var(--app-text-color-secondary); diff --git a/ui/src/views/application/index.vue b/ui/src/views/application/index.vue index 0c5d513a2..7a80ddcac 100644 --- a/ui/src/views/application/index.vue +++ b/ui/src/views/application/index.vue @@ -365,8 +365,11 @@ function openMoveToDialog(data: any) { } function refreshApplicationList(row: any) { - const index = applicationList.value.findIndex((v) => v.id === row.id) - applicationList.value.splice(index, 1) + // 不是根目录才会移除 + if (folder.currentFolder?.parent_id) { + const index = applicationList.value.findIndex((v) => v.id === row.id) + applicationList.value.splice(index, 1) + } } const goApp = (item: any) => { @@ -650,6 +653,7 @@ function getFolder(bool?: boolean) { .asyncGetFolder(SourceTypeEnum.APPLICATION, params, apiType.value, loading) .then((res: any) => { folderList.value = res.data + if (bool) { // 初始化刷新 folder.setCurrentFolder(res.data?.[0] || {})