feat: add dynamtic title

This commit is contained in:
Simon Vieille 2025-03-30 14:17:49 +02:00
commit c1ce115590
Signed by: deblan
GPG key ID: 579388D585F70417

View file

@ -7,9 +7,15 @@ import { Chart as ChartJS, Title, Tooltip, Legend, BarElement, CategoryScale, Li
ChartJS.register(Title, Tooltip, Legend, BarElement, CategoryScale, LinearScale, ArcElement, LineElement, PointElement)
const app = createApp(App)
router.beforeEach((to, from, next) => {
if (to.meta?.label) {
document.title = `${to.meta.label} - Budget`
}
next()
})
const app = createApp(App)
app.use(createBootstrap())
app.use(router)
app.mount('#app')