1 |
- import{d as C,ac as s,bc as j,Y as h,r as g,bE as y,aM as N,o as u,x as d,br as O,a as o,w as n,af as T,bF as E,bk as S,aC as c,g as v,y as z,t as B,a0 as F,f as M,ao as P,aj as R,j as U,aN as V,_ as X,__tla as Y}from"./index-8dc1e40a.js";let _,q=Promise.all([(()=>{try{return Y}catch{}})()]).then(async()=>{let m,p;m={class:"relative h-54px flex items-center justify-between pl-15px pr-15px"},p={class:"absolute right-15px top-[50%] h-54px flex translate-y-[-50%] items-center justify-between"},_=X(C({name:"Dialog",__name:"Dialog",props:{modelValue:s.bool.def(!1),title:s.string.def("Dialog"),fullscreen:s.bool.def(!0),width:s.oneOfType([String,Number]).def("40%"),scroll:s.bool.def(!1),maxHeight:s.oneOfType([String,Number]).def("400px")},setup(t){const x=j(),l=t,b=h(()=>{const e=["fullscreen","title","maxHeight","appendToBody"],a={...E(),...l};for(const i in a)e.indexOf(i)!==-1&&delete a[i];return a}),r=g(!1),k=()=>{r.value=!o(r)},f=g(y(l.maxHeight)?`${l.maxHeight}px`:l.maxHeight);N(()=>r.value,async e=>{if(await R(),e){const a=document.documentElement.offsetHeight;f.value=a-55-60-(x.footer?63:0)+"px"}else f.value=y(l.maxHeight)?`${l.maxHeight}px`:l.maxHeight},{immediate:!0});const w=h(()=>({height:o(f)}));return(e,a)=>{const i=U,H=V,D=S;return u(),d(D,T(o(b),{"close-on-click-modal":!0,fullscreen:o(r),width:t.width,"destroy-on-close":"","lock-scroll":"",draggable:"",class:"com-dialog","show-close":!1}),O({header:n(({close:$})=>[v("div",m,[c(e.$slots,"title",{},()=>[z(B(t.title),1)]),v("div",p,[t.fullscreen?(u(),d(i,{key:0,class:"is-hover mr-10px cursor-pointer",icon:o(r)?"radix-icons:exit-full-screen":"radix-icons:enter-full-screen",color:"var(--el-color-info)","hover-color":"var(--el-color-primary)",onClick:k},null,8,["icon"])):F("",!0),M(i,{class:"is-hover cursor-pointer",icon:"ep:close","hover-color":"var(--el-color-primary)",color:"var(--el-color-info)",onClick:$},null,8,["onClick"])])])]),default:n(()=>[t.scroll?(u(),d(H,{key:0,style:P(o(w))},{default:n(()=>[c(e.$slots,"default")]),_:3},8,["style"])):c(e.$slots,"default",{key:1})]),_:2},[o(x).footer?{name:"footer",fn:n(()=>[c(e.$slots,"footer")]),key:"0"}:void 0]),1040,["fullscreen","width"])}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/components/Dialog/src/Dialog.vue"]])});export{_,q as __tla};
|