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