2 lines
1.9 KiB
JavaScript
2 lines
1.9 KiB
JavaScript
import{d as w,r as l,o as n,c as d,b as s,w as o,e as k,t as y,n as i,a,Q as B,u as x,U as C,a6 as u,D as f,av as h,h as S}from"./index-4ec2ce15.js";import{i as $}from"./icon-42fa39e7.js";const N={key:0,class:"top go-mt-0 go-flex-no-wrap"},T={class:"mt-1"},I={key:1,class:"bottom go-mt-0"},V={class:"aside"},z=w({__name:"index",props:{title:String,showTop:{type:Boolean,default:!0},showBottom:{type:Boolean,default:!1},flex:{type:Boolean,default:!1},backIcon:{type:Boolean,default:!0},depth:{type:Number,default:1},xScroll:{type:Boolean,default:!1},disabledScroll:{type:Boolean,default:!1}},emits:["back"],setup(e,{emit:m}){const{ChevronBackOutlineIcon:p}=$.ionicons5,v=()=>{m("back")};return(t,D)=>{const _=l("n-text"),b=l("n-ellipsis"),r=l("n-space"),g=l("n-icon"),c=l("n-scrollbar");return n(),d("div",{class:h(["go-content-box",[`bg-depth${e.depth}`,e.flex&&"flex"]])},[e.showTop?(n(),d("div",N,[s(r,{class:"go-flex-no-wrap",size:5},{default:o(()=>[s(b,null,{default:o(()=>[s(_,null,{default:o(()=>[k(y(e.title),1)]),_:1})]),_:1}),i("div",T,[a(t.$slots,"icon",{},void 0,!0)])]),_:3}),s(r,{class:"go-flex-no-wrap",align:"center",style:{gap:"4px"}},{default:o(()=>[a(t.$slots,"top-right",{},void 0,!0),B(s(g,{size:"20",class:"go-cursor-pointer go-d-block",onClick:v},{default:o(()=>[s(x(p))]),_:1},512),[[C,e.backIcon]])]),_:3})])):u("",!0),i("div",{class:h(["content",{"content-height-show-top-bottom":e.showBottom||e.showTop,"content-height-show-both":e.showBottom&&e.showTop}])},[e.disabledScroll?a(t.$slots,"default",{key:0},void 0,!0):e.xScroll?(n(),f(c,{key:1,"x-scrollable":""},{default:o(()=>[s(c,null,{default:o(()=>[a(t.$slots,"default",{},void 0,!0)]),_:3})]),_:3})):(n(),f(c,{key:2},{default:o(()=>[a(t.$slots,"default",{},void 0,!0)]),_:3}))],2),e.showBottom?(n(),d("div",I,[a(t.$slots,"bottom",{},void 0,!0)])):u("",!0),i("div",V,[a(t.$slots,"aside",{},void 0,!0)])],2)}}});const O=S(z,[["__scopeId","data-v-247d09d8"]]);export{O as C};
|