From 6a2a0ebedb89f9994cee0f7371b7e51777e0d843 Mon Sep 17 00:00:00 2001 From: Wenjie Zhang Date: Mon, 28 Jul 2025 19:37:02 +0800 Subject: [PATCH] =?UTF-8?q?refactor(GraphView):=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E4=B8=8D=E5=BF=85=E8=A6=81=E7=9A=84disabled=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E5=92=8C=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 简化计算逻辑,移除与模型匹配状态相关的disabled属性和计算 --- web/src/views/GraphView.vue | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/web/src/views/GraphView.vue b/web/src/views/GraphView.vue index 7009c17c..3e0a0aed 100644 --- a/web/src/views/GraphView.vue +++ b/web/src/views/GraphView.vue @@ -57,7 +57,6 @@ @ok="addDocumentByFile" @cancel="() => state.showModal = false" ok-text="添加到图数据库" cancel-text="取消" - :ok-button-props="{ disabled: disabled }" :confirm-loading="state.precessing">
@@ -74,7 +73,6 @@ name="file" :fileList="fileList" :max-count="1" - :disabled="disabled" action="/api/knowledge/files/upload" :headers="getAuthHeaders()" @change="handleFileUpload" @@ -101,9 +99,8 @@ import { neo4jApi } from '@/apis/graph_api'; import { useUserStore } from '@/stores/user'; const configStore = useConfigStore(); -const cur_embed_model = computed(() => configStore.config?.embed_model_names?.[configStore.config?.embed_model]?.name || ''); +const cur_embed_model = computed(() => configStore.config?.embed_model); const modelMatched = computed(() => !graphInfo?.value?.embed_model_name || graphInfo.value.embed_model_name === cur_embed_model.value) -const disabled = computed(() => state.precessing || !modelMatched.value) let graphInstance const graphInfo = ref(null)