Dialog-c2716df6.js 2.0 KB

1
  1. import{d as z,af as s,aT as N,J as x,r as y,bl as v,K as j,o as b,q as H,aX as q,a,w as i,ai as B,bm as E,a$ as I,aC as c,g as n,m as J,t as K,f as m,aY as P,at as V,am as X,_ as Y,aS as A,bn as F,__tla as G}from"./index-2eab2d23.js";import{_ as L}from"./_plugin-vue_export-helper-1b428a4d.js";let k,M=Promise.all([(()=>{try{return G}catch{}})()]).then(async()=>{let u,h,g,p;u={class:"my-header"},h={class:"my-header-left"},g={class:"my-header-right"},p=["onClick"],k=L(z({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(d){const _=N(),l=d,w=x(()=>{const e=["fullscreen","title","maxHeight","appendToBody"],t={...E(),...l};for(const r in t)e.indexOf(r)!==-1&&delete t[r];return t}),o=y(!1),$=()=>{o.value=!a(o)},f=y(v(l.maxHeight)?`${l.maxHeight}px`:l.maxHeight);j(()=>o.value,async e=>{if(await X(),e){const t=document.documentElement.offsetHeight;f.value=t-55-60-(_.footer?63:0)+"px"}else f.value=v(l.maxHeight)?`${l.maxHeight}px`:l.maxHeight},{immediate:!0});const C=x(()=>({height:a(f)}));return(e,t)=>{const r=Y,T=A,D=F,O=I;return b(),H(O,B(a(w),{"close-on-click-modal":!0,fullscreen:a(o),width:d.width,"destroy-on-close":"","lock-scroll":"",draggable:"",class:"dialog","show-close":!1}),q({header:i(({close:S})=>[n("div",u,[n("div",h,[c(e.$slots,"title",{},()=>[J(K(d.title),1)],!0)]),n("div",g,[n("span",{onClick:$},[m(r,{icon:a(o)?"zmdi:fullscreen-exit":"zmdi:fullscreen"},null,8,["icon"])]),n("span",{onClick:S},[m(T,null,{default:i(()=>[m(a(P))]),_:1})],8,p)])])]),default:i(()=>[d.scroll?(b(),H(D,{key:0,style:V(a(C))},{default:i(()=>[c(e.$slots,"default",{},void 0,!0)]),_:3},8,["style"])):c(e.$slots,"default",{key:1},void 0,!0)]),_:2},[a(_).footer?{name:"footer",fn:i(()=>[c(e.$slots,"footer",{},void 0,!0)]),key:"0"}:void 0]),1040,["fullscreen","width"])}}}),[["__scopeId","data-v-bef058f3"]])});export{k as _,M as __tla};