@gopowerteam/modal-render 0.0.33 → 0.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");const L=Symbol("__MODAL__");function W(o){return e.getCurrentScope()?(e.onScopeDispose(o),!0):!1}function k(o){return typeof o=="function"?o():e.unref(o)}const j=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const J=Object.prototype.toString,Q=o=>J.call(o)==="[object Object]",ee=()=>{};function te(o,l={}){if(!e.isRef(o))return e.toRefs(o);const n=Array.isArray(o.value)?Array.from({length:o.value.length}):{};for(const t in o.value)n[t]=e.customRef(()=>({get(){return o.value[t]},set(a){var i;if((i=k(l.replaceRef))!=null?i:!0)if(Array.isArray(o.value)){const m=[...o.value];m[t]=a,o.value=m}else{const m={...o.value,[t]:a};Object.setPrototypeOf(m,Object.getPrototypeOf(o.value)),o.value=m}else o.value[t]=a}}));return n}function oe(o,l=!0){e.getCurrentInstance()?e.onMounted(o):l?o():e.nextTick(o)}function $(o){var l;const n=k(o);return(l=n==null?void 0:n.$el)!=null?l:n}const O=j?window:void 0;function I(...o){let l,n,t,a;if(typeof o[0]=="string"||Array.isArray(o[0])?([n,t,a]=o,l=O):[l,n,t,a]=o,!l)return ee;Array.isArray(n)||(n=[n]),Array.isArray(t)||(t=[t]);const i=[],c=()=>{i.forEach(v=>v()),i.length=0},m=(v,d,g,s)=>(v.addEventListener(d,g,s),()=>v.removeEventListener(d,g,s)),_=e.watch(()=>[$(l),k(a)],([v,d])=>{if(c(),!v)return;const g=Q(d)?{...d}:d;i.push(...n.flatMap(s=>t.map(f=>m(v,s,f,g))))},{immediate:!0,flush:"post"}),w=()=>{_(),c()};return W(w),w}function ne(){const o=e.ref(!1);return e.getCurrentInstance()&&e.onMounted(()=>{o.value=!0}),o}function re(o){const l=ne();return e.computed(()=>(l.value,!!o()))}function le(o,l={}){var n,t;const{pointerTypes:a,preventDefault:i,stopPropagation:c,exact:m,onMove:_,onEnd:w,onStart:v,initialValue:d,axis:g="both",draggingElement:s=O,containerElement:f,handle:u=o}=l,y=e.ref((n=k(d))!=null?n:{x:0,y:0}),p=e.ref(),M=h=>a?a.includes(h.pointerType):!0,N=h=>{k(i)&&h.preventDefault(),k(c)&&h.stopPropagation()},B=h=>{var x;if(!M(h)||k(m)&&h.target!==k(o))return;const b=k(f),R=(x=b==null?void 0:b.getBoundingClientRect)==null?void 0:x.call(b),E=k(o).getBoundingClientRect(),S={x:h.clientX-(b?E.left-R.left:E.left),y:h.clientY-(b?E.top-R.top:E.top)};(v==null?void 0:v(S,h))!==!1&&(p.value=S,N(h))},z=h=>{var x;if(!M(h)||!p.value)return;const b=k(f),R=(x=b==null?void 0:b.getBoundingClientRect)==null?void 0:x.call(b),E=k(o).getBoundingClientRect();let{x:S,y:V}=y.value;(g==="x"||g==="both")&&(S=h.clientX-p.value.x,b&&(S=Math.min(Math.max(0,S),R.width-E.width))),(g==="y"||g==="both")&&(V=h.clientY-p.value.y,b&&(V=Math.min(Math.max(0,V),R.height-E.height))),y.value={x:S,y:V},_==null||_(y.value,h),N(h)},H=h=>{M(h)&&p.value&&(p.value=void 0,w==null||w(y.value,h),N(h))};if(j){const h={capture:(t=l.capture)!=null?t:!0};I(u,"pointerdown",B,h),I(s,"pointermove",z,h),I(s,"pointerup",H,h)}return{...te(y),position:y,isDragging:e.computed(()=>!!p.value),style:e.computed(()=>`left:${y.value.x}px;top:${y.value.y}px;`)}}function se(o,l,n={}){const{window:t=O,...a}=n;let i;const c=re(()=>t&&"ResizeObserver"in t),m=()=>{i&&(i.disconnect(),i=void 0)},_=e.computed(()=>Array.isArray(o)?o.map(d=>$(d)):[$(o)]),w=e.watch(_,d=>{if(m(),c.value&&t){i=new ResizeObserver(l);for(const g of d)g&&i.observe(g,a)}},{immediate:!0,flush:"post",deep:!0}),v=()=>{m(),w()};return W(v),{isSupported:c,stop:v}}function A(o,l={width:0,height:0},n={}){const{window:t=O,box:a="content-box"}=n,i=e.computed(()=>{var d,g;return(g=(d=$(o))==null?void 0:d.namespaceURI)==null?void 0:g.includes("svg")}),c=e.ref(l.width),m=e.ref(l.height),{stop:_}=se(o,([d])=>{const g=a==="border-box"?d.borderBoxSize:a==="content-box"?d.contentBoxSize:d.devicePixelContentBoxSize;if(t&&i.value){const s=$(o);if(s){const f=t.getComputedStyle(s);c.value=Number.parseFloat(f.width),m.value=Number.parseFloat(f.height)}}else if(g){const s=Array.isArray(g)?g:[g];c.value=s.reduce((f,{inlineSize:u})=>f+u,0),m.value=s.reduce((f,{blockSize:u})=>f+u,0)}else c.value=d.contentRect.width,m.value=d.contentRect.height},n);oe(()=>{const d=$(o);d&&(c.value="offsetWidth"in d?d.offsetWidth:l.width,m.value="offsetHeight"in d?d.offsetHeight:l.height)});const w=e.watch(()=>$(o),d=>{c.value=d?l.width:0,m.value=d?l.height:0});function v(){_(),w()}return{width:c,height:m,stop:v}}const ie=o=>(e.pushScopeId("data-v-8dfa7cd4"),o=o(),e.popScopeId(),o),ae={class:"title text-16px font-bold"},ce={class:"action"},de=["form"],ue={key:2,class:"modal-loading"},fe=ie(()=>e.createElementVNode("div",{class:"lds-ring"},[e.createElementVNode("div"),e.createElementVNode("div"),e.createElementVNode("div"),e.createElementVNode("div")],-1)),pe=[fe],me={name:"ModalContainer",inheritAttrs:!0},he=e.defineComponent({...me,props:{id:{},form:{},component:{},componentProps:{},width:{},maxWidth:{},maxHeight:{default:90},sizes:{},size:{default:"middle"},fullscreen:{type:Boolean},title:{},header:{type:Boolean,default:!0},footer:{type:Boolean,default:!1},closeable:{type:Boolean,default:!0},esc:{type:Boolean,default:!1},maskClosable:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},mode:{default:"dialog"},type:{},offset:{},backgroundColor:{},bodyStyle:{},submitText:{default:"确定"},cancelText:{default:"取消"},zIndex:{default:1e3}},emits:["submit"],setup(o,{expose:l,emit:n}){e.useCssVars(r=>({"359e2d1e":r.zIndex,"635715bb":B.value}));const t=o,a=n,i=e.inject(L),c=e.ref(!1);let m=0,_=0;const w=e.shallowRef(),v=e.shallowRef(),d=e.shallowRef(),g=e.shallowRef(),s=e.shallowRef(),f=e.shallowRef(),{height:u}=A(w),{height:y}=A(d,void 0,{box:"border-box"}),{height:p}=A(g,void 0,{box:"border-box"}),{height:M}=A(s),{height:N}=A(f),B=e.computed(()=>t.zIndex+100),{x:z,y:H}=le(d,{initialValue:{x:0,y:0}});function h(){i==null||i.close(t.id)}function x(r){return typeof r=="number"?`${r}px`:r}const b=e.computed(()=>{const r={};return t.mode==="dialog"&&(r.justifyContent="center"),t.mode==="drawer"&&(r.justifyContent="flex-end"),r}),R=e.computed(()=>{const r={};return t.size&&(r.width=x(t.sizes[t.size])),t.width&&(r.width=x(t.width)),t.maxWidth&&(r.maxWidth=x(t.maxWidth)),t.fullscreen&&(r.maxWidth="unset",r.width="100%",r.position="fixed",r.top=0,r.left=0,r.bottom=0,r.right=0,r.borderRadius=0),t.draggable&&!t.fullscreen&&t.mode==="dialog"&&(r.transform=`translate3d(${z.value-m}px, ${H.value-_}px, 0px)`),t.mode==="drawer"&&(r.borderRadius=0,r.height="100%"),t.offset&&t.mode==="dialog"&&(r.marginLeft=`${t.offset.x||0}px`,r.marginTop=`${t.offset.y||0}px`),t.backgroundColor&&(r.backgroundColor=t.backgroundColor),r}),E=e.computed(()=>{const r={};return t.draggable&&!t.fullscreen&&t.mode==="dialog"&&(r.cursor="move"),r}),S=e.computed(()=>{const r={},C=M.value+N.value+y.value+p.value,F=Math.floor(u.value*(Number(x(t.maxHeight).replace("%",""))/100));return t.maxHeight&&(r.maxHeight=`${F-C}px`),t.mode==="drawer"&&(r.maxHeight="unset",r.height=`${u.value-C}px`),t.fullscreen&&(r.maxHeight="unset",r.height=`calc(100% - ${C}px)`),t.type!=="component"&&(r.padding="0"),t.bodyStyle&&Object.assign(r,t.bodyStyle),r});function V(){const r=v.value;if(t.form&&r){const C=r.querySelector(`form[name="${t.form}"]`);C&&C.dispatchEvent(new Event("submit"))}a("submit")}function X(){i==null||i.close(t.id)}function Y(){window&&window.addEventListener("resize",()=>{e.triggerRef(w),e.triggerRef(v),v.value&&(m=v.value.offsetLeft,_=v.value.offsetTop)})}function q(){if(t.closeable&&t.esc){const r=({key:C})=>{C==="Escape"&&(i==null||i.close(t.id),window.removeEventListener("keydown",r))};window.addEventListener("keydown",r)}}function U(){m=v.value.offsetLeft,_=v.value.offsetTop}e.onMounted(()=>{q(),Y()}),e.onUnmounted(()=>{});function Z(){return c.value=!0,()=>D()}function D(){c.value=!1}return l({showLoading:Z,hideLoading:D}),(r,C)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperRef",ref:w,class:"modal-wrapper",style:e.normalizeStyle(b.value),onClick:C[0]||(C[0]=e.withModifiers(F=>r.maskClosable&&h(),["self"]))},[e.createElementVNode("div",{ref_key:"contentRef",ref:v,class:e.normalizeClass(["modal-content",{[`${r.mode}-mode`]:!0}]),style:e.normalizeStyle(R.value)},[r.header?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"headerRef",ref:d,class:"modal-header",style:e.normalizeStyle(E.value),onMousedown:U},[e.createElementVNode("div",ae,e.toDisplayString(r.title),1),e.createElementVNode("div",ce,[r.closeable?(e.openBlock(),e.createElementBlock("div",{key:0,class:"i-icon-park-outline:close block cursor-pointer",onClick:h})):e.createCommentVNode("",!0)])],36)):e.createCommentVNode("",!0),e.createElementVNode("div",{id:"modal-header-slot",ref_key:"headerSlotRef",ref:s},null,512),e.createElementVNode("div",{class:"modal-body",style:e.normalizeStyle(S.value)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.component),e.normalizeProps(e.guardReactiveProps(r.componentProps)),null,16))],4),e.createElementVNode("div",{id:"modal-footer-slot",ref_key:"footerSlotRef",ref:f},null,512),r.footer?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"footerRef",ref:g,class:"modal-footer space-x-2"},[e.createElementVNode("button",{class:"cancel-button",type:"button",onClick:X},e.toDisplayString(r.cancelText),1),e.createElementVNode("button",{class:"submit-button",form:r.form,type:"submit",onClick:V},e.toDisplayString(r.submitText),9,de)],512)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("div",ue,pe)):e.createCommentVNode("",!0)],6)],4))}});const P=(o,l)=>{const n=o.__vccOpts||o;for(const[t,a]of l)n[t]=a;return n},G=P(he,[["__scopeId","data-v-8dfa7cd4"]]),ve={class:"modal-dialog"},ge={class:"dialog-body"},ye={class:"dialog-title"},_e={class:"dialog-content"},we=e.defineComponent({__name:"modal-dialog",props:{type:{},title:{},content:{},okText:{default:"确定"},cancelText:{default:"取消"},onOk:{},onCancel:{},footer:{}},setup(o){const l=o,n=K(),t=e.computed(()=>l.title?l.title:{confirm:"提示",info:"提示",warning:"警告",error:"错误",success:"成功"}[l.type]);async function a(){l.onOk&&await l.onOk(),n.close()}async function i(){l.onCancel&&await l.onCancel(),n.close()}return(c,m)=>(e.openBlock(),e.createElementBlock("section",ve,[e.createElementVNode("div",ge,[e.createElementVNode("div",ye,e.toDisplayString(t.value),1),e.createElementVNode("div",_e,e.toDisplayString(c.content),1)]),e.createElementVNode("div",{class:"dialog-footer space-x-2",style:e.normalizeStyle(c.type==="confirm"?{"justify-content":"end"}:{"border-top":"none"})},[c.footer?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.footer),{key:0})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("button",{class:"submit-button",type:"submit",onClick:a},e.toDisplayString(c.okText),1),c.type==="confirm"?(e.openBlock(),e.createElementBlock("button",{key:0,class:"cancel-button",type:"button",onClick:i},e.toDisplayString(c.cancelText),1)):e.createCommentVNode("",!0)],64))],4)]))}});const be=P(we,[["__scopeId","data-v-8326e5a5"]]),ke={key:0,class:"modal-teleport"},Ce={name:"ModalProvider",inheritAttrs:!0},xe=e.defineComponent({...Ce,props:{appendToBody:{type:[Boolean,String],default:!1},sizes:{default:()=>({small:520,middle:860,large:1190})},maxWidth:{default:"90%"},maxHeight:{default:"90%"},offset:{default:()=>({x:0,y:0})}},setup(o,{expose:l}){const n=e.shallowRef([]),t=e.ref(!1),a=e.getCurrentInstance();let i=1100;function c(s,f={},u={}){const y=e.defineAsyncComponent(()=>Promise.resolve(typeof s=="string"?be:s));typeof s=="string"&&(f.type=s,u.size="small",u.fullscreen=!1,u.mode="dialog",u.footer=!1,u.header=!1);const p=Math.random().toString(32).slice(2),M=Object.assign({zIndex:i++},f),N=new Promise((B,z)=>{n.value.push({id:p,component:y,props:f||{},options:{...M,type:typeof s=="string"?s:"component"},resolve:B,reject:z,listeners:[]}),e.triggerRef(n)}).catch(B=>B==="CANCEL"?new Promise(()=>{}):Promise.reject(B));return Object.assign(N,{close:()=>m(p)})}function m(s,f){const u=n.value.findIndex(p=>p.id===s);if(u<0)return;const y=n.value[u];f===void 0?y==null||y.reject("CANCEL"):y==null||y.resolve(f),n.value.splice(u,1),e.triggerRef(n)}function _(){!n.value||n.value.length===0||(n.value.forEach(s=>{s==null||s.reject("CANCEL")}),n.value=[],e.triggerRef(n))}function w(s,f){const u=n.value.find(p=>p.id===s);if(!u)return;const y=u.listeners.find(p=>p.event===f);y&&y.callback({open:c,close:p=>m(u.id,p),closeAll:_,showLoading:()=>v(u.id),hideLoading:()=>d(u.id),confirm:p=>c("confirm",p),success:p=>c("success",p),error:p=>c("error",p),warning:p=>c("warning",p),info:p=>c("info",p)})}function v(s){if(!a)return;const[f]=a.refs[`modal-container_${s}`];if(f)return f.showLoading()}function d(s){if(!a)return;const[f]=a.refs[`modal-container_${s}`];if(f)return f.hideLoading()}function g(s,f,u){const y=n.value.find(p=>p.id===s);y&&y.listeners.push({event:f,callback:u})}return e.provide(L,{open:c,close:m,closeAll:_,addEventListener:g}),l({elements:n,open:c,close:m,closeAll:_}),e.onMounted(()=>{t.value=!0}),(s,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(s.$slots,"default",{},void 0,!0),t.value?(e.openBlock(),e.createElementBlock("div",ke,[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!s.appendToBody,to:typeof s.appendToBody=="string"?s.appendToBody:"body"},[e.createVNode(e.TransitionGroup,{name:"modal-fade"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,u=>(e.openBlock(),e.createBlock(G,e.mergeProps({id:u.id,key:u.id,ref_for:!0,ref:`modal-container_${u.id}`,component:u.component,"component-props":u.props,"max-height":s.maxHeight,"max-width":s.maxWidth,offset:s.offset,sizes:s.sizes},u.options,{onSubmit:()=>w(u.id,"submit")}),null,16,["id","component","component-props","max-height","max-width","offset","sizes","onSubmit"]))),128))]),_:1})],8,["disabled","to"]))])):e.createCommentVNode("",!0)],64))}});const Ee=P(xe,[["__scopeId","data-v-560682b4"]]);const Se={},Be={class:"modal-footer"};function Me(o,l){return e.openBlock(),e.createBlock(e.Teleport,{to:"#modal-footer-slot"},[e.createElementVNode("div",Be,[e.renderSlot(o.$slots,"default",{},void 0,!0)])])}const Ne=P(Se,[["render",Me],["__scopeId","data-v-2080a86e"]]);const Re={},$e={class:"modal-header"};function Ve(o,l){return e.openBlock(),e.createBlock(e.Teleport,{to:"#modal-header-slot"},[e.createElementVNode("div",$e,[e.renderSlot(o.$slots,"default",{},void 0,!0)])])}const ze=P(Re,[["render",Ve],["__scopeId","data-v-d0247172"]]);function T(o,l){var t,a;let n=o==null?void 0:o.parent;for(;n&&((t=n==null?void 0:n.type)==null?void 0:t.name)!==l;)n=n.parent;return((a=n==null?void 0:n.type)==null?void 0:a.name)===l?n:null}function K(){const o=e.inject(L),l=e.getCurrentInstance();function n(t,a,i){if(!o)throw new Error("Not Found Modal Provider Component");return o.open(t,a,i)}return{open:n,close(t){var c;if(!o)throw new Error("Not Found Modal Provider Component");const a=T(l,"ModalContainer"),i=(c=a==null?void 0:a.props)==null?void 0:c.id;if(!i)throw new Error("Not Found Current Modal Container");o.close(i,t)},closeAll(){if(!o)throw new Error("Not Found Modal Provider Component");o.closeAll()},showLoading(){var i;if(!o)throw new Error("Not Found Modal Provider Component");const t=T(l,"ModalContainer");if(!((i=t==null?void 0:t.props)==null?void 0:i.id))throw new Error("Not Found Current Modal Container");t!=null&&t.exposed&&(t==null||t.exposed.showLoading())},hideLoading(){var i;if(!o)throw new Error("Not Found Modal Provider Component");const t=T(l,"ModalContainer");if(!((i=t==null?void 0:t.props)==null?void 0:i.id))throw new Error("Not Found Current Modal Container");t!=null&&t.exposed&&(t==null||t.exposed.hideLoading())},confirm(t){return this.open("confirm",t)},info(t){return this.open("info",t)},error(t){return this.open("error",t)},warning(t){return this.open("warning",t)},success(t){return this.open("success",t)}}}function Ae(o){var i;const l=e.inject(L),n=e.getCurrentInstance(),t=T(n,"ModalContainer"),a=(i=t==null?void 0:t.props)==null?void 0:i.id;l&&a&&l.addEventListener(a,"submit",o)}exports.ModalContainer=G;exports.ModalFooter=Ne;exports.ModalHeader=ze;exports.ModalKey=L;exports.ModalProvider=Ee;exports.onSubmit=Ae;exports.useModal=K;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");const L=Symbol("__MODAL__");function W(o){return e.getCurrentScope()?(e.onScopeDispose(o),!0):!1}function k(o){return typeof o=="function"?o():e.unref(o)}const j=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const J=Object.prototype.toString,Q=o=>J.call(o)==="[object Object]",ee=()=>{};function te(o,l={}){if(!e.isRef(o))return e.toRefs(o);const n=Array.isArray(o.value)?Array.from({length:o.value.length}):{};for(const t in o.value)n[t]=e.customRef(()=>({get(){return o.value[t]},set(a){var i;if((i=k(l.replaceRef))!=null?i:!0)if(Array.isArray(o.value)){const m=[...o.value];m[t]=a,o.value=m}else{const m={...o.value,[t]:a};Object.setPrototypeOf(m,Object.getPrototypeOf(o.value)),o.value=m}else o.value[t]=a}}));return n}function oe(o,l=!0){e.getCurrentInstance()?e.onMounted(o):l?o():e.nextTick(o)}function $(o){var l;const n=k(o);return(l=n==null?void 0:n.$el)!=null?l:n}const O=j?window:void 0;function I(...o){let l,n,t,a;if(typeof o[0]=="string"||Array.isArray(o[0])?([n,t,a]=o,l=O):[l,n,t,a]=o,!l)return ee;Array.isArray(n)||(n=[n]),Array.isArray(t)||(t=[t]);const i=[],c=()=>{i.forEach(v=>v()),i.length=0},m=(v,d,g,s)=>(v.addEventListener(d,g,s),()=>v.removeEventListener(d,g,s)),_=e.watch(()=>[$(l),k(a)],([v,d])=>{if(c(),!v)return;const g=Q(d)?{...d}:d;i.push(...n.flatMap(s=>t.map(p=>m(v,s,p,g))))},{immediate:!0,flush:"post"}),w=()=>{_(),c()};return W(w),w}function ne(){const o=e.ref(!1);return e.getCurrentInstance()&&e.onMounted(()=>{o.value=!0}),o}function re(o){const l=ne();return e.computed(()=>(l.value,!!o()))}function le(o,l={}){var n,t;const{pointerTypes:a,preventDefault:i,stopPropagation:c,exact:m,onMove:_,onEnd:w,onStart:v,initialValue:d,axis:g="both",draggingElement:s=O,containerElement:p,handle:u=o}=l,y=e.ref((n=k(d))!=null?n:{x:0,y:0}),f=e.ref(),M=h=>a?a.includes(h.pointerType):!0,N=h=>{k(i)&&h.preventDefault(),k(c)&&h.stopPropagation()},B=h=>{var x;if(!M(h)||k(m)&&h.target!==k(o))return;const b=k(p),R=(x=b==null?void 0:b.getBoundingClientRect)==null?void 0:x.call(b),E=k(o).getBoundingClientRect(),S={x:h.clientX-(b?E.left-R.left:E.left),y:h.clientY-(b?E.top-R.top:E.top)};(v==null?void 0:v(S,h))!==!1&&(f.value=S,N(h))},z=h=>{var x;if(!M(h)||!f.value)return;const b=k(p),R=(x=b==null?void 0:b.getBoundingClientRect)==null?void 0:x.call(b),E=k(o).getBoundingClientRect();let{x:S,y:V}=y.value;(g==="x"||g==="both")&&(S=h.clientX-f.value.x,b&&(S=Math.min(Math.max(0,S),R.width-E.width))),(g==="y"||g==="both")&&(V=h.clientY-f.value.y,b&&(V=Math.min(Math.max(0,V),R.height-E.height))),y.value={x:S,y:V},_==null||_(y.value,h),N(h)},H=h=>{M(h)&&f.value&&(f.value=void 0,w==null||w(y.value,h),N(h))};if(j){const h={capture:(t=l.capture)!=null?t:!0};I(u,"pointerdown",B,h),I(s,"pointermove",z,h),I(s,"pointerup",H,h)}return{...te(y),position:y,isDragging:e.computed(()=>!!f.value),style:e.computed(()=>`left:${y.value.x}px;top:${y.value.y}px;`)}}function se(o,l,n={}){const{window:t=O,...a}=n;let i;const c=re(()=>t&&"ResizeObserver"in t),m=()=>{i&&(i.disconnect(),i=void 0)},_=e.computed(()=>Array.isArray(o)?o.map(d=>$(d)):[$(o)]),w=e.watch(_,d=>{if(m(),c.value&&t){i=new ResizeObserver(l);for(const g of d)g&&i.observe(g,a)}},{immediate:!0,flush:"post",deep:!0}),v=()=>{m(),w()};return W(v),{isSupported:c,stop:v}}function A(o,l={width:0,height:0},n={}){const{window:t=O,box:a="content-box"}=n,i=e.computed(()=>{var d,g;return(g=(d=$(o))==null?void 0:d.namespaceURI)==null?void 0:g.includes("svg")}),c=e.ref(l.width),m=e.ref(l.height),{stop:_}=se(o,([d])=>{const g=a==="border-box"?d.borderBoxSize:a==="content-box"?d.contentBoxSize:d.devicePixelContentBoxSize;if(t&&i.value){const s=$(o);if(s){const p=t.getComputedStyle(s);c.value=Number.parseFloat(p.width),m.value=Number.parseFloat(p.height)}}else if(g){const s=Array.isArray(g)?g:[g];c.value=s.reduce((p,{inlineSize:u})=>p+u,0),m.value=s.reduce((p,{blockSize:u})=>p+u,0)}else c.value=d.contentRect.width,m.value=d.contentRect.height},n);oe(()=>{const d=$(o);d&&(c.value="offsetWidth"in d?d.offsetWidth:l.width,m.value="offsetHeight"in d?d.offsetHeight:l.height)});const w=e.watch(()=>$(o),d=>{c.value=d?l.width:0,m.value=d?l.height:0});function v(){_(),w()}return{width:c,height:m,stop:v}}const ie=o=>(e.pushScopeId("data-v-8dfa7cd4"),o=o(),e.popScopeId(),o),ae={class:"title text-16px font-bold"},ce={class:"action"},de=["form"],ue={key:2,class:"modal-loading"},fe=ie(()=>e.createElementVNode("div",{class:"lds-ring"},[e.createElementVNode("div"),e.createElementVNode("div"),e.createElementVNode("div"),e.createElementVNode("div")],-1)),pe=[fe],me={name:"ModalContainer",inheritAttrs:!0},he=e.defineComponent({...me,props:{id:{},form:{},component:{},componentProps:{},width:{},maxWidth:{},maxHeight:{default:90},sizes:{},size:{default:"middle"},fullscreen:{type:Boolean},title:{},header:{type:Boolean,default:!0},footer:{type:Boolean,default:!1},closeable:{type:Boolean,default:!0},esc:{type:Boolean,default:!1},maskClosable:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},mode:{default:"dialog"},type:{},offset:{},backgroundColor:{},bodyStyle:{},submitText:{default:"确定"},cancelText:{default:"取消"},zIndex:{default:1e3}},emits:["submit"],setup(o,{expose:l,emit:n}){e.useCssVars(r=>({"359e2d1e":r.zIndex,"635715bb":B.value}));const t=o,a=n,i=e.inject(L),c=e.ref(!1);let m=0,_=0;const w=e.shallowRef(),v=e.shallowRef(),d=e.shallowRef(),g=e.shallowRef(),s=e.shallowRef(),p=e.shallowRef(),{height:u}=A(w),{height:y}=A(d,void 0,{box:"border-box"}),{height:f}=A(g,void 0,{box:"border-box"}),{height:M}=A(s),{height:N}=A(p),B=e.computed(()=>t.zIndex+100),{x:z,y:H}=le(d,{initialValue:{x:0,y:0}});function h(){i==null||i.close(t.id)}function x(r){return typeof r=="number"?`${r}px`:r}const b=e.computed(()=>{const r={};return t.mode==="dialog"&&(r.justifyContent="center"),t.mode==="drawer"&&(r.justifyContent="flex-end"),r}),R=e.computed(()=>{const r={};return t.size&&(r.width=x(t.sizes[t.size])),t.width&&(r.width=x(t.width)),t.maxWidth&&(r.maxWidth=x(t.maxWidth)),t.fullscreen&&(r.maxWidth="unset",r.width="100%",r.position="fixed",r.top=0,r.left=0,r.bottom=0,r.right=0,r.borderRadius=0),t.draggable&&!t.fullscreen&&t.mode==="dialog"&&(r.transform=`translate3d(${z.value-m}px, ${H.value-_}px, 0px)`),t.mode==="drawer"&&(r.borderRadius=0,r.height="100%"),t.offset&&t.mode==="dialog"&&(r.marginLeft=`${t.offset.x||0}px`,r.marginTop=`${t.offset.y||0}px`),t.backgroundColor&&(r.backgroundColor=t.backgroundColor),r}),E=e.computed(()=>{const r={};return t.draggable&&!t.fullscreen&&t.mode==="dialog"&&(r.cursor="move"),r}),S=e.computed(()=>{const r={},C=M.value+N.value+y.value+f.value,F=Math.floor(u.value*(Number(x(t.maxHeight).replace("%",""))/100));return t.maxHeight&&(r.maxHeight=`${F-C}px`),t.mode==="drawer"&&(r.maxHeight="unset",r.height=`${u.value-C}px`),t.fullscreen&&(r.maxHeight="unset",r.height=`calc(100% - ${C}px)`),t.type!=="component"&&(r.padding="0"),t.bodyStyle&&Object.assign(r,t.bodyStyle),r});function V(){const r=v.value;if(t.form&&r){const C=r.querySelector(`form[name="${t.form}"]`);C&&C.dispatchEvent(new Event("submit"))}a("submit")}function X(){i==null||i.close(t.id)}function Y(){window&&window.addEventListener("resize",()=>{e.triggerRef(w),e.triggerRef(v),v.value&&(m=v.value.offsetLeft,_=v.value.offsetTop)})}function q(){if(t.closeable&&t.esc){const r=({key:C})=>{C==="Escape"&&(i==null||i.close(t.id),window.removeEventListener("keydown",r))};window.addEventListener("keydown",r)}}function U(){m=v.value.offsetLeft,_=v.value.offsetTop}e.onMounted(()=>{q(),Y()}),e.onUnmounted(()=>{});function Z(){return c.value=!0,()=>D()}function D(){c.value=!1}return l({showLoading:Z,hideLoading:D}),(r,C)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperRef",ref:w,class:"modal-wrapper",style:e.normalizeStyle(b.value),onClick:C[0]||(C[0]=e.withModifiers(F=>r.maskClosable&&h(),["self"]))},[e.createElementVNode("div",{ref_key:"contentRef",ref:v,class:e.normalizeClass(["modal-content",{[`${r.mode}-mode`]:!0}]),style:e.normalizeStyle(R.value)},[r.header?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"headerRef",ref:d,class:"modal-header",style:e.normalizeStyle(E.value),onMousedown:U},[e.createElementVNode("div",ae,e.toDisplayString(r.title),1),e.createElementVNode("div",ce,[r.closeable?(e.openBlock(),e.createElementBlock("div",{key:0,class:"i-icon-park-outline:close block cursor-pointer",onClick:h})):e.createCommentVNode("",!0)])],36)):e.createCommentVNode("",!0),e.createElementVNode("div",{id:"modal-header-slot",ref_key:"headerSlotRef",ref:s},null,512),e.createElementVNode("div",{class:"modal-body",style:e.normalizeStyle(S.value)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.component),e.normalizeProps(e.guardReactiveProps(r.componentProps)),null,16))],4),e.createElementVNode("div",{id:"modal-footer-slot",ref_key:"footerSlotRef",ref:p},null,512),r.footer?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"footerRef",ref:g,class:"modal-footer space-x-2"},[e.createElementVNode("button",{class:"cancel-button",type:"button",onClick:X},e.toDisplayString(r.cancelText),1),e.createElementVNode("button",{class:"submit-button",form:r.form,type:"submit",onClick:V},e.toDisplayString(r.submitText),9,de)],512)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("div",ue,pe)):e.createCommentVNode("",!0)],6)],4))}});const P=(o,l)=>{const n=o.__vccOpts||o;for(const[t,a]of l)n[t]=a;return n},G=P(he,[["__scopeId","data-v-8dfa7cd4"]]),ve={class:"modal-dialog"},ge={class:"dialog-body"},ye={class:"dialog-title"},_e={class:"dialog-content"},we=e.defineComponent({__name:"modal-dialog",props:{type:{},title:{},content:{},okText:{default:"确定"},cancelText:{default:"取消"},onOk:{},onCancel:{},footer:{}},setup(o){const l=o,n=K(),t=e.computed(()=>l.title?l.title:{confirm:"提示",info:"提示",warning:"警告",error:"错误",success:"成功"}[l.type]);async function a(){l.onOk&&await l.onOk(),n.close()}async function i(){l.onCancel&&await l.onCancel(),n.close()}return(c,m)=>(e.openBlock(),e.createElementBlock("section",ve,[e.createElementVNode("div",ge,[e.createElementVNode("div",ye,e.toDisplayString(t.value),1),e.createElementVNode("div",_e,e.toDisplayString(c.content),1)]),e.createElementVNode("div",{class:"dialog-footer space-x-2",style:e.normalizeStyle(c.type==="confirm"?{"justify-content":"end"}:{"border-top":"none"})},[c.footer?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.footer),{key:0})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("button",{class:"submit-button",type:"submit",onClick:a},e.toDisplayString(c.okText),1),c.type==="confirm"?(e.openBlock(),e.createElementBlock("button",{key:0,class:"cancel-button",type:"button",onClick:i},e.toDisplayString(c.cancelText),1)):e.createCommentVNode("",!0)],64))],4)]))}});const be=P(we,[["__scopeId","data-v-8326e5a5"]]),ke={key:0,class:"modal-teleport"},Ce={name:"ModalProvider",inheritAttrs:!0},xe=e.defineComponent({...Ce,props:{appendToBody:{type:[Boolean,String],default:!1},sizes:{default:()=>({small:520,middle:860,large:1190})},maxWidth:{default:"90%"},maxHeight:{default:"90%"},offset:{default:()=>({x:0,y:0})}},setup(o,{expose:l}){const n=e.shallowRef([]),t=e.ref(!1),a=e.getCurrentInstance();let i=1100;function c(s,p={},u={}){const y=e.defineAsyncComponent(()=>Promise.resolve(typeof s=="string"?be:s));typeof s=="string"&&(p.type=s,u.size="small",u.fullscreen=!1,u.mode="dialog",u.footer=!1,u.header=!1);const f=Math.random().toString(32).slice(2),M=Object.assign({zIndex:i++},p),N=new Promise((B,z)=>{n.value.push({id:f,component:y,props:M,options:{...u,type:typeof s=="string"?s:"component"},resolve:B,reject:z,listeners:[]}),e.triggerRef(n)}).catch(B=>B==="CANCEL"?new Promise(()=>{}):Promise.reject(B));return Object.assign(N,{close:()=>m(f)})}function m(s,p){const u=n.value.findIndex(f=>f.id===s);if(u<0)return;const y=n.value[u];p===void 0?y==null||y.reject("CANCEL"):y==null||y.resolve(p),n.value.splice(u,1),e.triggerRef(n)}function _(){!n.value||n.value.length===0||(n.value.forEach(s=>{s==null||s.reject("CANCEL")}),n.value=[],e.triggerRef(n))}function w(s,p){const u=n.value.find(f=>f.id===s);if(!u)return;const y=u.listeners.find(f=>f.event===p);y&&y.callback({open:c,close:f=>m(u.id,f),closeAll:_,showLoading:()=>v(u.id),hideLoading:()=>d(u.id),confirm:f=>c("confirm",f),success:f=>c("success",f),error:f=>c("error",f),warning:f=>c("warning",f),info:f=>c("info",f)})}function v(s){if(!a)return;const[p]=a.refs[`modal-container_${s}`];if(p)return p.showLoading()}function d(s){if(!a)return;const[p]=a.refs[`modal-container_${s}`];if(p)return p.hideLoading()}function g(s,p,u){const y=n.value.find(f=>f.id===s);y&&y.listeners.push({event:p,callback:u})}return e.provide(L,{open:c,close:m,closeAll:_,addEventListener:g}),l({elements:n,open:c,close:m,closeAll:_}),e.onMounted(()=>{t.value=!0}),(s,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(s.$slots,"default",{},void 0,!0),t.value?(e.openBlock(),e.createElementBlock("div",ke,[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!s.appendToBody,to:typeof s.appendToBody=="string"?s.appendToBody:"body"},[e.createVNode(e.TransitionGroup,{name:"modal-fade"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,u=>(e.openBlock(),e.createBlock(G,e.mergeProps({id:u.id,key:u.id,ref_for:!0,ref:`modal-container_${u.id}`,component:u.component,"component-props":u.props,"max-height":s.maxHeight,"max-width":s.maxWidth,offset:s.offset,sizes:s.sizes},u.options,{onSubmit:()=>w(u.id,"submit")}),null,16,["id","component","component-props","max-height","max-width","offset","sizes","onSubmit"]))),128))]),_:1})],8,["disabled","to"]))])):e.createCommentVNode("",!0)],64))}});const Ee=P(xe,[["__scopeId","data-v-69463faf"]]);const Se={},Be={class:"modal-footer"};function Me(o,l){return e.openBlock(),e.createBlock(e.Teleport,{to:"#modal-footer-slot"},[e.createElementVNode("div",Be,[e.renderSlot(o.$slots,"default",{},void 0,!0)])])}const Ne=P(Se,[["render",Me],["__scopeId","data-v-2080a86e"]]);const Re={},$e={class:"modal-header"};function Ve(o,l){return e.openBlock(),e.createBlock(e.Teleport,{to:"#modal-header-slot"},[e.createElementVNode("div",$e,[e.renderSlot(o.$slots,"default",{},void 0,!0)])])}const ze=P(Re,[["render",Ve],["__scopeId","data-v-d0247172"]]);function T(o,l){var t,a;let n=o==null?void 0:o.parent;for(;n&&((t=n==null?void 0:n.type)==null?void 0:t.name)!==l;)n=n.parent;return((a=n==null?void 0:n.type)==null?void 0:a.name)===l?n:null}function K(){const o=e.inject(L),l=e.getCurrentInstance();function n(t,a,i){if(!o)throw new Error("Not Found Modal Provider Component");return o.open(t,a,i)}return{open:n,close(t){var c;if(!o)throw new Error("Not Found Modal Provider Component");const a=T(l,"ModalContainer"),i=(c=a==null?void 0:a.props)==null?void 0:c.id;if(!i)throw new Error("Not Found Current Modal Container");o.close(i,t)},closeAll(){if(!o)throw new Error("Not Found Modal Provider Component");o.closeAll()},showLoading(){var i;if(!o)throw new Error("Not Found Modal Provider Component");const t=T(l,"ModalContainer");if(!((i=t==null?void 0:t.props)==null?void 0:i.id))throw new Error("Not Found Current Modal Container");t!=null&&t.exposed&&(t==null||t.exposed.showLoading())},hideLoading(){var i;if(!o)throw new Error("Not Found Modal Provider Component");const t=T(l,"ModalContainer");if(!((i=t==null?void 0:t.props)==null?void 0:i.id))throw new Error("Not Found Current Modal Container");t!=null&&t.exposed&&(t==null||t.exposed.hideLoading())},confirm(t){return this.open("confirm",t)},info(t){return this.open("info",t)},error(t){return this.open("error",t)},warning(t){return this.open("warning",t)},success(t){return this.open("success",t)}}}function Ae(o){var i;const l=e.inject(L),n=e.getCurrentInstance(),t=T(n,"ModalContainer"),a=(i=t==null?void 0:t.props)==null?void 0:i.id;l&&a&&l.addEventListener(a,"submit",o)}exports.ModalContainer=G;exports.ModalFooter=Ne;exports.ModalHeader=ze;exports.ModalKey=L;exports.ModalProvider=Ee;exports.onSubmit=Ae;exports.useModal=K;
package/dist/es/index.mjs CHANGED
@@ -58,7 +58,7 @@ function J(...t) {
58
58
  return;
59
59
  const m = Ie(d) ? { ...d } : d;
60
60
  i.push(
61
- ...o.flatMap((r) => e.map((u) => p(h, r, u, m)))
61
+ ...o.flatMap((r) => e.map((f) => p(h, r, f, m)))
62
62
  );
63
63
  },
64
64
  { immediate: !0, flush: "post" }
@@ -90,33 +90,33 @@ function je(t, s = {}) {
90
90
  initialValue: d,
91
91
  axis: m = "both",
92
92
  draggingElement: r = q,
93
- containerElement: u,
93
+ containerElement: f,
94
94
  handle: c = t
95
95
  } = s, g = H(
96
96
  (o = C(d)) != null ? o : { x: 0, y: 0 }
97
- ), f = H(), R = (v) => l ? l.includes(v.pointerType) : !0, z = (v) => {
97
+ ), u = H(), R = (v) => l ? l.includes(v.pointerType) : !0, z = (v) => {
98
98
  C(i) && v.preventDefault(), C(a) && v.stopPropagation();
99
99
  }, L = (v) => {
100
100
  var E;
101
101
  if (!R(v) || C(p) && v.target !== C(t))
102
102
  return;
103
- const x = C(u), B = (E = x == null ? void 0 : x.getBoundingClientRect) == null ? void 0 : E.call(x), $ = C(t).getBoundingClientRect(), A = {
103
+ const x = C(f), B = (E = x == null ? void 0 : x.getBoundingClientRect) == null ? void 0 : E.call(x), $ = C(t).getBoundingClientRect(), A = {
104
104
  x: v.clientX - (x ? $.left - B.left : $.left),
105
105
  y: v.clientY - (x ? $.top - B.top : $.top)
106
106
  };
107
- (h == null ? void 0 : h(A, v)) !== !1 && (f.value = A, z(v));
107
+ (h == null ? void 0 : h(A, v)) !== !1 && (u.value = A, z(v));
108
108
  }, W = (v) => {
109
109
  var E;
110
- if (!R(v) || !f.value)
110
+ if (!R(v) || !u.value)
111
111
  return;
112
- const x = C(u), B = (E = x == null ? void 0 : x.getBoundingClientRect) == null ? void 0 : E.call(x), $ = C(t).getBoundingClientRect();
112
+ const x = C(f), B = (E = x == null ? void 0 : x.getBoundingClientRect) == null ? void 0 : E.call(x), $ = C(t).getBoundingClientRect();
113
113
  let { x: A, y: I } = g.value;
114
- (m === "x" || m === "both") && (A = v.clientX - f.value.x, x && (A = Math.min(Math.max(0, A), B.width - $.width))), (m === "y" || m === "both") && (I = v.clientY - f.value.y, x && (I = Math.min(Math.max(0, I), B.height - $.height))), g.value = {
114
+ (m === "x" || m === "both") && (A = v.clientX - u.value.x, x && (A = Math.min(Math.max(0, A), B.width - $.width))), (m === "y" || m === "both") && (I = v.clientY - u.value.y, x && (I = Math.min(Math.max(0, I), B.height - $.height))), g.value = {
115
115
  x: A,
116
116
  y: I
117
117
  }, b == null || b(g.value, v), z(v);
118
118
  }, Z = (v) => {
119
- R(v) && f.value && (f.value = void 0, w == null || w(g.value, v), z(v));
119
+ R(v) && u.value && (u.value = void 0, w == null || w(g.value, v), z(v));
120
120
  };
121
121
  if (de) {
122
122
  const v = { capture: (e = s.capture) != null ? e : !0 };
@@ -125,7 +125,7 @@ function je(t, s = {}) {
125
125
  return {
126
126
  ...Fe(g),
127
127
  position: g,
128
- isDragging: M(() => !!f.value),
128
+ isDragging: M(() => !!u.value),
129
129
  style: M(
130
130
  () => `left:${g.value.x}px;top:${g.value.y}px;`
131
131
  )
@@ -165,12 +165,12 @@ function D(t, s = { width: 0, height: 0 }, o = {}) {
165
165
  if (e && i.value) {
166
166
  const r = T(t);
167
167
  if (r) {
168
- const u = e.getComputedStyle(r);
169
- a.value = Number.parseFloat(u.width), p.value = Number.parseFloat(u.height);
168
+ const f = e.getComputedStyle(r);
169
+ a.value = Number.parseFloat(f.width), p.value = Number.parseFloat(f.height);
170
170
  }
171
171
  } else if (m) {
172
172
  const r = Array.isArray(m) ? m : [m];
173
- a.value = r.reduce((u, { inlineSize: c }) => u + c, 0), p.value = r.reduce((u, { blockSize: c }) => u + c, 0);
173
+ a.value = r.reduce((f, { inlineSize: c }) => f + c, 0), p.value = r.reduce((f, { blockSize: c }) => f + c, 0);
174
174
  } else
175
175
  a.value = d.contentRect.width, p.value = d.contentRect.height;
176
176
  },
@@ -245,7 +245,7 @@ const Xe = (t) => ($e("data-v-8dfa7cd4"), t = t(), Ae(), t), Ye = { class: "titl
245
245
  }));
246
246
  const e = t, l = o, i = oe(U), a = H(!1);
247
247
  let p = 0, b = 0;
248
- const w = P(), h = P(), d = P(), m = P(), r = P(), u = P(), { height: c } = D(w), { height: g } = D(d, void 0, { box: "border-box" }), { height: f } = D(m, void 0, { box: "border-box" }), { height: R } = D(r), { height: z } = D(u), L = M(() => e.zIndex + 100), { x: W, y: Z } = je(d, {
248
+ const w = P(), h = P(), d = P(), m = P(), r = P(), f = P(), { height: c } = D(w), { height: g } = D(d, void 0, { box: "border-box" }), { height: u } = D(m, void 0, { box: "border-box" }), { height: R } = D(r), { height: z } = D(f), L = M(() => e.zIndex + 100), { x: W, y: Z } = je(d, {
249
249
  initialValue: { x: 0, y: 0 }
250
250
  });
251
251
  function v() {
@@ -264,7 +264,7 @@ const Xe = (t) => ($e("data-v-8dfa7cd4"), t = t(), Ae(), t), Ye = { class: "titl
264
264
  const n = {};
265
265
  return e.draggable && !e.fullscreen && e.mode === "dialog" && (n.cursor = "move"), n;
266
266
  }), A = M(() => {
267
- const n = {}, k = R.value + z.value + g.value + f.value, ie = Math.floor(c.value * (Number(E(e.maxHeight).replace("%", "")) / 100));
267
+ const n = {}, k = R.value + z.value + g.value + u.value, ie = Math.floor(c.value * (Number(E(e.maxHeight).replace("%", "")) / 100));
268
268
  return e.maxHeight && (n.maxHeight = `${ie - k}px`), e.mode === "drawer" && (n.maxHeight = "unset", n.height = `${c.value - k}px`), e.fullscreen && (n.maxHeight = "unset", n.height = `calc(100% - ${k}px)`), e.type !== "component" && (n.padding = "0"), e.bodyStyle && Object.assign(n, e.bodyStyle), n;
269
269
  });
270
270
  function I() {
@@ -351,7 +351,7 @@ const Xe = (t) => ($e("data-v-8dfa7cd4"), t = t(), Ae(), t), Ye = { class: "titl
351
351
  y("div", {
352
352
  id: "modal-footer-slot",
353
353
  ref_key: "footerSlotRef",
354
- ref: u
354
+ ref: f
355
355
  }, null, 512),
356
356
  n.footer ? (_(), S("div", {
357
357
  key: 1,
@@ -455,18 +455,18 @@ const lt = /* @__PURE__ */ X(it, [["__scopeId", "data-v-8326e5a5"]]), at = {
455
455
  setup(t, { expose: s }) {
456
456
  const o = P([]), e = H(!1), l = G();
457
457
  let i = 1100;
458
- function a(r, u = {}, c = {}) {
458
+ function a(r, f = {}, c = {}) {
459
459
  const g = Te(
460
460
  () => Promise.resolve(typeof r == "string" ? lt : r)
461
461
  );
462
- typeof r == "string" && (u.type = r, c.size = "small", c.fullscreen = !1, c.mode = "dialog", c.footer = !1, c.header = !1);
463
- const f = Math.random().toString(32).slice(2), R = Object.assign({ zIndex: i++ }, u), z = new Promise((L, W) => {
462
+ typeof r == "string" && (f.type = r, c.size = "small", c.fullscreen = !1, c.mode = "dialog", c.footer = !1, c.header = !1);
463
+ const u = Math.random().toString(32).slice(2), R = Object.assign({ zIndex: i++ }, f), z = new Promise((L, W) => {
464
464
  o.value.push({
465
- id: f,
465
+ id: u,
466
466
  component: g,
467
- props: u || {},
467
+ props: R,
468
468
  options: {
469
- ...R,
469
+ ...c,
470
470
  type: typeof r == "string" ? r : "component"
471
471
  },
472
472
  resolve: L,
@@ -476,57 +476,57 @@ const lt = /* @__PURE__ */ X(it, [["__scopeId", "data-v-8326e5a5"]]), at = {
476
476
  }).catch((L) => L === "CANCEL" ? new Promise(() => {
477
477
  }) : Promise.reject(L));
478
478
  return Object.assign(z, {
479
- close: () => p(f)
479
+ close: () => p(u)
480
480
  });
481
481
  }
482
- function p(r, u) {
483
- const c = o.value.findIndex((f) => f.id === r);
482
+ function p(r, f) {
483
+ const c = o.value.findIndex((u) => u.id === r);
484
484
  if (c < 0)
485
485
  return;
486
486
  const g = o.value[c];
487
- u === void 0 ? g == null || g.reject("CANCEL") : g == null || g.resolve(u), o.value.splice(c, 1), j(o);
487
+ f === void 0 ? g == null || g.reject("CANCEL") : g == null || g.resolve(f), o.value.splice(c, 1), j(o);
488
488
  }
489
489
  function b() {
490
490
  !o.value || o.value.length === 0 || (o.value.forEach((r) => {
491
491
  r == null || r.reject("CANCEL");
492
492
  }), o.value = [], j(o));
493
493
  }
494
- function w(r, u) {
495
- const c = o.value.find((f) => f.id === r);
494
+ function w(r, f) {
495
+ const c = o.value.find((u) => u.id === r);
496
496
  if (!c)
497
497
  return;
498
- const g = c.listeners.find((f) => f.event === u);
498
+ const g = c.listeners.find((u) => u.event === f);
499
499
  g && g.callback({
500
500
  open: a,
501
- close: (f) => p(c.id, f),
501
+ close: (u) => p(c.id, u),
502
502
  closeAll: b,
503
503
  showLoading: () => h(c.id),
504
504
  hideLoading: () => d(c.id),
505
- confirm: (f) => a("confirm", f),
506
- success: (f) => a("success", f),
507
- error: (f) => a("error", f),
508
- warning: (f) => a("warning", f),
509
- info: (f) => a("info", f)
505
+ confirm: (u) => a("confirm", u),
506
+ success: (u) => a("success", u),
507
+ error: (u) => a("error", u),
508
+ warning: (u) => a("warning", u),
509
+ info: (u) => a("info", u)
510
510
  });
511
511
  }
512
512
  function h(r) {
513
513
  if (!l)
514
514
  return;
515
- const [u] = l.refs[`modal-container_${r}`];
516
- if (u)
517
- return u.showLoading();
515
+ const [f] = l.refs[`modal-container_${r}`];
516
+ if (f)
517
+ return f.showLoading();
518
518
  }
519
519
  function d(r) {
520
520
  if (!l)
521
521
  return;
522
- const [u] = l.refs[`modal-container_${r}`];
523
- if (u)
524
- return u.hideLoading();
522
+ const [f] = l.refs[`modal-container_${r}`];
523
+ if (f)
524
+ return f.hideLoading();
525
525
  }
526
- function m(r, u, c) {
527
- const g = o.value.find((f) => f.id === r);
526
+ function m(r, f, c) {
527
+ const g = o.value.find((u) => u.id === r);
528
528
  g && g.listeners.push({
529
- event: u,
529
+ event: f,
530
530
  callback: c
531
531
  });
532
532
  }
@@ -542,7 +542,7 @@ const lt = /* @__PURE__ */ X(it, [["__scopeId", "data-v-8326e5a5"]]), at = {
542
542
  closeAll: b
543
543
  }), K(() => {
544
544
  e.value = !0;
545
- }), (r, u) => (_(), S(Q, null, [
545
+ }), (r, f) => (_(), S(Q, null, [
546
546
  ne(r.$slots, "default", {}, void 0, !0),
547
547
  e.value ? (_(), S("div", at, [
548
548
  (_(), F(se, {
@@ -573,7 +573,7 @@ const lt = /* @__PURE__ */ X(it, [["__scopeId", "data-v-8326e5a5"]]), at = {
573
573
  ], 64));
574
574
  }
575
575
  });
576
- const _t = /* @__PURE__ */ X(ct, [["__scopeId", "data-v-560682b4"]]);
576
+ const _t = /* @__PURE__ */ X(ct, [["__scopeId", "data-v-69463faf"]]);
577
577
  const ut = {}, ft = { class: "modal-footer" };
578
578
  function pt(t, s) {
579
579
  return _(), F(se, { to: "#modal-footer-slot" }, [
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- *,:before,:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.i-icon-park-outline\:close{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 48 48' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='4' d='m8 8l32 32M8 40L40 8'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1em;height:1em}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.transform{transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.cursor-pointer{cursor:pointer}.resize{resize:both}.space-x-2>:not([hidden])~:not([hidden]){--un-space-x-reverse:0;margin-left:calc(.5rem * calc(1 - var(--un-space-x-reverse)));margin-right:calc(.5rem * var(--un-space-x-reverse))}.border{border-width:1px}.px{padding-left:1rem;padding-right:1rem}.text-16px{font-size:16px}.font-bold{font-weight:700}.outline{outline-style:solid}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease{transition-timing-function:cubic-bezier(.4,0,.2,1)}.modal-wrapper[data-v-8dfa7cd4]{z-index:var(--359e2d1e);position:fixed;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;background:rgba(0,0,0,.3)}.modal-content[data-v-8dfa7cd4]{background:#ffffff;border-radius:5px;position:relative}.modal-header[data-v-8dfa7cd4]{box-sizing:border-box;padding:10px;height:50px;display:flex;justify-content:space-between;align-items:center;border-bottom:solid 1px var(--color-border-1, #e8e8e8);color:var(--color-text-2, #4E5969)}.modal-body[data-v-8dfa7cd4]{padding:10px;box-sizing:border-box;overflow:auto;position:relative}.modal-footer[data-v-8dfa7cd4]{box-sizing:border-box;height:50px;border-top:solid 1px var(--color-border-1, #e8e8e8);display:flex;justify-content:flex-end;padding:10px}.modal-footer button[data-v-8dfa7cd4]{height:28px;line-height:28px;width:80px;outline:none;border-color:transparent;font-size:14px;border-radius:4px;padding:0;box-sizing:content-box}.modal-footer button.submit-button[data-v-8dfa7cd4]{color:#fff;background-color:rgb(var(--primary-6, 45, 106, 251))}.modal-footer button.submit-button[data-v-8dfa7cd4]:hover{background-color:rgb(var(--primary-5, 28, 76, 207))}.modal-footer button.cancel-button[data-v-8dfa7cd4]{color:rgb(var(--color-text-2, 78, 89, 105));background-color:var(--color-fill-1, #f5f5f5)}.modal-footer button.cancel-button[data-v-8dfa7cd4]:hover{background-color:var(--color-fill-4, #c9cdd4)}.modal-loading[data-v-8dfa7cd4]{position:absolute;z-index:var(--635715bb);top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;background-color:#0000001a}.modal-loading .lds-ring[data-v-8dfa7cd4]{display:inline-block;position:relative;width:80px;height:80px}.modal-loading .lds-ring div[data-v-8dfa7cd4]{box-sizing:border-box;display:block;position:absolute;width:48px;height:48px;margin:8px;border:5px solid #fff;border-radius:50%;animation:lds-ring-8dfa7cd4 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#fff transparent transparent transparent}.modal-loading .lds-ring div[data-v-8dfa7cd4]:nth-child(1){animation-delay:-.45s}.modal-loading .lds-ring div[data-v-8dfa7cd4]:nth-child(2){animation-delay:-.3s}.modal-loading .lds-ring div[data-v-8dfa7cd4]:nth-child(3){animation-delay:-.15s}@keyframes lds-ring-8dfa7cd4{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.dialog-body[data-v-8326e5a5]{padding:20px 10px 10px}.dialog-title[data-v-8326e5a5]{padding:5px;font-weight:700;font-size:16px}.dialog-content[data-v-8326e5a5]{padding:5px}.dialog-footer[data-v-8326e5a5]{box-sizing:border-box;height:50px;border-top:solid 1px var(--color-border-1, #e8e8e8);display:flex;justify-content:center;align-items:center;padding:0 10px}.dialog-footer button[data-v-8326e5a5]{height:28px;line-height:28px;width:80px;outline:none;border-color:transparent;font-size:14px;border-radius:4px;padding:0;box-sizing:content-box}.dialog-footer button.submit-button[data-v-8326e5a5]{color:#fff;background-color:rgb(var(--primary-6, 45, 106, 251))}.dialog-footer button.submit-button[data-v-8326e5a5]:hover{background-color:rgb(var(--primary-5, 28, 76, 207))}.dialog-footer button.cancel-button[data-v-8326e5a5]{color:rgb(var(--color-text-2, 78, 89, 105));background-color:var(--color-fill-1, #f5f5f5)}.dialog-footer button.cancel-button[data-v-8326e5a5]:hover{background-color:var(--color-fill-4, #c9cdd4)}.modal-fade-enter-active[data-v-560682b4],.modal-fade-leave-active[data-v-560682b4]{transition:opacity .5s ease}.modal-fade-enter-active[data-v-560682b4] .modal-content.drawer-mode,.modal-fade-leave-active[data-v-560682b4] .modal-content.drawer-mode{transition:transform .5s ease}.modal-fade-enter-from[data-v-560682b4],.modal-fade-leave-to[data-v-560682b4]{opacity:0}.modal-fade-enter-from[data-v-560682b4] .modal-content.drawer-mode,.modal-fade-leave-to[data-v-560682b4] .modal-content.drawer-mode{transform:translate3d(100%,0,0)}.modal-footer[data-v-2080a86e]{box-sizing:border-box;min-height:50px;border-top:solid 1px var(--color-border-1, rgb(232, 232, 232));padding:10px}.modal-footer button[data-v-2080a86e]{height:28px;line-height:28px;width:80px;outline:none;border-color:transparent;font-size:14px;border-radius:4px;padding:0;box-sizing:content-box}.modal-footer button.submit-button[data-v-2080a86e]{color:#fff;background-color:rgb(var(--primary-6, 45, 106, 251))}.modal-footer button.submit-button[data-v-2080a86e]:hover{background-color:rgb(var(--primary-5, 28, 76, 207))}.modal-footer button.cancel-button[data-v-2080a86e]{color:rgb(var(--color-text-2, 78, 89, 105));background-color:var(--color-fill-1, #f5f5f5)}.modal-footer button.cancel-button[data-v-2080a86e]:hover{background-color:var(--color-fill-4, #c9cdd4)}.modal-header[data-v-d0247172]{box-sizing:border-box;padding:10px;min-height:50px;border-bottom:solid 1px var(--color-border-1, rgb(232, 232, 232));color:var(--color-text-2, #4E5969)}
1
+ *,:before,:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.i-icon-park-outline\:close{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 48 48' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='4' d='m8 8l32 32M8 40L40 8'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1em;height:1em}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.transform{transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.cursor-pointer{cursor:pointer}.resize{resize:both}.space-x-2>:not([hidden])~:not([hidden]){--un-space-x-reverse:0;margin-left:calc(.5rem * calc(1 - var(--un-space-x-reverse)));margin-right:calc(.5rem * var(--un-space-x-reverse))}.border{border-width:1px}.px{padding-left:1rem;padding-right:1rem}.text-16px{font-size:16px}.font-bold{font-weight:700}.outline{outline-style:solid}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease{transition-timing-function:cubic-bezier(.4,0,.2,1)}.modal-wrapper[data-v-8dfa7cd4]{z-index:var(--359e2d1e);position:fixed;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;background:rgba(0,0,0,.3)}.modal-content[data-v-8dfa7cd4]{background:#ffffff;border-radius:5px;position:relative}.modal-header[data-v-8dfa7cd4]{box-sizing:border-box;padding:10px;height:50px;display:flex;justify-content:space-between;align-items:center;border-bottom:solid 1px var(--color-border-1, #e8e8e8);color:var(--color-text-2, #4E5969)}.modal-body[data-v-8dfa7cd4]{padding:10px;box-sizing:border-box;overflow:auto;position:relative}.modal-footer[data-v-8dfa7cd4]{box-sizing:border-box;height:50px;border-top:solid 1px var(--color-border-1, #e8e8e8);display:flex;justify-content:flex-end;padding:10px}.modal-footer button[data-v-8dfa7cd4]{height:28px;line-height:28px;width:80px;outline:none;border-color:transparent;font-size:14px;border-radius:4px;padding:0;box-sizing:content-box}.modal-footer button.submit-button[data-v-8dfa7cd4]{color:#fff;background-color:rgb(var(--primary-6, 45, 106, 251))}.modal-footer button.submit-button[data-v-8dfa7cd4]:hover{background-color:rgb(var(--primary-5, 28, 76, 207))}.modal-footer button.cancel-button[data-v-8dfa7cd4]{color:rgb(var(--color-text-2, 78, 89, 105));background-color:var(--color-fill-1, #f5f5f5)}.modal-footer button.cancel-button[data-v-8dfa7cd4]:hover{background-color:var(--color-fill-4, #c9cdd4)}.modal-loading[data-v-8dfa7cd4]{position:absolute;z-index:var(--635715bb);top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;background-color:#0000001a}.modal-loading .lds-ring[data-v-8dfa7cd4]{display:inline-block;position:relative;width:80px;height:80px}.modal-loading .lds-ring div[data-v-8dfa7cd4]{box-sizing:border-box;display:block;position:absolute;width:48px;height:48px;margin:8px;border:5px solid #fff;border-radius:50%;animation:lds-ring-8dfa7cd4 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#fff transparent transparent transparent}.modal-loading .lds-ring div[data-v-8dfa7cd4]:nth-child(1){animation-delay:-.45s}.modal-loading .lds-ring div[data-v-8dfa7cd4]:nth-child(2){animation-delay:-.3s}.modal-loading .lds-ring div[data-v-8dfa7cd4]:nth-child(3){animation-delay:-.15s}@keyframes lds-ring-8dfa7cd4{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.dialog-body[data-v-8326e5a5]{padding:20px 10px 10px}.dialog-title[data-v-8326e5a5]{padding:5px;font-weight:700;font-size:16px}.dialog-content[data-v-8326e5a5]{padding:5px}.dialog-footer[data-v-8326e5a5]{box-sizing:border-box;height:50px;border-top:solid 1px var(--color-border-1, #e8e8e8);display:flex;justify-content:center;align-items:center;padding:0 10px}.dialog-footer button[data-v-8326e5a5]{height:28px;line-height:28px;width:80px;outline:none;border-color:transparent;font-size:14px;border-radius:4px;padding:0;box-sizing:content-box}.dialog-footer button.submit-button[data-v-8326e5a5]{color:#fff;background-color:rgb(var(--primary-6, 45, 106, 251))}.dialog-footer button.submit-button[data-v-8326e5a5]:hover{background-color:rgb(var(--primary-5, 28, 76, 207))}.dialog-footer button.cancel-button[data-v-8326e5a5]{color:rgb(var(--color-text-2, 78, 89, 105));background-color:var(--color-fill-1, #f5f5f5)}.dialog-footer button.cancel-button[data-v-8326e5a5]:hover{background-color:var(--color-fill-4, #c9cdd4)}.modal-fade-enter-active[data-v-69463faf],.modal-fade-leave-active[data-v-69463faf]{transition:opacity .5s ease}.modal-fade-enter-active[data-v-69463faf] .modal-content.drawer-mode,.modal-fade-leave-active[data-v-69463faf] .modal-content.drawer-mode{transition:transform .5s ease}.modal-fade-enter-from[data-v-69463faf],.modal-fade-leave-to[data-v-69463faf]{opacity:0}.modal-fade-enter-from[data-v-69463faf] .modal-content.drawer-mode,.modal-fade-leave-to[data-v-69463faf] .modal-content.drawer-mode{transform:translate3d(100%,0,0)}.modal-footer[data-v-2080a86e]{box-sizing:border-box;min-height:50px;border-top:solid 1px var(--color-border-1, rgb(232, 232, 232));padding:10px}.modal-footer button[data-v-2080a86e]{height:28px;line-height:28px;width:80px;outline:none;border-color:transparent;font-size:14px;border-radius:4px;padding:0;box-sizing:content-box}.modal-footer button.submit-button[data-v-2080a86e]{color:#fff;background-color:rgb(var(--primary-6, 45, 106, 251))}.modal-footer button.submit-button[data-v-2080a86e]:hover{background-color:rgb(var(--primary-5, 28, 76, 207))}.modal-footer button.cancel-button[data-v-2080a86e]{color:rgb(var(--color-text-2, 78, 89, 105));background-color:var(--color-fill-1, #f5f5f5)}.modal-footer button.cancel-button[data-v-2080a86e]:hover{background-color:var(--color-fill-4, #c9cdd4)}.modal-header[data-v-d0247172]{box-sizing:border-box;padding:10px;min-height:50px;border-bottom:solid 1px var(--color-border-1, rgb(232, 232, 232));color:var(--color-text-2, #4E5969)}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gopowerteam/modal-render",
3
3
  "type": "module",
4
- "version": "0.0.33",
4
+ "version": "0.0.34",
5
5
  "author": {
6
6
  "name": "zhuchentong",
7
7
  "email": "2037630@gmail.com"