Dialog-ae2df6df.js 2.2 KB

1
  1. import{d as $,ac as s,bj as C,Y as h,r as g,bK as y,ar as N,o as d,x as u,bw as O,a as l,w as n,af as T,bL as z,bq as S,aN as c,g as v,y as q,t as B,a0 as E,f as K,ay as L,aj as P,j as V,aX as X,_ as Y,__tla as A}from"./index-893d5d13.js";let _,F=Promise.all([(()=>{try{return A}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"},_=Y($({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=C(),o=t,b=h(()=>{const e=["fullscreen","title","maxHeight","appendToBody"],a={...z(),...o};for(const i in a)e.indexOf(i)!==-1&&delete a[i];return a}),r=g(!1),w=()=>{r.value=!l(r)},f=g(y(o.maxHeight)?`${o.maxHeight}px`:o.maxHeight);N(()=>r.value,async e=>{if(await P(),e){const a=document.documentElement.offsetHeight;f.value=a-55-60-(x.footer?63:0)+"px"}else f.value=y(o.maxHeight)?`${o.maxHeight}px`:o.maxHeight},{immediate:!0});const k=h(()=>({height:l(f)}));return(e,a)=>{const i=V,H=X,j=S;return d(),u(j,T(l(b),{"close-on-click-modal":!0,fullscreen:l(r),width:t.width,"destroy-on-close":"","lock-scroll":"",draggable:"",class:"com-dialog","show-close":!1}),O({header:n(({close:D})=>[v("div",m,[c(e.$slots,"title",{},()=>[q(B(t.title),1)]),v("div",p,[t.fullscreen?(d(),u(i,{key:0,class:"is-hover mr-10px cursor-pointer",icon:l(r)?"radix-icons:exit-full-screen":"radix-icons:enter-full-screen",color:"var(--el-color-info)","hover-color":"var(--el-color-primary)",onClick:w},null,8,["icon"])):E("",!0),K(i,{class:"is-hover cursor-pointer",icon:"ep:close","hover-color":"var(--el-color-primary)",color:"var(--el-color-info)",onClick:D},null,8,["onClick"])])])]),default:n(()=>[t.scroll?(d(),u(H,{key:0,style:L(l(k))},{default:n(()=>[c(e.$slots,"default")]),_:3},8,["style"])):c(e.$slots,"default",{key:1})]),_:2},[l(x).footer?{name:"footer",fn:n(()=>[c(e.$slots,"footer")]),key:"0"}:void 0]),1040,["fullscreen","width"])}}}),[["__file","D:/zx/mall-newfeifan-zx-admin/src/components/Dialog/src/Dialog.vue"]])});export{_,F as __tla};