<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                >[success] # addRoute 如根據用戶不同的權限,注冊不同的路由 時候往往使用添加路由方法 * 如果被添加路由和已存在路由重名,就會刪除已存在路由并加入新路由 ~~~ router.addRoute({ name: 'home', path: '/home', component: () => import('@/view/Home.vue'), }) ~~~ * 為route添加一個children路由,那么可以傳入對應的name,home 會成為about 子路由 ~~~ import { createRouter, createWebHistory } from 'vue-router' const router = createRouter({ routes: [ { name: 'about', path: '/about1', children: [ { name: 'home1', path: 'home1', component: () => import('@/view/Home.vue'), }, ], component: () => import( /* webpackChunkName: "about動態打包" */ '@/view/About.vue' ), }, ], history: createWebHistory(), // 開啟history模式 }) router.addRoute('about', { name: 'home', path: 'home', component: () => import('@/view/Home.vue'), }) console.log(router.getRoutes()) export default router ~~~ >[success] # 動態刪除路由 * 方式一:添加一個name相同的路由; ![](https://img.kancloud.cn/5a/d9/5ad9c881fccce02f565c5271a41d9f1a_721x84.png) * 方式二:通過removeRoute方法,傳入路由的名稱; ![](https://img.kancloud.cn/e8/13/e813fd04ac92c7089f9228a8142e4453_734x74.png) * 方式三:通過addRoute方法的返回值回調; ![](https://img.kancloud.cn/ea/a1/eaa14948d22522fac15ed97110490a16_572x63.png) >[success] # getRoutes * router.getRoutes():獲取一個包含所有路由記錄的數組 * 會將子路由展開 ![](https://img.kancloud.cn/9e/ef/9eef18bcb9f1ed39a5407c84141b0095_899x660.png) ![](https://img.kancloud.cn/61/39/613913220a06636ca31e13f185e3a97b_724x83.png) >[success] # router.getRoutes():獲取一個包含所有路由記錄的數組
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看