mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-23 00:06:15 -04:00
fix(title): trully reactive tool title
This commit is contained in:
parent
f48cd058cf
commit
c2e1d59cb9
1 changed files with 3 additions and 3 deletions
|
@ -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<HeadObject>({
|
||||
const head = computed<HeadObject>(() => ({
|
||||
title: `${route.meta.name} - IT Tools`,
|
||||
meta: [
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ const head = reactive<HeadObject>({
|
|||
content: route.meta.keywords,
|
||||
},
|
||||
],
|
||||
});
|
||||
}));
|
||||
useHead(head);
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue