feat: add dynamtic title
This commit is contained in:
parent
1b03ecd905
commit
c1ce115590
1 changed files with 8 additions and 2 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue