优化
This commit is contained in:
@@ -96,17 +96,11 @@ let Navbar = class Navbar extends SuperComponent {
|
||||
success: (res) => {
|
||||
const boxStyleList = [];
|
||||
const { statusBarHeight } = wx.getSystemInfoSync();
|
||||
console.log("statusBarHeight: ", statusBarHeight);
|
||||
console.log("${rect.height}px: ", `${rect.height}`);
|
||||
boxStyleList.push(`--td-navbar-padding-top:${statusBarHeight}px`);
|
||||
if (rect && (res === null || res === void 0 ? void 0 : res.windowWidth)) {
|
||||
boxStyleList.push(`--td-navbar-right:${res.windowWidth - rect.left}px`);
|
||||
}
|
||||
boxStyleList.push(`--td-navbar-capsule-height: ${rect.height}px`);
|
||||
|
||||
console.log("statusBarHeight: ", statusBarHeight);
|
||||
console.log("${rect.height}: ", `${rect.height}`);
|
||||
|
||||
boxStyleList.push(`--td-navbar-capsule-width:${rect.width}px`);
|
||||
this.setData({
|
||||
boxStyle: `${boxStyleList.join('; ')}`,
|
||||
|
||||
Reference in New Issue
Block a user