Files
frontend-app/unpackage/dist/dev/mp-weixin/components/header.js
T
2025-05-23 18:03:45 +08:00

94 lines
2.3 KiB
JavaScript

"use strict";
const common_vendor = require("../common/vendor.js");
const _sfc_main = {
name: "header",
props: {
leftTitle: {
type: String,
default: null
},
leftPath: {
type: String,
default: null
},
leftPathType: {
type: String,
default: "navigateTo"
},
rightTitle: {
type: String,
default: null
},
rightPath: {
type: String,
default: null
},
rightPathType: {
type: String,
default: "navigateTo"
}
},
data() {
return {};
},
methods: {
leftJump() {
const leftPath = this.leftPath;
if (!leftPath) {
return;
}
const leftPathType = this.leftPathType;
if (leftPathType === "navigateTo") {
common_vendor.index.navigateTo({
url: leftPath
});
} else if (leftPathType === "switchTab") {
common_vendor.index.switchTab({
url: leftPath
});
}
},
rightJump() {
const rightPath = this.rightPath;
if (!rightPath) {
return;
}
const rightPathType = this.rightPathType;
if (rightPathType === "navigateTo") {
common_vendor.index.navigateTo({
url: rightPath
});
} else if (rightPathType === "switchTab") {
common_vendor.index.switchTab({
url: rightPath
});
}
}
}
};
if (!Array) {
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
_easycom_up_image2();
}
const _easycom_up_image = () => "../uni_modules/uview-plus/components/u-image/u-image.js";
if (!Math) {
_easycom_up_image();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.p({
src: "/static/common/left.png",
width: "18",
height: "20",
bgColor: "#f1f6ff00"
}),
b: common_vendor.o((...args) => $options.leftJump && $options.leftJump(...args)),
c: common_vendor.t($props.leftTitle),
d: common_vendor.t($props.rightTitle),
e: common_vendor.o((...args) => $options.rightJump && $options.rightJump(...args))
};
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-5be51a94"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../.sourcemap/mp-weixin/components/header.js.map