i
работал как надо. v-model
. store.dispatch('checkAuthToken', { ... }).then(() => {
new Vue({ ... });
});
router.beforeEach((to, from, next) => {
if (to.matched.some(n => n.meta.requiresUser) && !store.getters.userId) {
store.dispatch('checkAuthToken').then(() => next());
} else {
next();
}
});