From d646817bf815d592ee6c35ec91dc2f0b05103d29 Mon Sep 17 00:00:00 2001 From: shanhexi Date: Wed, 13 Dec 2023 12:01:31 +0800 Subject: [PATCH] fix:change tab bug --- chat2db-client/src/components/SearchResult/index.tsx | 1 + .../pages/main/workspace/components/WorkspaceTabs/index.tsx | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/chat2db-client/src/components/SearchResult/index.tsx b/chat2db-client/src/components/SearchResult/index.tsx index 7700bc91..a3cbc00f 100644 --- a/chat2db-client/src/components/SearchResult/index.tsx +++ b/chat2db-client/src/components/SearchResult/index.tsx @@ -24,6 +24,7 @@ import i18n from '@/i18n'; import sqlServer, { IExecuteSqlParams } from '@/service/sql'; import { v4 as uuidV4 } from 'uuid'; import { Spin } from 'antd'; +import { useWorkspaceStore } from '@/pages/main/workspace/store'; interface IProps { className?: string; diff --git a/chat2db-client/src/pages/main/workspace/components/WorkspaceTabs/index.tsx b/chat2db-client/src/pages/main/workspace/components/WorkspaceTabs/index.tsx index 6b2eeb71..da01f2cd 100644 --- a/chat2db-client/src/pages/main/workspace/components/WorkspaceTabs/index.tsx +++ b/chat2db-client/src/pages/main/workspace/components/WorkspaceTabs/index.tsx @@ -216,7 +216,7 @@ const WorkspaceTabs = memo(() => { case WorkspaceTabType.ViewAllTable: return renderViewAllTable(item); default: - return
未知类型
; + return
Unknown
; } }; @@ -231,7 +231,7 @@ const WorkspaceTabs = memo(() => { children: {workspaceTabConnectionMap(item)}, }; }); - }, [workspaceTabList]); + }, [workspaceTabList, activeConsoleId]); function renderCreateConsoleButton() { return (