mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-11-09 19:20:56 +08:00
fix: code editor tab close (#8863)
This commit is contained in:
parent
1771bc7dc8
commit
a4d63434cb
1 changed files with 5 additions and 4 deletions
|
|
@ -466,9 +466,8 @@ const removeTab = (targetPath: TabPaneName) => {
|
||||||
getContent(selectTab.value, '');
|
getContent(selectTab.value, '');
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
isEdit.value = false;
|
|
||||||
editor.setValue(oldFileContent.value);
|
|
||||||
updateTabs();
|
updateTabs();
|
||||||
|
isEdit.value = false;
|
||||||
if (fileTabs.value.length > 0) {
|
if (fileTabs.value.length > 0) {
|
||||||
getContent(selectTab.value, '');
|
getContent(selectTab.value, '');
|
||||||
}
|
}
|
||||||
|
|
@ -512,8 +511,10 @@ const removeAllTab = (targetPath: string, type: 'left' | 'right' | 'all') => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const onCancel = () => {
|
const onCancel = () => {
|
||||||
isEdit.value = false;
|
if (type === 'left' || type === 'right') {
|
||||||
editor.setValue(oldFileContent.value);
|
editor.setValue(oldFileContent.value);
|
||||||
|
}
|
||||||
|
isEdit.value = false;
|
||||||
updateTabs();
|
updateTabs();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -550,8 +551,8 @@ const removeOtherTab = (targetPath: string) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const onCancel = () => {
|
const onCancel = () => {
|
||||||
isEdit.value = false;
|
|
||||||
editor.setValue(oldFileContent.value);
|
editor.setValue(oldFileContent.value);
|
||||||
|
isEdit.value = false;
|
||||||
updateTabs();
|
updateTabs();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue