You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import Vue from 'vue';
import VueRouter from 'vue-router';
const A = resolve => require(['./component/a.vue'], resolve);
const B = resolve => require(['./component/b.vue'], resolve);
Vue.use(VueRouter);
const routes = [
{
path: '/a', component: A,
},
{
path: '/b', component: B,
},
];
let router = new VueRouter({routes});
export default router;
a.vue
<style lang="sass">
body {
background-color: #1F2C36;
}
</style>
When I navigate to the route /a first, And then I navigate to the route /b, the background color doesn't change, What I want is that the global style defined in a.vue should be removed when I navigated to another page.And I read all the document seems that there were no solution for this.