Skip to content

Commit

Permalink
fix(h5): 解决安卓6下dom不存在prepend方法问题
Browse files Browse the repository at this point in the history
  • Loading branch information
yushijie1 committed Jan 21, 2025
1 parent 786c0bb commit 70d4824
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/taro-router/src/navigationBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export function initNavigationBar (config: SpaRouterConfig | MpaRouterConfig, co
navigationBar.appendChild(navigationBarBackBtn)
navigationBar.appendChild(navigationBarTitleWrap)
navigationBar.id = 'taro-navigation-bar'
container.prepend(navigationBar)
// prepend 不兼容 android6
container.insertBefore(navigationBar, container.firstChild)
loadNavigationBarStyle()
}

0 comments on commit 70d4824

Please sign in to comment.