fixed tab change with arrows
This commit is contained in:
@@ -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}`)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user