You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
87 lines
2.1 KiB
87 lines
2.1 KiB
"use strict"; |
|
const common_vendor = require("../../common/vendor.js"); |
|
require("../../utils/functions.js"); |
|
require("../../utils/log.js"); |
|
require("../../utils/qqmap-wx-jssdk.min.js"); |
|
require("../../api/other.js"); |
|
require("../../utils/request.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, |
|
menuButtonPadding: 0 |
|
}; |
|
}, |
|
onShow() { |
|
}, |
|
onLoad() { |
|
}, |
|
methods: { |
|
init() { |
|
let sysInfo = common_vendor.index.getStorageSync("sysInfo"); |
|
this.navPaddingTop = sysInfo.sysMenuHeight; |
|
this.navHeight = sysInfo.menuButtonHeight; |
|
this.menuButtonPadding = sysInfo.menuButtonPadding; |
|
}, |
|
navBack() { |
|
common_vendor.index.navigateBack({ |
|
delta: 1 |
|
}); |
|
} |
|
}, |
|
created() { |
|
this.init(); |
|
}, |
|
updated() { |
|
}, |
|
mounted() { |
|
let that = this; |
|
common_vendor.index.$on("isTop", (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: $props.isBack ? "space-between" : "center", |
|
i: $data.menuButtonPadding + "px 0", |
|
j: $data.isTop ? 1 : "", |
|
k: $data.navPaddingTop + "px" |
|
}; |
|
} |
|
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "E:/Project/pet_uni/components/HeaderNav/Index.vue"]]); |
|
wx.createComponent(Component);
|
|
|