Skip to content

Commit ed98baf

Browse files
committed
fix: fix navigation-bar not centered
1 parent 79be7b8 commit ed98baf

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

miniprogram/app.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,7 @@
528528
"skyline": {
529529
"defaultDisplayBlock": true,
530530
"defaultContentBox": true,
531+
"tagNameStyleIsolation": "legacy",
531532
"disableABTest": true,
532533
"sdkVersionBegin": "3.0.0",
533534
"sdkVersionEnd": "15.255.255"

miniprogram/component/navigation-bar/navigation-bar.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,11 @@ Component({
6060
const rect = wx.getMenuButtonBoundingClientRect
6161
? wx.getMenuButtonBoundingClientRect()
6262
: null
63-
const isSkyline = this.renderer === 'skyline'
6463
this.setData({
6564
ios: !!(app.system.toLowerCase().search('ios') + 1),
6665
theme: app.theme || 'light',
6766
statusBarHeight: app.statusBarHeight,
68-
navBarHeight: rect.bottom - rect.top + 10 + (isSkyline ? 0 : app.statusBarHeight),
67+
navBarHeight: rect.bottom - rect.top + 10 + app.statusBarHeight,
6968
innerWidth: isSupport ? `width:${rect.left}px` : '',
7069
innerPaddingRight: isSupport
7170
? `padding-right:${app.windowWidth - rect.left}px`

0 commit comments

Comments
 (0)