Add dynamic titles #71
This commit is contained in:
@ -1,8 +1,11 @@
|
||||
<script lang="ts">
|
||||
import VueTitle from './VueTitle.vue';
|
||||
|
||||
export default {}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VueTitle title="Error"></VueTitle>
|
||||
<div
|
||||
class="flex flex-col max-w-prose justify-center text-center mx-auto p-6 bg-crust rounded-lg text-contrast"
|
||||
>
|
||||
|
12
src/components/VueTitle.vue
Normal file
12
src/components/VueTitle.vue
Normal file
@ -0,0 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted } from 'vue';
|
||||
|
||||
const props = defineProps<{
|
||||
title: string
|
||||
}>()
|
||||
|
||||
onMounted(function () {
|
||||
document.title = props.title
|
||||
})
|
||||
|
||||
</script>
|
Reference in New Issue
Block a user