fixed tab change with arrows

This commit is contained in:
2025-04-19 21:12:13 +02:00
parent 0272c9434c
commit dc79787f70

View File

@@ -26,11 +26,13 @@ defineShortcuts({
'arrowleft': () => { 'arrowleft': () => {
if(openTab.value > 0){ if(openTab.value > 0){
openTab.value -= 1 openTab.value -= 1
router.push(`${router.currentRoute.value.path}?tabIndex=${openTab.value}`)
} }
}, },
'arrowright': () => { 'arrowright': () => {
if(openTab.value < dataType.showTabs.length - 1) { if(openTab.value < dataType.showTabs.length - 1) {
openTab.value += 1 openTab.value += 1
router.push(`${router.currentRoute.value.path}?tabIndex=${openTab.value}`)
} }
}, },
}) })