2 lines
1.7 KiB
JavaScript
2 lines
1.7 KiB
JavaScript
|
"use strict";const e=require("../../../common/vendor.js"),t=require("../../index.js"),a=require("../../hooks/useModal.js");if(!Array){(e.resolveComponent("su-status-bar")+e.resolveComponent("su-fixed"))()}Math||((()=>"../su-status-bar/su-status-bar.js")+(()=>"../su-fixed/su-fixed.js"))();const o={__name:"su-inner-navbar",props:{zIndex:{type:Number,default:100},title:{type:String,default:""},bg:{type:String,default:"bg-white"},alway:{type:Boolean,default:!0},opacity:{type:Boolean,default:!0},noFixed:{type:Boolean,default:!0},ui:{type:String,default:""},capsule:{type:Boolean,default:!1},stopBack:{type:Boolean,default:!1},placeholder:{type:[Boolean],default:!1},bgStyles:{type:Object,default(){}}},emits:["navback","clickLeft"],setup(o,{emit:s}){const l=e.reactive({statusCur:"",capsuleStyle:{},capsuleBack:{},isDark:!0}),r=t.sheep.$platform.device.statusBarHeight,u=t.sheep.$platform.navbar,n=o,p=s,i=t.sheep.$router.hasHistory();function c(){i?t.sheep.$router.back():t.sheep.$router.go("/modules/mall/index/index"),p("clickLeft")}function d(){a.showMenuTools()}e.onBeforeMount((()=>{f()})),e.onPageScroll((e=>{const a=e.scrollTop;l.isDark=a<t.sheep.$platform.navbar}));const f=()=>{l.capsuleStyle={width:t.sheep.$platform.capsule.width+"px",height:t.sheep.$platform.capsule.height+"px"},l.capsuleBack=l.capsuleStyle};return(t,a)=>e.e({a:e.unref(i)},(e.unref(i),{}),{b:e.o(c),c:e.o(d),d:e.t(o.title),e:e.s(l.capsuleStyle),f:e.n(l.isDark?"text-white":"text-black"),g:e.s({height:e.unref(u)-e.unref(r)+"px"}),h:e.p({noFixed:n.noFixed,alway:n.alway,bgStyles:n.bgStyles,val:0,index:n.zIndex,noNav:!0,bg:n.bg,ui:n.ui,opacity:n.opacity,placeholder:n.placeholder})})}},s=e._export_sfc(o,[["__scopeId","data-v-8081617e"]]);wx.createComponent(s);
|