From c618f551cf9e18c32896b266b8c4107c5f0f7b6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E9=98=B3?= Date: Wed, 15 May 2024 15:32:08 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=A1=A5=E5=85=85h5.router.customRoutes?= =?UTF-8?q?=E9=87=8D=E5=AE=9A=E5=90=91=E5=92=8C=E8=BD=AC=E5=8F=91=E7=9A=84?= =?UTF-8?q?=E7=94=A8=E6=B3=95=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/config-detail.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/config-detail.md b/docs/config-detail.md index 8575487f7505..7e956f28e1c0 100644 --- a/docs/config-detail.md +++ b/docs/config-detail.md @@ -1506,8 +1506,12 @@ module.exports = { router: { customRoutes: { // "页面路径": "自定义路由" + // 相当于转发,Taro.navigateTo({url: '/index'}),落地页的url为'/index',页面内容为'/pages/index/index' '/pages/index/index': '/index', '/pages/detail/index': ['/detail'], // 可以通过数组为页面配置多个自定义路由 + // "自定义路由": "页面路径" + // 相当于重定向,Taro.navigateTo({url: '/index'}),落地页的url为'/pages/index/index',页面内容为'/pages/index/index' + '/index': '/pages/index/index', }, }, }, From 5717cf9a4d962aa876f74e00fb8401965e24fdb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E9=98=B3?= Date: Wed, 15 May 2024 15:34:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=A1=A5=E5=85=85h5.router.customRoutes?= =?UTF-8?q?=E9=87=8D=E5=AE=9A=E5=90=91=E5=92=8C=E8=BD=AC=E5=8F=91=E7=9A=84?= =?UTF-8?q?=E7=94=A8=E6=B3=95=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- versioned_docs/version-3.x/config-detail.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/versioned_docs/version-3.x/config-detail.md b/versioned_docs/version-3.x/config-detail.md index 47e33981c6be..1c08cb9cccd5 100644 --- a/versioned_docs/version-3.x/config-detail.md +++ b/versioned_docs/version-3.x/config-detail.md @@ -1481,8 +1481,12 @@ module.exports = { router: { customRoutes: { // "页面路径": "自定义路由" + // 相当于转发,Taro.navigateTo({url: '/index'}),落地页的url为'/index',页面内容为'/pages/index/index' '/pages/index/index': '/index', '/pages/detail/index': ['/detail'], // 可以通过数组为页面配置多个自定义路由 + // "自定义路由": "页面路径" + // 相当于重定向,Taro.navigateTo({url: '/index'}),落地页的url为'/pages/index/index',页面内容为'/pages/index/index' + '/index': '/pages/index/index', }, }, },