vue-router#createWebHistory JavaScript Examples

The following examples show how to use vue-router#createWebHistory. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.js    From double-take with MIT License 5 votes vote down vote up
router = createRouter({
  history: createWebHistory(window.ingressUrl || window.publicPath || ''),
  routes,
  scrollBehavior() {
    // Scroll to the top of the page on route navigation
    return { x: 0, y: 0 };
  },
})
Example #2
Source File: index.js    From ant-simple-pro with MIT License 5 votes vote down vote up
router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes
})
Example #3
Source File: router.js    From uptime-kuma with MIT License 5 votes vote down vote up
router = createRouter({
    linkActiveClass: "active",
    history: createWebHistory(),
    routes,
})
Example #4
Source File: main.js    From LoR_Master with MIT License 5 votes vote down vote up
router = createRouter({
  history: IS_ELECTRON ? createMemoryHistory() : createWebHistory(),
  routes, // short for `routes: routes`
})
Example #5
Source File: create-history.output.js    From vue-cli-plugin-vue-next with MIT License 5 votes vote down vote up
router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})
Example #6
Source File: create-history.output.js    From vue-cli-plugin-vue-next with MIT License 5 votes vote down vote up
createRouter({
  history: createWebHistory(),
  routes
});
Example #7
Source File: life-cycle.js    From wl-mfe with Apache License 2.0 5 votes vote down vote up
render = ({ routes, routerBase, container } = {}) => {
  // Vue.config.productionTip = false;
  router = createRouter({
    history: createWebHistory(__qiankun__ ? routerBase : "/"),
    routes: __qiankun__ ? routeMatch(routes, routerBase) : selfRoutes
  });
  instance = createApp(App).use(router).use(store).mount(container ? container.querySelector("#app") : "#app");
}