<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>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # `router.map(routeMap)` 定義路由映射的主要方法。 ### 參數 - `routeMap: Object` 結構體,鍵為路徑,值為路由配置對象。對于路徑匹配規則,查看[路由匹配](../route.html#route-matching). ### 路由配置對象 路由配置對象包含兩個字段: - `component`: 當路徑匹配時,會渲染到頂級 `<router-view>` 的 Vue 組件。此字段的值可以是調用 `Vue.extend` 后返回的構造函數,或者普通的組件選項對象。在后一種情況下,路由會隱式調用 `Vue.extend` 。 - `subRoutes`: 嵌套的子路由映射。對于每一個 `subRoutes` 映射中的子路由對象,路由器在做匹配時會使用其路徑拼接到父級路徑后得到的全路徑。成功匹配的組件會渲染到父級組件的 `<router-view>` 中。 ### 例子 ``` js router.map({ // 組件構造函數 '/a': { component: Vue.extend({ /* ... */ }) }, // 組件選項對象 '/b': { component: { template: '<p>Hello from /b</p>' } }, // 嵌套的路由 '/c': { component: { // 渲染子視圖 template: '<router-view></router-view>' }, subRoutes: { // 當路徑是 /c/d 時進行渲染 '/d': { component: { template: 'D' }}, // 當路徑是 /c/e 時進行渲染 '/e': { component: { template: 'E' }} } } }) ```
                  <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>

                              哎呀哎呀视频在线观看