37 lines
1.2 KiB
JavaScript
Raw Normal View History

2025-12-19 09:46:56 +08:00
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const _sfc_main = {
name: "u-status-bar",
2026-05-28 09:48:42 +08:00
mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$16],
2025-12-19 09:46:56 +08:00
data() {
return {
2026-05-28 09:48:42 +08:00
isH5: false
2025-12-19 09:46:56 +08:00
};
},
created() {
},
2026-05-28 09:48:42 +08:00
emits: ["update:height"],
2025-12-19 09:46:56 +08:00
computed: {
style() {
const style = {};
2026-05-28 09:48:42 +08:00
let sheight = common_vendor.getWindowInfo().statusBarHeight;
this.$emit("update:height", sheight);
if (sheight == 0) {
this.isH5 = true;
} else {
style.height = common_vendor.addUnit(sheight, "px");
}
2025-12-19 09:46:56 +08:00
style.backgroundColor = this.bgColor;
return common_vendor.deepMerge(style, common_vendor.addStyle(this.customStyle));
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.s($options.style),
b: common_vendor.n($data.isH5 && "u-safe-area-inset-top")
};
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-c0b45a48"], ["__file", "/Users/zsq/Sources/github/2025property-pay/pay-employee/node_modules/uview-plus/components/u-status-bar/u-status-bar.vue"]]);
wx.createComponent(Component);