feat:初始提交uni-app项目
This commit is contained in:
28
unpackage/dist/dev/mp-weixin/utils/system.js
vendored
Normal file
28
unpackage/dist/dev/mp-weixin/utils/system.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../common/vendor.js");
|
||||
const SYSTEM_INFO = common_vendor.index.getSystemInfoSync();
|
||||
const getStatusBarHeight = () => SYSTEM_INFO.statusBarHeight || 0;
|
||||
const getPreviewBarHeight = () => {
|
||||
if (common_vendor.index.getMenuButtonBoundingClientRect) {
|
||||
let { top } = common_vendor.index.getMenuButtonBoundingClientRect();
|
||||
let PreviewBarHeight = top;
|
||||
return PreviewBarHeight;
|
||||
} else {
|
||||
return 40;
|
||||
}
|
||||
};
|
||||
const getTitleBarHeight = () => {
|
||||
if (common_vendor.index.getMenuButtonBoundingClientRect) {
|
||||
let { top, height } = common_vendor.index.getMenuButtonBoundingClientRect();
|
||||
let titleBarHeight = (top - getStatusBarHeight()) * 2 + height;
|
||||
return titleBarHeight;
|
||||
} else {
|
||||
return 40;
|
||||
}
|
||||
};
|
||||
const getNavBarHeight = () => getTitleBarHeight() + getStatusBarHeight();
|
||||
exports.getNavBarHeight = getNavBarHeight;
|
||||
exports.getPreviewBarHeight = getPreviewBarHeight;
|
||||
exports.getStatusBarHeight = getStatusBarHeight;
|
||||
exports.getTitleBarHeight = getTitleBarHeight;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/utils/system.js.map
|
||||
Reference in New Issue
Block a user