diff --git a/app/src/components/ConfigPanels.vue b/app/src/components/ConfigPanels.vue index 6c504d2f..2ce68f86 100644 --- a/app/src/components/ConfigPanels.vue +++ b/app/src/components/ConfigPanels.vue @@ -3,6 +3,8 @@ lang="ts" generic="NestedMV extends Obj, MV extends Obj" > +import { useRoute } from 'vue-router' + import type { FormValidation } from '@/composables/form' import type { KeyOfStr, Obj } from '@/types/commons' import type { ConfigPanel, ConfigPanels } from '@/types/configPanels' @@ -11,8 +13,8 @@ defineOptions({ inheritAttrs: false, }) +const currentRoute = useRoute() const props = defineProps<{ - // modelValue: MV[keyof MV] panel: ConfigPanel routes: ConfigPanels['routes'] validations: FormValidation @@ -20,7 +22,6 @@ const props = defineProps<{ const emit = defineEmits<{ apply: [action?: KeyOfStr] - 'update:modelValue': [modelValue: MV[keyof MV]] }>() const slots = defineSlots<{ @@ -41,7 +42,7 @@ const modelValue = defineModel({ required: true }) v-for="route in routes" :key="route.text" :to="route.to" - :active="$route.params.tabId === route.to.params?.tabId" + :active="currentRoute.params.tabId === route.to.params?.tabId" > @@ -52,7 +53,7 @@ const modelValue = defineModel({ required: true })