89 lines
2.3 KiB
JavaScript
89 lines
2.3 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../../common/vendor.js");
|
|
const components_public_Mixins = require("../Mixins.js");
|
|
if (!Array) {
|
|
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
|
|
_easycom_uni_icons2();
|
|
}
|
|
const _easycom_uni_icons = () => "../../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
|
|
if (!Math) {
|
|
_easycom_uni_icons();
|
|
}
|
|
const _sfc_main = {
|
|
__name: "index",
|
|
props: {
|
|
title: {
|
|
// 标题
|
|
type: String,
|
|
default: ""
|
|
},
|
|
isRight: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
// 是否跳转
|
|
isSkip: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
background: {
|
|
type: String,
|
|
default: "#F2F2F2"
|
|
}
|
|
},
|
|
emits: ["right", "center", "back"],
|
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
const props = __props;
|
|
common_vendor.ref(null);
|
|
const ylh = common_vendor.ref("0px");
|
|
const updateAltitude = () => {
|
|
common_vendor.nextTick$1().then(() => {
|
|
common_vendor.index.createSelectorQuery().select("#hs").boundingClientRect((rect) => {
|
|
ylh.value = rect.height + "px";
|
|
}).exec();
|
|
});
|
|
};
|
|
__expose({
|
|
updateAltitude
|
|
});
|
|
common_vendor.onMounted(() => {
|
|
updateAltitude();
|
|
});
|
|
const jhbStyle = common_vendor.ref({
|
|
"padding-top": `${components_public_Mixins.statusBarHeight()}`,
|
|
"padding-bottom": `2px`
|
|
});
|
|
const goto = () => {
|
|
if (props.isSkip) {
|
|
common_vendor.index.navigateBack();
|
|
}
|
|
emit("back");
|
|
};
|
|
const emit = __emit;
|
|
return (_ctx, _cache) => {
|
|
return common_vendor.e({
|
|
a: common_vendor.o$1(goto),
|
|
b: common_vendor.p({
|
|
type: "left",
|
|
size: "22"
|
|
}),
|
|
c: common_vendor.t(__props.title),
|
|
d: common_vendor.o$1(($event) => emit("center")),
|
|
e: __props.isRight
|
|
}, __props.isRight ? {
|
|
f: common_vendor.p({
|
|
type: "more-filled",
|
|
size: "30"
|
|
})
|
|
} : {}, {
|
|
g: common_vendor.n(__props.background == "jb" && "bg"),
|
|
h: common_vendor.s(jhbStyle.value),
|
|
i: common_vendor.s(jhbStyle.value),
|
|
j: `${ylh.value}`
|
|
});
|
|
};
|
|
}
|
|
};
|
|
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-970d2f25"]]);
|
|
wx.createComponent(Component);
|