From c2e1d59cb9d8dbb1bb072a46100192cb8c59f59b Mon Sep 17 00:00:00 2001 From: Corentin Thomasset Date: Thu, 2 Jun 2022 00:58:31 +0200 Subject: [PATCH] fix(title): trully reactive tool title --- src/layouts/tool.layout.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/layouts/tool.layout.vue b/src/layouts/tool.layout.vue index aae5d07b..0c1684a5 100644 --- a/src/layouts/tool.layout.vue +++ b/src/layouts/tool.layout.vue @@ -3,13 +3,13 @@ import { useRoute } from 'vue-router'; import BaseLayout from './base.layout.vue'; import { useHead } from '@vueuse/head'; import type { HeadObject } from '@vueuse/head'; -import { reactive } from 'vue'; +import { computed } from 'vue'; import { useThemeVars } from 'naive-ui'; const route = useRoute(); const theme = useThemeVars(); -const head = reactive({ +const head = computed(() => ({ title: `${route.meta.name} - IT Tools`, meta: [ { @@ -21,7 +21,7 @@ const head = reactive({ content: route.meta.keywords, }, ], -}); +})); useHead(head);