123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196 |
- "use strict";
- const common_vendor = require("../../../common/vendor.js");
- const sheep_index = require("../../index.js");
- const sheep_hooks_useModal = require("../../hooks/useModal.js");
- require("../../api/index.js");
- require("../../api/distri/score.js");
- require("../../request/index.js");
- require("../../config/index.js");
- require("../../store/index.js");
- require("../../store/app.js");
- require("../../api/promotion/diy.js");
- require("../../platform/index.js");
- require("../../platform/provider/wechat/index.js");
- require("../../platform/provider/wechat/miniProgram.js");
- require("../../api/member/auth.js");
- require("../../api/member/social.js");
- require("../../api/member/user.js");
- require("../../platform/provider/apple/index.js");
- require("../../platform/share.js");
- require("../../router/index.js");
- require("../../helper/throttle.js");
- require("../../url/index.js");
- require("../../platform/pay.js");
- require("../../helper/index.js");
- require("../../helper/test.js");
- require("../../helper/digit.js");
- require("../../api/pay/order.js");
- require("../../store/user.js");
- require("../../store/cart.js");
- require("../../api/trade/cart.js");
- require("../../api/pay/wallet.js");
- require("../../api/trade/order.js");
- require("../../api/promotion/coupon.js");
- require("../../store/sys.js");
- require("../../store/modal.js");
- require("../../api/distri/share.js");
- require("../../api/distri/team.js");
- require("../../api/infra/file.js");
- require("../../api/member/address.js");
- require("../../api/member/point.js");
- require("../../api/member/signin.js");
- require("../../api/migration/app.js");
- require("../../api/migration/chat.js");
- require("../../api/migration/index.js");
- require("../../api/migration/third.js");
- require("../../api/pay/channel.js");
- require("../../api/product/category.js");
- require("../../api/product/comment.js");
- require("../../api/product/favorite.js");
- require("../../api/product/history.js");
- require("../../api/product/spu.js");
- require("../../api/promotion/activity.js");
- require("../../api/promotion/article.js");
- require("../../api/promotion/bargain.js");
- require("../../api/promotion/combination.js");
- require("../../api/promotion/rewardActivity.js");
- require("../../api/promotion/seckill.js");
- require("../../api/system/area.js");
- require("../../api/system/voice.js");
- require("../../api/trade/afterSale.js");
- require("../../api/trade/brokerage.js");
- require("../../api/trade/config.js");
- require("../../api/trade/delivery.js");
- require("../../config/zIndex.js");
- if (!Array) {
- const _easycom_su_status_bar2 = common_vendor.resolveComponent("su-status-bar");
- const _easycom_su_fixed2 = common_vendor.resolveComponent("su-fixed");
- (_easycom_su_status_bar2 + _easycom_su_fixed2)();
- }
- const _easycom_su_status_bar = () => "../su-status-bar/su-status-bar.js";
- const _easycom_su_fixed = () => "../su-fixed/su-fixed.js";
- if (!Math) {
- (_easycom_su_status_bar + _easycom_su_fixed)();
- }
- const _sfc_main = {
- __name: "su-inner-navbar",
- props: {
- zIndex: {
- type: Number,
- default: 100
- },
- title: {
- //返回文本
- type: String,
- default: ""
- },
- bg: {
- type: String,
- default: "bg-white"
- },
- // 常驻
- alway: {
- type: Boolean,
- default: true
- },
- opacity: {
- //是否开启滑动渐变
- type: Boolean,
- default: true
- },
- noFixed: {
- //是否浮动
- type: Boolean,
- default: true
- },
- ui: {
- type: String,
- default: ""
- },
- capsule: {
- //是否开启胶囊返回
- type: Boolean,
- default: false
- },
- stopBack: {
- type: Boolean,
- default: false
- },
- placeholder: {
- type: [Boolean],
- default: false
- },
- bgStyles: {
- type: Object,
- default() {
- }
- }
- },
- emits: ["navback", "clickLeft"],
- setup(__props, { emit: __emit }) {
- const state = common_vendor.reactive({
- statusCur: "",
- capsuleStyle: {},
- capsuleBack: {},
- isDark: true
- });
- const sys_statusBar = sheep_index.sheep.$platform.device.statusBarHeight;
- const sys_navBar = sheep_index.sheep.$platform.navbar;
- const props = __props;
- const emits = __emit;
- const hasHistory = sheep_index.sheep.$router.hasHistory();
- common_vendor.onBeforeMount(() => {
- init();
- });
- common_vendor.onPageScroll((e) => {
- let top = e.scrollTop;
- state.isDark = top < sheep_index.sheep.$platform.navbar;
- });
- function onClickLeft() {
- if (hasHistory) {
- sheep_index.sheep.$router.back();
- } else {
- sheep_index.sheep.$router.go("/pages/index/index");
- }
- emits("clickLeft");
- }
- function onClickRight() {
- sheep_hooks_useModal.showMenuTools();
- }
- const init = () => {
- state.capsuleStyle = {
- width: sheep_index.sheep.$platform.capsule.width + "px",
- height: sheep_index.sheep.$platform.capsule.height + "px"
- };
- state.capsuleBack = state.capsuleStyle;
- };
- return (_ctx, _cache) => {
- return common_vendor.e({
- a: common_vendor.unref(hasHistory)
- }, common_vendor.unref(hasHistory) ? {} : {}, {
- b: common_vendor.o(onClickLeft),
- c: common_vendor.o(onClickRight),
- d: common_vendor.t(__props.title),
- e: common_vendor.s(state.capsuleStyle),
- f: common_vendor.n(state.isDark ? "text-white" : "text-black"),
- g: common_vendor.s({
- height: common_vendor.unref(sys_navBar) - common_vendor.unref(sys_statusBar) + "px"
- }),
- h: common_vendor.p({
- noFixed: props.noFixed,
- alway: props.alway,
- bgStyles: props.bgStyles,
- val: 0,
- index: props.zIndex,
- noNav: true,
- bg: props.bg,
- ui: props.ui,
- opacity: props.opacity,
- placeholder: props.placeholder
- })
- });
- };
- }
- };
- const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-374b2fee"], ["__file", "D:/zx/mall-front-app/sheep/ui/su-inner-navbar/su-inner-navbar.vue"]]);
- wx.createComponent(Component);
|