Fix opening last active tab

This commit is contained in:
Natsumi
2026-01-22 16:18:07 +13:00
parent 98fbadae2f
commit a1f4a22609
8 changed files with 34 additions and 32 deletions

View File

@@ -605,7 +605,6 @@
]);
const avatarDialogActiveTab = ref('Info');
const avatarDialogLastActiveTab = ref('Info');
const changeAvatarImageDialogVisible = ref(false);
const previousImageUrl = ref('');
@@ -676,18 +675,19 @@
);
function handleAvatarDialogTab(tabName) {
avatarDialogLastActiveTab.value = tabName;
avatarDialogActiveTab.value = tabName;
avatarDialog.value.lastActiveTab = tabName;
if (tabName === 'JSON') {
refreshAvatarDialogTreeData();
}
}
function loadLastActiveTab() {
handleAvatarDialogTab(avatarDialogLastActiveTab.value);
handleAvatarDialogTab(avatarDialog.value.lastActiveTab);
}
function avatarDialogTabClick(tabName) {
if (tabName === avatarDialogLastActiveTab.value) {
if (tabName === avatarDialog.value.lastActiveTab) {
if (tabName === 'JSON') {
refreshAvatarDialogTreeData();
}