How base option works in vue-router

前端 未结 2 732
忘掉有多难
忘掉有多难 2021-01-11 17:36

As par documentation of base option:

The base URL of the app. For example, if the entire single page application is served under /app/, then base shou

2条回答
  •  猫巷女王i
    2021-01-11 17:50

    Had the same problem, setting "base" didn't work - workaround is to update base url in router:

    { name: 'listings', path: baseUrl + '/listings',   component: PageListings}
    

    and refer to routes by name:

    Listings
    

提交回复
热议问题