fix: 打开历史目录时关闭所有标签页
在打开历史目录前先调用 closeAllTabs 方法,避免历史目录内容与当前标签页内容冲突
This commit is contained in:
parent
4a6810e57b
commit
b952be4c4a
|
|
@ -9,6 +9,7 @@ import GitPanel from "./components/GitPanel.vue";
|
|||
import { useFileTree } from "./composables/useFileTree";
|
||||
import { useConfig } from "./composables/useConfig";
|
||||
import { useTheme } from "./composables/useTheme";
|
||||
import { useTabs } from "./composables/useTabs";
|
||||
import { ConfigProvider } from 'ant-design-vue';
|
||||
import { SettingOutlined, DeleteOutlined, FolderOpenOutlined } from '@ant-design/icons-vue';
|
||||
|
||||
|
|
@ -26,6 +27,7 @@ const {
|
|||
setFontFamily,
|
||||
setCodeFontFamily
|
||||
} = useTheme();
|
||||
const { closeAllTabs } = useTabs();
|
||||
|
||||
const route = ref("");
|
||||
const showSearch = ref(false);
|
||||
|
|
@ -231,6 +233,7 @@ const removeHistoryDir = async (path) => {
|
|||
};
|
||||
|
||||
const handleHistorySelect = (path) => {
|
||||
closeAllTabs();
|
||||
openDirectory(path);
|
||||
showHistory.value = false;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue