fix: Fixed the issue of switching file highlighting (#8783)

This commit is contained in:
蘭
2025-05-22 08:41:59 +00:00
committed by GitHub
parent 6bd9bb7c06
commit aa8277dc03
@@ -606,6 +606,7 @@ const removeOtherTab = (targetPath: string) => {
};
const changeTab = (targetPath: TabPaneName) => {
selectTab.value = targetPath.toString();
getContent(targetPath.toString(), '');
};
@@ -958,6 +959,9 @@ const getContent = (path: string, extension: string) => {
saveContent();
fetchFileContent();
})
.catch(() => {
selectTab.value = form.value.path;
})
.finally(() => {});
} else {
fetchFileContent();