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.
2 lines
4.2 KiB
2 lines
4.2 KiB
"use strict";const t=require("../../../common/vendor.js"),a=require("../../index.js"),h=require("../../hooks/useModal.js");require("../../url/index.js");require("../../store/index.js");require("../../store/app.js");require("../../platform/index.js");require("../../platform/provider/wechat/index.js");require("../../platform/provider/wechat/miniProgram.js");require("../../api/member/auth.js");require("../../request/index.js");require("../../config/index.js");require("../../helper/index.js");require("../../helper/test.js");require("../../helper/digit.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("../../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("../../store/sys.js");require("../../store/modal.js");require("../../config/zIndex.js");if(!Array){const e=t.resolveComponent("su-status-bar"),i=t.resolveComponent("uni-search-bar");(e+i)()}const b=()=>"../su-status-bar/su-status-bar.js",p=()=>"../../../uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.js";Math||(b+p)();const S={__name:"su-navbar",props:{dark:{type:Boolean,default:!1},modelValue:{type:String,default:""},title:{type:String,default:""},titleAlign:{type:String,default:"center"},rightText:{type:String,default:""},leftIcon:{type:String,default:"left"},rightIcon:{type:String,default:""},fixed:{type:[Boolean,String],default:!0},placeholder:{type:[Boolean,String],default:!0},color:{type:String,default:""},backgroundColor:{type:String,default:""},opacity:{type:[Boolean,String],default:!1},opacityBgUi:{type:String,default:"bg-white"},statusBar:{type:[Boolean,String],default:!1},shadow:{type:[Boolean,String],default:!1},border:{type:[Boolean,String],default:!1},height:{type:[Number,String],default:44},leftWidth:{type:[Number,String],default:80},rightWidth:{type:[Number,String],default:0},tools:{type:String,default:"title"},defaultSearch:{type:String,default:""}},emits:["clickLeft","clickRight","clickTitle","search"],setup(e,{emit:i}){const l=u=>typeof u=="number"?u+"px":u,n=i,r=e;t.computed(()=>({width:a.sheep.$platform.capsule.width+"px",height:a.sheep.$platform.capsule.height+"px",margin:"0 "+(a.sheep.$platform.device.windowWidth-a.sheep.$platform.capsule.right)+"px"}));const f=t.computed(()=>r.defaultSearch);t.computed(()=>r.dark?r.backgroundColor?r.backgroundColor:r.dark?"#333":"#FFF":r.backgroundColor||"#FFF");const o=t.computed(()=>r.dark?r.color?r.color:r.dark?"#fff":"#333":r.color||"#333"),d=t.computed(()=>l(r.height)),g=t.computed(()=>l(r.leftWidth));t.computed(()=>l(r.rightWidth));function m(u){n("search",u.value)}t.onLoad(()=>{t.index.report&&r.title!==""&&t.index.report("title",r.title)});const c=a.sheep.$router.hasHistory();function y(){c?a.sheep.$router.back():a.sheep.$router.go("/pages/index/index"),n("clickLeft")}function q(){n("clickTitle")}return(u,v)=>t.e({a:t.n(e.opacity?"":e.opacityBgUi),b:e.statusBar},e.statusBar?{}:{},{c:e.leftIcon.length>0},e.leftIcon.length>0?t.e({d:t.unref(c)},t.unref(c)?{}:{},{e:t.o(y),f:t.o((...s)=>t.unref(h.showMenuTools)&&t.unref(h.showMenuTools)(...s))}):{},{g:e.titleAlign==="left"&&e.title.length&&t.unref(a.sheep).$platform.name!=="WechatOfficialAccount"},e.titleAlign==="left"&&e.title.length&&t.unref(a.sheep).$platform.name!=="WechatOfficialAccount"?{h:t.t(e.title),i:o.value,j:!e.leftIcon.length>0?1:""}:{},{k:g.value,l:e.tools==="search"},e.tools==="search"?{m:t.o(m),n:t.o(s=>f.value=s),o:t.p({radius:20,placeholder:"请输入关键词",cancelButton:"none",modelValue:f.value})}:t.e({p:e.tools==="title"&&e.titleAlign==="center"&&e.title.length},e.tools==="title"&&e.titleAlign==="center"&&e.title.length?{q:t.t(e.title),r:o.value}:{},{s:t.o(q)}),{t:o.value,v:d.value,w:e.backgroundColor,x:e.fixed?1:"",y:e.shadow?1:"",z:e.border?1:"",A:e.placeholder},e.placeholder?t.e({B:e.statusBar},e.statusBar?{}:{},{C:d.value}):{},{D:e.dark?1:""})}},k=t._export_sfc(S,[["__scopeId","data-v-305eaf98"],["__file","D:/xiangmu/佰安出行/app/s-applet/sheep/ui/su-navbar/su-navbar.vue"]]);wx.createComponent(k);
|