|
|
|
"use strict";
|
|
|
|
const common_vendor = require("../../common/vendor.js");
|
|
|
|
const utils_functions = require("../../utils/functions.js");
|
|
|
|
require("../../utils/log.js");
|
|
|
|
require("../../utils/qqmap-wx-jssdk.min.js");
|
|
|
|
require("../../config/host.js");
|
|
|
|
const _sfc_main = {
|
|
|
|
props: {
|
|
|
|
title: {
|
|
|
|
type: String,
|
|
|
|
default: "汪汪行天下"
|
|
|
|
},
|
|
|
|
isBack: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
loading: true,
|
|
|
|
navHeight: 32,
|
|
|
|
navPaddingTop: 47,
|
|
|
|
headerPadding: 4,
|
|
|
|
isTop: true
|
|
|
|
};
|
|
|
|
},
|
|
|
|
onShow() {
|
|
|
|
},
|
|
|
|
onLoad() {
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
init() {
|
|
|
|
this.navPaddingTop = utils_functions.api.navHeight().navPaddingTop, this.navHeight = utils_functions.api.navHeight().navHeight, this.headerPadding = utils_functions.api.navHeight().headerPadding;
|
|
|
|
console.log("this.navPaddingTop123", this.navPaddingTop);
|
|
|
|
console.log("this.navHeight", this.navHeight);
|
|
|
|
console.log("this.headerPadding", this.headerPadding);
|
|
|
|
},
|
|
|
|
navBack() {
|
|
|
|
common_vendor.index.navigateBack({
|
|
|
|
delta: 1
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
this.init();
|
|
|
|
},
|
|
|
|
updated() {
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
var that = this;
|
|
|
|
common_vendor.index.$on("isTop", function(data) {
|
|
|
|
that.isTop = data;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
};
|
|
|
|
if (!Array) {
|
|
|
|
const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon");
|
|
|
|
_easycom_u_icon2();
|
|
|
|
}
|
|
|
|
const _easycom_u_icon = () => "../../uni_modules/uview-plus/components/u-icon/u-icon.js";
|
|
|
|
if (!Math) {
|
|
|
|
_easycom_u_icon();
|
|
|
|
}
|
|
|
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
|
return {
|
|
|
|
a: common_vendor.p({
|
|
|
|
name: "arrow-leftward"
|
|
|
|
}),
|
|
|
|
b: $props.isBack,
|
|
|
|
c: common_vendor.o(($event) => $options.navBack()),
|
|
|
|
d: common_vendor.t($props.title),
|
|
|
|
e: common_vendor.p({
|
|
|
|
name: "arrow-rightward"
|
|
|
|
}),
|
|
|
|
f: $props.isBack,
|
|
|
|
g: $data.navHeight + "px",
|
|
|
|
h: $data.headerPadding + "px",
|
|
|
|
i: $data.headerPadding + "px",
|
|
|
|
j: $props.isBack ? "space-between" : "center",
|
|
|
|
k: $data.isTop ? 1 : "",
|
|
|
|
l: $data.navPaddingTop + "px"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:/phpstudy_pro/WEB/pet_uni/components/HeaderNav/Index.vue"]]);
|
|
|
|
wx.createComponent(Component);
|