2 lines
2.9 KiB
JavaScript
2 lines
2.9 KiB
JavaScript
import{l as e,f as t,M as s,E as a,o as r,c as o,w as l,a as n,A as i,u,j as h,m as d,ad as c,d as g,g as p}from"./index-3714412c.js";import{_ as f}from"./uv-icon.c593f91d.js";import{o as y,u as m,r as B}from"./useRouter.f44141c1.js";import{a as w}from"./utils.f6c22c01.js";import{_ as b}from"./_plugin-vue_export-helper.1b428a4d.js";const x=b({__name:"index",props:{systemBarAreaBg:{type:String,default:()=>"#FFFFFF00"},headerAreaBg:{type:String,default:()=>"#FFFFFF00"},headerAreaTextColor:{type:String,default:()=>"#000000"},showReturn:{type:Boolean,default:()=>!0},returnColor:{type:String,default:()=>"#000"},returnSize:{type:Number,default:()=>22},textShadow:{type:[Boolean,String],default:()=>!1},bgChangeByScroll:{type:Boolean,default:()=>!0},bgChangeColor:{type:String,default:()=>"#fff"},scrollTop:{type:Number,default:()=>0},propUp:{type:Boolean,default:()=>!0}},emits:["getSystemInfo"],setup(b,{expose:x,emit:S}){const _=b,{goBack:A}=m(),{systemBarAreaBg:C,headerAreaBg:F,headerAreaTextColor:k,showReturn:v,returnColor:H,returnSize:I,textShadow:j,bgChangeByScroll:T,bgChangeColor:$,scrollTop:z,propUp:W}=e(_),R=t({safeAreaInsets:{bottom:0,top:0,left:0,right:0},statusBarHeight:0,screenWidth:0,screenHeight:0});const E=t({bottom:0,height:0,left:0,right:0,top:0,width:0}),M=s((()=>({"--header-height":"80rpx"}))),N=s((()=>({width:"100%",height:2*u(R).safeAreaInsets.top+"rpx",background:u(C)}))),U=s((()=>{const e=u(E).height>0?`-${(40-u(E).height)/2*2}rpx`:0;return{width:"100%",background:u(F),color:u(k),marginTop:e}})),Z=s((()=>({textShadow:u(j)?u(j):"none"}))),q=s((()=>({background:u($),opacity:u(J)}))),D=s((()=>2*(u(R).safeAreaInsets.top+40)));let G;const J=t(0);function K(){const e=R.value.safeAreaInsets.bottom+40+100;G=w(0,e,0,1)}return a(z,(()=>{T.value&&(G||K(),J.value=G(u(z)))})),x({containerHeight:D,heightInfo:R}),y((()=>{!function(){const e=c(),t=u(R);t.safeAreaInsets=e.safeAreaInsets,t.statusBarHeight=e.statusBarHeight,t.screenWidth=e.screenWidth||e.windowWidth,t.screenHeight=e.screenHeight||e.windowHeight}(),K()})),(e,t)=>{const s=g,a=B(p("uv-icon"),f);return r(),o(s,{class:"container",style:i(u(M))},{default:l((()=>[n(s,{class:"header-container"},{default:l((()=>[n(s,{class:"system-bar-area",style:i(u(N))},null,8,["style"]),n(s,{class:"header-row",style:i(u(U))},{default:l((()=>[u(v)?(r(),o(s,{key:0,class:"left",style:i(u(Z))},{default:l((()=>[h(e.$slots,"left",{},(()=>[n(a,{name:"arrow-left",color:u(H),size:u(I),onClick:u(A)},null,8,["color","size","onClick"])]),!0)])),_:3},8,["style"])):d("",!0),n(s,{class:"title",style:i(u(Z))},{default:l((()=>[h(e.$slots,"default",{},void 0,!0)])),_:3},8,["style"]),n(s,{class:"right"},{default:l((()=>[h(e.$slots,"right",{},void 0,!0)])),_:3})])),_:3},8,["style"]),n(s,{class:"bg-mask",style:i(u(q))},null,8,["style"])])),_:3}),u(W)?(r(),o(s,{key:0,class:"prop-up",style:i({height:`${u(D)}rpx`})},null,8,["style"])):d("",!0)])),_:3},8,["style"])}}},[["__scopeId","data-v-6daaac42"]]);export{x as H};
|