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', }, }, }, 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', }, }, },