Added TabIndex to Route in Standard Entity
This commit is contained in:
@@ -38,12 +38,13 @@ defineShortcuts({
|
|||||||
const emit = defineEmits(["updateNeeded"])
|
const emit = defineEmits(["updateNeeded"])
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
const route = useRoute()
|
||||||
const dataStore = useDataStore()
|
const dataStore = useDataStore()
|
||||||
const modal = useModal()
|
const modal = useModal()
|
||||||
|
|
||||||
const dataType = dataStore.dataTypes[type]
|
const dataType = dataStore.dataTypes[type]
|
||||||
|
|
||||||
const openTab = ref(0)
|
const openTab = ref(route.query.tabIndex || 0)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -88,6 +89,10 @@ const getAvailableQueryStringData = (keys) => {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const onTabChange = (index) => {
|
||||||
|
router.push(`${router.currentRoute.value.path}?tabIndex=${index}`)
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -188,6 +193,7 @@ const getAvailableQueryStringData = (keys) => {
|
|||||||
v-if="props.item.id && platform !== 'mobile'"
|
v-if="props.item.id && platform !== 'mobile'"
|
||||||
class="p-5"
|
class="p-5"
|
||||||
v-model="openTab"
|
v-model="openTab"
|
||||||
|
@change="onTabChange"
|
||||||
>
|
>
|
||||||
<template #item="{item:tab}">
|
<template #item="{item:tab}">
|
||||||
<div v-if="tab.label === 'Informationen'" class="flex flex-row">
|
<div v-if="tab.label === 'Informationen'" class="flex flex-row">
|
||||||
|
|||||||
Reference in New Issue
Block a user