Dialog-987c90a1.js 2.3 KB

1
  1. import{d as T,p as s,cv as j,b as h,r as g,bc as v,aS as C,o as u,l as d,cw as O,a as o,w as c,ai as S,bn as N,cx as z,aJ as n,g as y,j as B,t as E,a2 as J,i as P,av as R,am as U,v as V,aT as X,_ as q,__tla as A}from"./index-af173888.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"},_=q(T({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={...N(),...l};for(const i in a)e.indexOf(i)!==-1&&delete a[i];return a}),r=g(!1),w=()=>{r.value=!o(r)},f=g(v(l.maxHeight)?`${l.maxHeight}px`:l.maxHeight);C(()=>r.value,async e=>{if(await U(),e){const a=document.documentElement.offsetHeight;f.value=a-55-60-(x.footer?63:0)+"px"}else f.value=v(l.maxHeight)?`${l.maxHeight}px`:l.maxHeight},{immediate:!0});const k=h(()=>({height:o(f)}));return(e,a)=>{const i=V,H=X,D=z;return u(),d(D,S(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:c(({close:$})=>[y("div",m,[n(e.$slots,"title",{},()=>[B(E(t.title),1)]),y("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:w},null,8,["icon"])):J("",!0),P(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:c(()=>[t.scroll?(u(),d(H,{key:0,style:R(o(k))},{default:c(()=>[n(e.$slots,"default")]),_:3},8,["style"])):n(e.$slots,"default",{key:1})]),_:2},[o(x).footer?{name:"footer",fn:c(()=>[n(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{_,F as __tla};