Dialog-1f04d1b7.js 2.0 KB

1
  1. import{d as z,af as s,bH as I,J as y,r as x,b9 as v,K as J,o as b,q as H,aN as S,a,w as i,ai as j,bf as q,aM as B,ay as c,g as n,m as E,t as K,f as m,aJ as L,at as M,am as P,_ as V,aL as A,bI as F,__tla as G}from"./index-73e02845.js";import{_ as Q}from"./_plugin-vue_export-helper-1b428a4d.js";let k,R=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=Q(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 _=I(),l=d,w=y(()=>{const e=["fullscreen","title","maxHeight","appendToBody"],t={...q(),...l};for(const r in t)e.indexOf(r)!==-1&&delete t[r];return t}),o=x(!1),$=()=>{o.value=!a(o)},f=x(v(l.maxHeight)?`${l.maxHeight}px`:l.maxHeight);J(()=>o.value,async e=>{if(await P(),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=y(()=>({height:a(f)}));return(e,t)=>{const r=V,D=A,N=F,O=B;return b(),H(O,j(a(w),{"close-on-click-modal":!0,fullscreen:a(o),width:d.width,"destroy-on-close":"","lock-scroll":"",draggable:"",class:"dialog","show-close":!1}),S({header:i(({close:T})=>[n("div",u,[n("div",h,[c(e.$slots,"title",{},()=>[E(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:T},[m(D,null,{default:i(()=>[m(a(L))]),_:1})],8,p)])])]),default:i(()=>[d.scroll?(b(),H(N,{key:0,style:M(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 _,R as __tla};