vue-breadcrumbs icon indicating copy to clipboard operation
vue-breadcrumbs copied to clipboard

The content of children component is not updated

Open phuclh opened this issue 6 years ago • 1 comments

I installed the package and setup like below. The problem is when I visit children components, the breadcrumbs was showed up right, but the content of that child component didn't get change. For example, when I entered the cart page it didn't show up the content of CartPage component and still keeps content from HomePage component.

router/routes.js

export default [
    {
        name: 'home',
        path: '/',
        component: HomePage,
        meta: {
            breadcrumb: 'Homepage',
        },
        children: [
            {
                name: 'product',
                path: '/products/:id/:slug',
                component: ProductSingle,
                meta: {
                    breadcrumb: 'Product',
                },
            },
            {
                name: 'cart',
                path: '/cart',
                component: CartPage,
                meta: {
                    breadcrumb: 'Cart',
                },
            },
        ]
    }
];

router/index.js

import Vue from 'vue';
import VueRouter from 'vue-router';
import routes from './routes';
import VueBreadcrumbs from 'vue-breadcrumbs';

Vue.use(VueRouter);
Vue.use(VueBreadcrumbs);

const router = createRouter();

export default router;

/**
 * The router factory
 */
function createRouter() {
    const router = new VueRouter({
        mode: 'history',
        routes,
        scrollBehavior(to, from, savedPosition) {
            return {x: 0, y: 0}
        }
    });

    return router;
}

phuclh avatar Apr 18 '19 19:04 phuclh

the same problem, how to fix this?

VasylDmytruk avatar May 24 '19 09:05 VasylDmytruk