我想 for each 页面设置不同的页面标题值.
用普通的Vue.js,我已经做了以下工作:
import router from './router'
import { store } from './store/store';
router.beforeEach((to, from, next) => {
store.mutations.setRoute(to);
document.title = store.getters.pageTitle;
next();
}
我如何在nuxt中获得这种效果?
也就是说,在初始页面加载和更改页面时,我都希望浏览器选项卡的标题更改.例如,从"My App-About"到"My App-Profile".