mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-20 14:56:17 -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 BaseLayout from './base.layout.vue';
|
||||||
import { useHead } from '@vueuse/head';
|
import { useHead } from '@vueuse/head';
|
||||||
import type { HeadObject } from '@vueuse/head';
|
import type { HeadObject } from '@vueuse/head';
|
||||||
import { reactive } from 'vue';
|
import { computed } from 'vue';
|
||||||
import { useThemeVars } from 'naive-ui';
|
import { useThemeVars } from 'naive-ui';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const theme = useThemeVars();
|
const theme = useThemeVars();
|
||||||
|
|
||||||
const head = reactive<HeadObject>({
|
const head = computed<HeadObject>(() => ({
|
||||||
title: `${route.meta.name} - IT Tools`,
|
title: `${route.meta.name} - IT Tools`,
|
||||||
meta: [
|
meta: [
|
||||||
{
|
{
|
||||||
|
@ -21,7 +21,7 @@ const head = reactive<HeadObject>({
|
||||||
content: route.meta.keywords,
|
content: route.meta.keywords,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
}));
|
||||||
useHead(head);
|
useHead(head);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue