Dialog-b9037609.js 2.0 KB

1
  1. import{d as j,ah as t,aU as N,K as x,r as y,bm as v,L as S,o as b,v as k,aY as U,a,w as i,ak as B,bn as E,b0 as I,aD as c,g as n,n as K,t as L,f as u,aZ as P,au as R,an as V,j as X,aT as Y,bo as Z,_ as q,__tla as A}from"./index-00ec7b2b.js";let H,F=Promise.all([(()=>{try{return A}catch{}})()]).then(async()=>{let m,h,g,p;m={class:"my-header"},h={class:"my-header-left"},g={class:"my-header-right"},p=["onClick"],H=q(j({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 _=N(),s=r,w=x(()=>{const e=["fullscreen","title","maxHeight","appendToBody"],l={...E(),...s};for(const d in l)e.indexOf(d)!==-1&&delete l[d];return l}),o=y(!1),D=()=>{o.value=!a(o)},f=y(v(s.maxHeight)?`${s.maxHeight}px`:s.maxHeight);S(()=>o.value,async e=>{if(await V(),e){const l=document.documentElement.offsetHeight;f.value=l-55-60-(_.footer?63:0)+"px"}else f.value=v(s.maxHeight)?`${s.maxHeight}px`:s.maxHeight},{immediate:!0});const $=x(()=>({height:a(f)}));return(e,l)=>{const d=X,T=Y,z=Z,C=I;return b(),k(C,B(a(w),{"close-on-click-modal":!0,fullscreen:a(o),width:r.width,"destroy-on-close":"","lock-scroll":"",draggable:"",class:"dialog","show-close":!1}),U({header:i(({close:O})=>[n("div",m,[n("div",h,[c(e.$slots,"title",{},()=>[K(L(r.title),1)],!0)]),n("div",g,[n("span",{onClick:D},[u(d,{icon:a(o)?"zmdi:fullscreen-exit":"zmdi:fullscreen"},null,8,["icon"])]),n("span",{onClick:O},[u(T,null,{default:i(()=>[u(a(P))]),_:1})],8,p)])])]),default:i(()=>[r.scroll?(b(),k(z,{key:0,style:R(a($))},{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-f1034e22"],["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-business/src/components/Dialog/src/Dialog.vue"]])});export{H as _,F as __tla};