1 |
- import{t as R,z as m,v as s,d as b,R as w,aI as A,aw as C,c as r,as as o,aJ as P,a5 as L,D as N}from"./index.b4473196.js";const[S,t]=R("nav-bar"),y={title:String,fixed:Boolean,zIndex:m,border:s,leftText:String,rightText:String,leftArrow:Boolean,placeholder:Boolean,safeAreaInsetTop:Boolean,clickable:s};var z=b({name:S,props:y,emits:["clickLeft","clickRight"],setup(e,{emit:l,slots:a}){const c=w(),f=A(c,t),d=n=>l("clickLeft",n),h=n=>l("clickRight",n),g=()=>a.left?a.left():[e.leftArrow&&r(L,{class:t("arrow"),name:"arrow-left"},null),e.leftText&&r("span",{class:t("text")},[e.leftText])],x=()=>a.right?a.right():r("span",{class:t("text")},[e.rightText]),i=()=>{const{title:n,fixed:u,border:v,zIndex:T}=e,k=C(T),B=e.leftArrow||e.leftText||a.left,I=e.rightText||a.right;return r("div",{ref:c,style:k,class:[t({fixed:u}),{[P]:v,"van-safe-area-top":e.safeAreaInsetTop}]},[r("div",{class:t("content")},[B&&r("div",{class:[t("left"),e.clickable?o:""],onClick:d},[g()]),r("div",{class:[t("title"),"van-ellipsis"]},[a.title?a.title():n]),I&&r("div",{class:[t("right"),e.clickable?o:""],onClick:h},[x()])])])};return()=>e.fixed&&e.placeholder?f(i):i()}});const E=N(z);export{E as N};
|