123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- "use strict";
- const common_vendor = require("../../../../common/vendor.js");
- const sheep_index = require("../../../index.js");
- require("../../../url/index.js");
- require("../../../store/index.js");
- require("../../../store/app.js");
- require("../../../api/promotion/diy.js");
- require("../../../request/index.js");
- require("../../../config/index.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("../../../hooks/useModal.js");
- require("../../../helper/index.js");
- require("../../../helper/test.js");
- require("../../../helper/digit.js");
- require("../../../helper/throttle.js");
- require("../../../platform/pay.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("../../../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 = () => "../../../ui/su-status-bar/su-status-bar.js";
- const _easycom_su_fixed = () => "../../../ui/su-fixed/su-fixed.js";
- if (!Math) {
- (_easycom_su_status_bar + _easycom_su_fixed)();
- }
- const _sfc_main = {
- __name: "navbar",
- props: {
- sticky: Boolean,
- zIndex: {
- type: Number,
- default: 100
- },
- back: {
- //是否返回上一页
- type: Boolean,
- default: true
- },
- backtext: {
- //返回文本
- type: String,
- default: ""
- },
- bg: {
- type: String,
- default: "bg-white"
- },
- status: {
- //状态栏颜色 可以选择light dark/其他字符串视为黑色
- type: String,
- default: ""
- },
- // 常驻
- alway: {
- type: Boolean,
- default: true
- },
- opacity: {
- //是否开启滑动渐变
- type: Boolean,
- default: false
- },
- opacityBg: {
- //开启滑动渐变后 返回按钮是否添加背景
- type: Boolean,
- default: false
- },
- noFixed: {
- //是否浮动
- type: Boolean,
- default: false
- },
- ui: {
- type: String,
- default: ""
- },
- capsule: {
- //是否开启胶囊返回
- type: Boolean,
- default: false
- },
- stopBack: {
- type: Boolean,
- default: false
- },
- placeholder: {
- type: [Boolean],
- default: true
- },
- bgStyles: {
- type: Object,
- default() {
- }
- }
- },
- emits: ["navback"],
- setup(__props, { emit: emits }) {
- const props = __props;
- const state = common_vendor.reactive({
- statusCur: "",
- capsuleStyle: {},
- capsuleBack: {}
- });
- const sys_statusBar = sheep_index.sheep.$platform.device.statusBarHeight;
- const sys_navBar = sheep_index.sheep.$platform.navbar;
- common_vendor.onBeforeMount(() => {
- init();
- });
- const init = () => {
- state.capsuleStyle = {
- width: sheep_index.sheep.$platform.capsule.width + "px",
- height: sheep_index.sheep.$platform.capsule.height + "px",
- margin: "0 " + (sheep_index.sheep.$platform.device.windowWidth - sheep_index.sheep.$platform.capsule.right) + "px"
- };
- state.capsuleBack = state.capsuleStyle;
- };
- return (_ctx, _cache) => {
- return {
- a: common_vendor.s(state.capsuleStyle),
- b: common_vendor.n(props.status == "" ? `text-a` : props.status == "light" ? "text-white" : "text-black"),
- c: common_vendor.s({
- height: common_vendor.unref(sys_navBar) - common_vendor.unref(sys_statusBar) + "px"
- }),
- d: 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,
- sticky: props.sticky
- })
- };
- };
- }
- };
- const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-81e1f503"], ["__file", "/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-app/sheep/components/s-custom-navbar/components/navbar.vue"]]);
- wx.createComponent(Component);
|