Vuejs2 Url路由在刷新时更改

Vuejs2 Url路由在刷新时更改,vuejs2,vue-router,Vuejs2,Vue Router,我有一些带有参数的路由,在刷新时我会被重定向到主页 const routes = [{ path: "/", component: Home, children: [{ name: "Dashboard", path: "/", component: Dashboard }, { na

我有一些带有参数的路由,在刷新时我会被重定向到主页

const routes = [{
    path: "/",
    component: Home,

    children: [{
            name: "Dashboard",
            path: "/",
            component: Dashboard
        },
        {
            name: "Customers",
            path: "/customers/:id?",
            component: CustomersList
        },
        {
            name: "Contracts",
            path: "/contracts/:id?",
            component: ContractsList
        }
    ]
}]
如果我删除“?”,它的工作路线,但我当然不是我需要的数据

你知道吗

谢谢大家!