完善录音时长功能
This commit is contained in:
@@ -1,10 +1,40 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
function getSystemInfo() {
|
||||
if (typeof common_vendor.wx$1 !== "undefined" && common_vendor.wx$1.getWindowInfo) {
|
||||
try {
|
||||
const windowInfo = common_vendor.wx$1.getWindowInfo();
|
||||
return {
|
||||
statusBarHeight: windowInfo.statusBarHeight || 20,
|
||||
windowWidth: windowInfo.windowWidth,
|
||||
windowHeight: windowInfo.windowHeight
|
||||
};
|
||||
} catch (e) {
|
||||
common_vendor.index.__f__("warn", "at uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar.vue:21", "[UniStatusBar] Failed to use wx.getWindowInfo, fallback to getSystemInfoSync:", e);
|
||||
}
|
||||
}
|
||||
try {
|
||||
const systemInfo = common_vendor.index.getSystemInfoSync();
|
||||
return {
|
||||
statusBarHeight: systemInfo.statusBarHeight || 20,
|
||||
windowWidth: systemInfo.windowWidth,
|
||||
windowHeight: systemInfo.windowHeight
|
||||
};
|
||||
} catch (e) {
|
||||
common_vendor.index.__f__("error", "at uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar.vue:35", "[UniStatusBar] Failed to get system info:", e);
|
||||
return {
|
||||
statusBarHeight: 20,
|
||||
windowWidth: 375,
|
||||
windowHeight: 667
|
||||
};
|
||||
}
|
||||
}
|
||||
const _sfc_main = {
|
||||
name: "UniStatusBar",
|
||||
data() {
|
||||
const systemInfo = getSystemInfo();
|
||||
return {
|
||||
statusBarHeight: common_vendor.index.getSystemInfoSync().statusBarHeight + "px"
|
||||
statusBarHeight: systemInfo.statusBarHeight + "px"
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user