Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: reorder tabs (#18477)

ecmadaobe6e249267a9
diff --git a/frontend/src/store/modules/sqlEditor/tab.ts b/frontend/src/store/modules/sqlEditor/tab.ts
index 63e8fc45c0..70306c7815 100644
--- a/frontend/src/store/modules/sqlEditor/tab.ts
+++ b/frontend/src/store/modules/sqlEditor/tab.ts
@@ -127,10 +127,15 @@ export const useSQLEditorTabStore = defineStore("sqlEditorTab", () => {
return tabsById.get(tabId);
};
- const openTabList = computed(() => {
- return openTmpTabList.value.map((item) => {
- return getTabById(item.id) ?? defaultSQLEditorTab();
- });
+ const openTabList = computed({
+ get() {
+ return openTmpTabList.value.map((item) => {
+ return getTabById(item.id) ?? defaultSQLEditorTab();
+ });
+ },
+ set(list) {
+ openTmpTabList.value = list;
+ },
});
const getTabByWorksheet = (worksheet: string) => {
diff --git a/frontend/src/views/sql-editor/TabList/TabList.vue b/frontend/src/views/sql-editor/TabList/TabList.vue
index 80561b4b08..4177189b88 100644
--- a/frontend/src/views/sql-editor/TabList/TabList.vue
+++ b/frontend/src/views/sql-editor/TabList/TabList.vue
@@ -22,8 +22,6 @@
'more-right': scrollState.moreRight,
}"
ghost-class="ghost"
- @start="state.dragging = true"
- @end="state.dragging = false"
>
<template
#item="{ element: tab, index }: { element: SQLEditorTab; index: number }"
@@ -84,7 +82,6 @@ import { useTabListContext } from "./context";
import TabItem from "./TabItem/TabItem.vue";
type LocalState = {
- dragging: boolean;
hoverTabId: string;
loading: boolean;
};
@@ -97,7 +94,6 @@ const { t } = useI18n();
const dialog = useDialog();
const state = reactive<LocalState>({
- dragging: false,
hoverTabId: "",
loading: false,
});