feat: 为页面动态取标题
This commit is contained in:
@@ -36,6 +36,8 @@ const routerCanGoBack = () => {
|
||||
return typeof position === 'number' && position > 0;
|
||||
};
|
||||
router.beforeEach((to, from, next) => {
|
||||
if (to.meta?.title) document.title = to.meta.title as string;
|
||||
|
||||
if (to.query.digitalYiliToken) {
|
||||
utils.setSessionStorage('xToken', to.query.digitalYiliToken);
|
||||
}
|
||||
@@ -52,5 +54,5 @@ router.beforeEach((to, from, next) => {
|
||||
});
|
||||
app.use(createPinia());
|
||||
app.use(router);
|
||||
app.use(sensorsData())
|
||||
app.use(sensorsData());
|
||||
app.mount('#app');
|
||||
|
||||
Reference in New Issue
Block a user