123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- import { createRouter, createWebHashHistory } from "vue-router";
- import { defineComponent } from "vue";
- /**
- * @type {import("vue-router").RouteRecordRaw[]}
- */
- const routes = [
- {
- path: "/",
- name: "home",
- redirect: {
- name: "sdk",
- },
- },
- {
- path: "/install",
- name: "install",
- component: defineComponent({
- name: "DynamicComponent",
- render() {
- return <router-view></router-view>;
- },
- }),
- children: [
- {
- path: "",
- name: "install",
- component: () =>
- import(/* webpackChunkName: "install" */ "../views/install.vue"),
- },
- ],
- },
- {
- path: "/svg",
- name: "svg",
- component: defineComponent({
- name: "DynamicComponent",
- render() {
- return <router-view></router-view>;
- },
- }),
- children: [
- {
- path: "",
- name: "svg",
- component: () =>
- import(/* webpackChunkName: "svg" */ "../views/svg/index.vue"),
- },
- ],
- },
- {
- path: "/sdk",
- name: "sdk",
- component: defineComponent({
- name: "DynamicComponent",
- render() {
- return <router-view></router-view>;
- },
- }),
- children: [
- {
- path: "queue",
- name: "queue",
- component: () =>
- import(/* webpackChunkName: "queue" */ "../views/queue.vue"),
- },
- {
- path: "async",
- name: "async",
- component: () =>
- import(/* webpackChunkName: "async" */ "../views/async.vue"),
- },
- {
- path: "storage",
- name: "storage",
- component: () =>
- import(/* webpackChunkName: "storage" */ "../views/storage.vue"),
- },
- {
- path: "flexible",
- name: "flexible",
- component: () =>
- import(/* webpackChunkName: "flexible" */ "../views/flexible.vue"),
- },
- {
- path: "http",
- name: "http",
- component: () =>
- import(/* webpackChunkName: "http" */ "../views/http.vue"),
- },
- {
- path: "formula",
- name: "formula",
- component: () =>
- import(/* webpackChunkName: "formula" */ "../views/formula.vue"),
- },
- {
- path: "thread",
- name: "thread",
- component: () =>
- import(/* webpackChunkName: "thread" */ "../views/thread.vue"),
- },
- {
- path: "",
- redirect: {
- name: "queue",
- },
- },
- {
- path: "/:pathMatch(.*)",
- redirect: {
- name: "queue",
- },
- },
- ],
- },
- ];
- const router = createRouter({
- history: createWebHashHistory(),
- routes,
- });
- export default router;
|