2024-04-25 18:02:30 +08:00
|
|
|
"use strict";
|
2024-04-27 18:02:43 +08:00
|
|
|
const common_vendor = require("../common/vendor.js");
|
2024-04-25 18:02:30 +08:00
|
|
|
if (!Array) {
|
|
|
|
const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon");
|
|
|
|
_easycom_up_icon2();
|
|
|
|
}
|
2024-04-27 18:02:43 +08:00
|
|
|
const _easycom_up_icon = () => "../uni_modules/uview-plus/components/u-icon/u-icon.js";
|
2024-04-25 18:02:30 +08:00
|
|
|
if (!Math) {
|
|
|
|
_easycom_up_icon();
|
|
|
|
}
|
|
|
|
const _sfc_main = {
|
2024-04-27 18:02:43 +08:00
|
|
|
__name: "viewPopup",
|
2024-04-25 18:02:30 +08:00
|
|
|
props: {
|
|
|
|
nav: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
show: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
emits: ["close", "click"],
|
|
|
|
setup(__props, { emit: __emit }) {
|
|
|
|
const emit = __emit;
|
|
|
|
const close = () => {
|
|
|
|
emit("close");
|
|
|
|
};
|
|
|
|
const height = common_vendor.ref(0);
|
|
|
|
common_vendor.index.getSystemInfo({
|
|
|
|
success: (res) => {
|
|
|
|
const statusBarHeight = res.statusBarHeight || 0;
|
|
|
|
const menuButtonInfo = common_vendor.index.getMenuButtonBoundingClientRect();
|
|
|
|
const navBarHeight = menuButtonInfo.height + (menuButtonInfo.top - statusBarHeight) * 2;
|
|
|
|
const topIconDistance = statusBarHeight + navBarHeight;
|
|
|
|
console.log("顶部图标距离:", topIconDistance);
|
|
|
|
height.value = topIconDistance;
|
|
|
|
},
|
|
|
|
fail: (err) => {
|
|
|
|
console.error("获取系统信息失败:", err);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
return (_ctx, _cache) => {
|
|
|
|
return common_vendor.e({
|
|
|
|
a: __props.nav
|
|
|
|
}, __props.nav ? {
|
|
|
|
b: height.value + "px"
|
|
|
|
} : {}, {
|
|
|
|
c: common_vendor.p({
|
|
|
|
name: "arrow-up"
|
|
|
|
}),
|
|
|
|
d: common_vendor.o(close)
|
|
|
|
});
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
2024-04-27 18:02:43 +08:00
|
|
|
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-9faf4b3c"], ["__file", "D:/里海数字乡村/purchase-let/components/viewPopup.vue"]]);
|
2024-04-25 18:02:30 +08:00
|
|
|
wx.createComponent(Component);
|