diff --git a/packages/taro-router/src/tabbar.ts b/packages/taro-router/src/tabbar.ts index 53bb742ac785..91403c702f88 100644 --- a/packages/taro-router/src/tabbar.ts +++ b/packages/taro-router/src/tabbar.ts @@ -21,6 +21,9 @@ export function initTabbar (config: AppConfig) { tabbar.conf.custom = false tabbar.conf.customRoutes = {} } + if (typeof routerConfig.basename !== 'undefined') { + tabbar.conf.basename = routerConfig.basename + } const container = document.getElementById('container') // eslint-disable-next-line no-unused-expressions container?.appendChild(tabbar)