fix(navigation): create independent table target tabs

This commit is contained in:
zipg authored and GitHub committed 2026-07-27 20:02:39 +08:00
1 parent 6b0f20ad5c
commit c4b21cf666
4 files changed
+209 -62

No files matched your search

+2 -2
View File
@@ -1131,8 +1131,8 @@ export const useQueryStore = defineStore("query", () => {
return tabs.value.find((tab) => tab.connectionId === connectionId && tab.database === database && tab.title === title && tab.mode === mode && (tab.schema || "") === (schema || ""));
}
function createTab(connectionId: string, database: string, title?: string, mode: QueryTab["mode"] = "query", schema?: string, initialSql?: string, catalog?: string) {
if (title) {
function createTab(connectionId: string, database: string, title?: string, mode: QueryTab["mode"] = "query", schema?: string, initialSql?: string, catalog?: string, options: { forceNew?: boolean } = {}) {
if (title && !options.forceNew) {
const existing = findTabByIdentity(connectionId, database, title, mode, schema);
if (existing) {
switchTab(existing.id);