WokerTask/public/pc/_nuxt/index.f614cb9b.js

2 lines
6.9 KiB
JavaScript
Raw Normal View History

2023-12-27 14:06:33 +08:00
import{O as oe,Q,R as le,a as N,S as se,T as K,U as ae,V as I,W as te,o as E,h as U,i as O,X as k,Y as C,u as e,t as ne,j as M,k as h,c as j,D as re,G as ie,p as q,B as W,Z as X,$ as ue,a0 as de,a1 as _,a2 as ce,a3 as fe,a4 as Z,r as D,a5 as me,a6 as pe,a7 as ye,a8 as ge,M as G,a9 as ve,aa as Ce,N as be,ab as Y,ac as he,ad as ke,ae as J,af as De,ag as Ee,ah as Ie,ai as Be,aj as Se,ak as Te,F as $e,al as Ae,am as we,an as Fe,ao as Re,ap as Oe}from"./entry.834fe740.js";const Me=(...o)=>t=>{o.forEach(r=>{oe(r)?r(t):r.value=t})},H=Symbol("dialogInjectionKey"),x=Q({center:{type:Boolean,default:!1},alignCenter:{type:Boolean,default:!1},closeIcon:{type:le},customClass:{type:String,default:""},draggable:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1},showClose:{type:Boolean,default:!0},title:{type:String,default:""}}),Ne={close:()=>!0},Pe=["aria-label"],Le=["id"],ze=N({name:"ElDialogContent"}),Ve=N({...ze,props:x,emits:Ne,setup(o){const t=o,{t:r}=se(),{Close:i}=ue,{dialogRef:d,headerRef:m,bodyId:B,ns:a,style:n}=K(H),{focusTrapRef:p}=K(ae),c=Me(p,d),y=I(()=>t.draggable);return te(d,m,y),(s,u)=>(E(),U("div",{ref:e(c),class:C([e(a).b(),e(a).is("fullscreen",s.fullscreen),e(a).is("draggable",e(y)),e(a).is("align-center",s.alignCenter),{[e(a).m("center")]:s.center},s.customClass]),style:W(e(n)),tabindex:"-1"},[O("header",{ref_key:"headerRef",ref:m,class:C(e(a).e("header"))},[k(s.$slots,"header",{},()=>[O("span",{role:"heading",class:C(e(a).e("title"))},ne(s.title),3)]),s.showClose?(E(),U("button",{key:0,"aria-label":e(r)("el.dialog.close"),class:C(e(a).e("headerbtn")),type:"button",onClick:u[0]||(u[0]=$=>s.$emit("close"))},[M(e(ie),{class:C(e(a).e("close"))},{default:h(()=>[(E(),j(re(s.closeIcon||e(i))))]),_:1},8,["class"])],10,Pe)):q("v-if",!0)],2),O("div",{id:e(B),class:C(e(a).e("body"))},[k(s.$slots,"default")],10,Le),s.$slots.footer?(E(),U("footer",{key:0,class:C(e(a).e("footer"))},[k(s.$slots,"footer")],2)):q("v-if",!0)],6))}});var Ue=X(Ve,[["__file","/home/runner/work/element-plus/element-plus/packages/components/dialog/src/dialog-content.vue"]]);const je=Q({...x,appendToBody:{type:Boolean,default:!1},beforeClose:{type:de(Function)},destroyOnClose:{type:Boolean,default:!1},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:{type:Boolean,default:!1},modalClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:{type:Boolean,default:!1}}),qe={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[_]:o=>ce(o),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},Ke=(o,t)=>{const i=be().emit,{nextZIndex:d}=fe();let m="";const B=Z(),a=Z(),n=D(!1),p=D(!1),c=D(!1),y=D(o.zIndex||d());let s,u;const $=me("namespace",pe),P=I(()=>{const f={},R=`--${$.value}-dialog`;return o.fullscreen||(o.top&&(f[`${R}-margin-top`]=o.top),o.width&&(f[`${R}-width`]=ye(o.width))),f}),L=I(()=>o.alignCenter?{display:"flex"}:{});function z(){i("opened")}function A(){i("closed"),i(_,!1),o.destroyOnClose&&(c.value=!1)}function V(){i("close")}function w(){u==null||u(),s==null||s(),o.openDelay&&o.openDelay>0?{stop:s}=Y(()=>F(),o.openDelay):F()}function S(){s==null||s(),u==null||u(),o.closeDelay&&o.closeDelay>0?{stop:u}=Y(()=>l(),o.closeDelay):l()}function T(){function f(R){R||(p.value=!0,n.value=!1)}o.beforeClose?o.beforeClose(f):S()}function g(){o.closeOnClickModal&&T()}function F(){!he||(n.value=!0)}function l(){n.value=!1}function v(){i("openAutoFocus")}function b(){i("closeAutoFocus")}o.lockScroll&&ge(n);function ee(){o.closeOnPressEscape&&T()}return G(()=>o.modelValue,f=>{f?(p.value=!1,w(),c.value=!0,y.value=o.zIndex?y.value++:d(),ve(()=>{i("open"),t.value&&(t.value.scrollTop=0)})):n.value&&S()}),G(()=>o.fullscreen,f=>{!t.value||(f?(m=t.value.style.transform,t.value.style.transform=""):t.value.style.transform=m)}),Ce(()=>{o.modelValue&&(n.value=!0,c.value=!0,w())}),{afterEnter:z,afterLeave:A,beforeLeave:V,handleClose:T,onModalClick:g,close