|
@@ -64,11 +64,12 @@ Component({
|
|
|
const wxWindowInfo = wx.getWindowInfo()
|
|
|
const isAndroid = wxDeviceInfo.platform === 'android'
|
|
|
const isDevtools = wxDeviceInfo.platform === 'devtools'
|
|
|
+
|
|
|
this.setData({
|
|
|
ios: !isAndroid,
|
|
|
- innerPaddingRight: `padding-right: ${wxWindowInfo.windowWidth - rect.left}px`,
|
|
|
- leftWidth: `width: ${wxWindowInfo.windowWidth - rect.left }px`,
|
|
|
- safeAreaTop: isDevtools || isAndroid ? `height: calc(var(--height) + ${wxWindowInfo.safeArea.top}px); padding-top: ${wxWindowInfo.safeArea.top}px` : ``
|
|
|
+ innerPaddingRight: `padding-right: ${wxWindowInfo.windowWidth - rect.left}px;`,
|
|
|
+ leftWidth: `width: ${wxWindowInfo.windowWidth - rect.left }px;`,
|
|
|
+ safeAreaTop: isDevtools || isAndroid ? `height: calc(var(--height) + ${wxWindowInfo.safeArea.top}px); padding-top: ${wxWindowInfo.safeArea.top}px;` : ``
|
|
|
})
|
|
|
},
|
|
|
},
|