fix: Inconsistent behavior when cycling through nav menu folders (#1498)

This commit is contained in:
pa
2025-12-15 10:17:40 +09:00
committed by Natsumi
parent 4d88f1a85c
commit 1dbd1bae58

View File

@@ -204,7 +204,7 @@
</template>
<script setup>
import { computed, defineAsyncComponent, onMounted, onUnmounted, ref, watch } from 'vue';
import { computed, defineAsyncComponent, onMounted, ref, watch } from 'vue';
import { ElMessageBox, dayjs } from 'element-plus';
import { storeToRefs } from 'pinia';
import { useI18n } from 'vue-i18n';
@@ -650,6 +650,10 @@
if (!entry) {
return;
}
const entries = navMenuItems.value.find((item) => item.index === index)?.entries || [];
const indexOfEntry = entries.findIndex((e) => e.label === entry.label);
folderCyclePointers.set(index, (indexOfEntry + 1) % entries.length);
if (entry.routeName) {
handleRouteChange(entry.routeName, index || entry.routeName);
} else if (entry.path) {