Dialog-4c960d8c.js 2.0 KB

1
  1. import{d as z,ar as t,aV as B,e as x,r as y,aW as v,w as E,o as H,C as k,aX as S,a,A as i,m as V,aY as j,aZ as A,aN as c,B as n,D as F,E as G,f as m,a_ as I,aG as P,n as W,_ as X,aF as Y,a$ as Z,__tla as q}from"./index-1f518666.js";import{_ as J}from"./_plugin-vue_export-helper-1b428a4d.js";let w,K=Promise.all([(()=>{try{return q}catch{}})()]).then(async()=>{let u,h,g,_;u={class:"my-header"},h={class:"my-header-left"},g={class:"my-header-right"},_=["onClick"],w=J(z({name:"Dialog",__name:"Dialog",props:{modelValue:t.bool.def(!1),title:t.string.def("Dialog"),fullscreen:t.bool.def(!0),width:t.oneOfType([String,Number]).def("40%"),scroll:t.bool.def(!1),maxHeight:t.oneOfType([String,Number]).def("400px")},setup(r){const p=B(),l=r,$=x(()=>{const e=["fullscreen","title","maxHeight","appendToBody"],s={...j(),...l};for(const d in s)e.indexOf(d)!==-1&&delete s[d];return s}),o=y(!1),b=()=>{o.value=!a(o)},f=y(v(l.maxHeight)?`${l.maxHeight}px`:l.maxHeight);E(()=>o.value,async e=>{if(await W(),e){const s=document.documentElement.offsetHeight;f.value=s-55-60-(p.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,s)=>{const d=X,D=Y,T=Z,N=A;return H(),k(N,V(a($),{"close-on-click-modal":!0,fullscreen:a(o),width:r.width,"destroy-on-close":"","lock-scroll":"",draggable:"",class:"dialog","show-close":!1}),S({header:i(({close:O})=>[n("div",u,[n("div",h,[c(e.$slots,"title",{},()=>[F(G(r.title),1)],!0)]),n("div",g,[n("span",{onClick:b},[m(d,{icon:a(o)?"zmdi:fullscreen-exit":"zmdi:fullscreen"},null,8,["icon"])]),n("span",{onClick:O},[m(D,null,{default:i(()=>[m(a(I))]),_:1})],8,_)])])]),default:i(()=>[r.scroll?(H(),k(T,{key:0,style:P(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(p).footer?{name:"footer",fn:i(()=>[c(e.$slots,"footer",{},void 0,!0)]),key:"0"}:void 0]),1040,["fullscreen","width"])}}}),[["__scopeId","data-v-6802e401"]])});export{w as _,K as __tla};