@gopowerteam/modal-render 0.0.39 → 0.0.41

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.
@@ -0,0 +1,29 @@
1
+ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
2
+ text?: string | undefined;
3
+ }>, {
4
+ text: string;
5
+ }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
6
+ text?: string | undefined;
7
+ }>, {
8
+ text: string;
9
+ }>>>, {
10
+ text: string;
11
+ }, {}>;
12
+ export default _default;
13
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
14
+ type __VLS_TypePropsToRuntimeProps<T> = {
15
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
16
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
17
+ } : {
18
+ type: import('vue').PropType<T[K]>;
19
+ required: true;
20
+ };
21
+ };
22
+ type __VLS_WithDefaults<P, D> = {
23
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
24
+ default: D[K];
25
+ }> : P[K];
26
+ };
27
+ type __VLS_Prettify<T> = {
28
+ [K in keyof T]: T[K];
29
+ } & {};
@@ -1,4 +1,4 @@
1
- import { OpenModalOptions } from '../interfaces';
1
+ import { OpenModalOptions, ShowLoadingOptions } from '../interfaces';
2
2
  import { Component } from 'vue';
3
3
 
4
4
  export declare function useModal(): {
@@ -24,7 +24,7 @@ export declare function useModal(): {
24
24
  };
25
25
  close(data?: any): void;
26
26
  closeAll(): void;
27
- showLoading(): void;
27
+ showLoading(options?: ShowLoadingOptions): () => void;
28
28
  hideLoading(): void;
29
29
  confirm(props: {
30
30
  title?: string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),V=Symbol("__MODAL__");function F(o){return e.getCurrentScope()?(e.onScopeDispose(o),!0):!1}function w(o){return typeof o=="function"?o():e.unref(o)}const W=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const J=Object.prototype.toString,Q=o=>J.call(o)==="[object Object]",Z=()=>{};function ee(o){return e.getCurrentInstance()}function te(o,i={}){if(!e.isRef(o))return e.toRefs(o);const r=Array.isArray(o.value)?Array.from({length:o.value.length}):{};for(const t in o.value)r[t]=e.customRef(()=>({get(){return o.value[t]},set(c){var s;if((s=w(i.replaceRef))!=null?s:!0)if(Array.isArray(o.value)){const h=[...o.value];h[t]=c,o.value=h}else{const h={...o.value,[t]:c};Object.setPrototypeOf(h,Object.getPrototypeOf(o.value)),o.value=h}else o.value[t]=c}}));return r}function oe(o,i=!0,r){ee()?e.onMounted(o,r):i?o():e.nextTick(o)}function N(o){var i;const r=w(o);return(i=r==null?void 0:r.$el)!=null?i:r}const O=W?window:void 0;function P(...o){let i,r,t,c;if(typeof o[0]=="string"||Array.isArray(o[0])?([r,t,c]=o,i=O):[i,r,t,c]=o,!i)return Z;Array.isArray(r)||(r=[r]),Array.isArray(t)||(t=[t]);const s=[],u=()=>{s.forEach(v=>v()),s.length=0},h=(v,d,l,f)=>(v.addEventListener(d,l,f),()=>v.removeEventListener(d,l,f)),b=e.watch(()=>[N(i),w(c)],([v,d])=>{if(u(),!v)return;const l=Q(d)?{...d}:d;s.push(...r.flatMap(f=>t.map(a=>h(v,f,a,l))))},{immediate:!0,flush:"post"}),y=()=>{b(),u()};return F(y),y}function ne(){const o=e.ref(!1),i=e.getCurrentInstance();return i&&e.onMounted(()=>{o.value=!0},i),o}function re(o){const i=ne();return e.computed(()=>(i.value,!!o()))}function ie(o,i={}){var r,t;const{pointerTypes:c,preventDefault:s,stopPropagation:u,exact:h,onMove:b,onEnd:y,onStart:v,initialValue:d,axis:l="both",draggingElement:f=O,containerElement:a,handle:g=o}=i,p=e.ref((r=w(d))!=null?r:{x:0,y:0}),C=e.ref(),M=m=>c?c.includes(m.pointerType):!0,E=m=>{w(s)&&m.preventDefault(),w(u)&&m.stopPropagation()},$=m=>{var S;if(w(i.disabled)||!M(m)||w(h)&&m.target!==w(o))return;const k=w(a),B=(S=k==null?void 0:k.getBoundingClientRect)==null?void 0:S.call(k),_=w(o).getBoundingClientRect(),T={x:m.clientX-(k?_.left-B.left+k.scrollLeft:_.left),y:m.clientY-(k?_.top-B.top+k.scrollTop:_.top)};(v==null?void 0:v(T,m))!==!1&&(C.value=T,E(m))},H=m=>{if(w(i.disabled)||!M(m)||!C.value)return;const S=w(a),k=w(o).getBoundingClientRect();let{x:B,y:_}=p.value;(l==="x"||l==="both")&&(B=m.clientX-C.value.x,S&&(B=Math.min(Math.max(0,B),S.scrollWidth-k.width))),(l==="y"||l==="both")&&(_=m.clientY-C.value.y,S&&(_=Math.min(Math.max(0,_),S.scrollHeight-k.height))),p.value={x:B,y:_},b==null||b(p.value,m),E(m)},A=m=>{w(i.disabled)||!M(m)||C.value&&(C.value=void 0,y==null||y(p.value,m),E(m))};if(W){const m={capture:(t=i.capture)!=null?t:!0};P(g,"pointerdown",$,m),P(f,"pointermove",H,m),P(f,"pointerup",A,m)}return{...te(p),position:p,isDragging:e.computed(()=>!!C.value),style:e.computed(()=>`left:${p.value.x}px;top:${p.value.y}px;`)}}function le(o,i,r={}){const{window:t=O,...c}=r;let s;const u=re(()=>t&&"ResizeObserver"in t),h=()=>{s&&(s.disconnect(),s=void 0)},b=e.computed(()=>Array.isArray(o)?o.map(d=>N(d)):[N(o)]),y=e.watch(b,d=>{if(h(),u.value&&t){s=new ResizeObserver(i);for(const l of d)l&&s.observe(l,c)}},{immediate:!0,flush:"post"}),v=()=>{h(),y()};return F(v),{isSupported:u,stop:v}}function R(o,i={width:0,height:0},r={}){const{window:t=O,box:c="content-box"}=r,s=e.computed(()=>{var d,l;return(l=(d=N(o))==null?void 0:d.namespaceURI)==null?void 0:l.includes("svg")}),u=e.ref(i.width),h=e.ref(i.height),{stop:b}=le(o,([d])=>{const l=c==="border-box"?d.borderBoxSize:c==="content-box"?d.contentBoxSize:d.devicePixelContentBoxSize;if(t&&s.value){const f=N(o);if(f){const a=t.getComputedStyle(f);u.value=Number.parseFloat(a.width),h.value=Number.parseFloat(a.height)}}else if(l){const f=Array.isArray(l)?l:[l];u.value=f.reduce((a,{inlineSize:g})=>a+g,0),h.value=f.reduce((a,{blockSize:g})=>a+g,0)}else u.value=d.contentRect.width,h.value=d.contentRect.height},r);oe(()=>{const d=N(o);d&&(u.value="offsetWidth"in d?d.offsetWidth:i.width,h.value="offsetHeight"in d?d.offsetHeight:i.height)});const y=e.watch(()=>N(o),d=>{u.value=d?i.width:0,h.value=d?i.height:0});function v(){b(),y()}return{width:u,height:h,stop:v}}const se=o=>(e.pushScopeId("data-v-8d442648"),o=o(),e.popScopeId(),o),ae={class:"title text-16px font-bold"},ce={class:"action"},de=["form"],ue={key:2,class:"modal-loading"},fe=se(()=>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:{},height:{},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"},position:{default:"right"},type:{},offset:{},backgroundColor:{},bodyStyle:{},submitText:{default:"确定"},cancelText:{default:"取消"},zIndex:{default:1e3}},emits:["submit"],setup(o,{expose:i,emit:r}){e.useCssVars(n=>({"8796093c":n.zIndex}));const t=o,c=r,s=e.inject(V),u=e.ref(!1);let h=0,b=0;const y=e.shallowRef(),v=e.shallowRef(),d=e.shallowRef(),l=e.shallowRef(),f=e.shallowRef(),a=e.shallowRef(),{height:g}=R(y);R(v);const{height:p}=R(d,void 0,{box:"border-box"}),{height:C}=R(l,void 0,{box:"border-box"}),{height:M}=R(f),{height:E}=R(a),{x:$,y:H}=ie(d,{initialValue:{x:0,y:0}});function A(){s==null||s.close(t.id)}function m(n){return typeof n=="number"?`${n}px`:n}const S=e.computed(()=>{const n={};return t.mode==="dialog"&&(n.justifyContent="center"),t.mode==="drawer"&&(n.justifyContent={left:"flex-start",right:"flex-end",top:"flex-start",bottom:"flex-end"}[t.position],n.flexDirection={left:"row",right:"row",top:"column",bottom:"column"}[t.position]),n}),k=e.computed(()=>{const n={};return t.mode==="drawer"&&["top","bottom"].includes(t.position)?n.maxHeight=m(t.maxHeight):(n.width=m(t.sizes[t.size]),n.maxWidth=m(t.maxWidth)),t.width&&(n.width=m(t.width)),t.height&&(n.height=m(t.height)),t.fullscreen&&(n.maxWidth="unset",n.width="100%",n.position="fixed",n.top=0,n.left=0,n.bottom=0,n.right=0,n.borderRadius=0),t.draggable&&!t.fullscreen&&t.mode==="dialog"&&(n.transform=`translate3d(${$.value-h}px, ${H.value-b}px, 0px)`),t.mode==="drawer"&&(n.borderRadius=0,["left","right"].includes(t.position)?n.height="100%":n.width="100%"),t.offset&&t.mode==="dialog"&&(n.marginLeft=`${t.offset.x||0}px`,n.marginTop=`${t.offset.y||0}px`),t.backgroundColor&&(n.backgroundColor=t.backgroundColor),n}),B=e.computed(()=>{const n={};return t.draggable&&!t.fullscreen&&t.mode==="dialog"&&(n.cursor="move"),n}),_=e.computed(()=>{const n={},x=M.value+E.value+p.value+C.value,I=Math.floor(g.value*(Number(m(t.maxHeight).replace("%",""))/100));return t.maxHeight&&(n.maxHeight=`${I-x}px`),t.mode==="drawer"&&(n.maxHeight="unset",["left","right"].includes(t.position)&&(n.height=`${g.value-x}px`)),t.fullscreen&&(n.maxHeight="unset",n.height=`calc(100% - ${x}px)`),t.type!=="component"&&(n.padding="0"),t.bodyStyle&&Object.assign(n,t.bodyStyle),n});function T(){const n=v.value;if(t.form&&n){const x=n.querySelector(`form[name="${t.form}"]`);x&&x.dispatchEvent(new Event("submit"))}c("submit")}function K(){s==null||s.close(t.id)}function X(){window&&window.addEventListener("resize",()=>{e.triggerRef(y),e.triggerRef(v),v.value&&(h=v.value.offsetLeft,b=v.value.offsetTop)})}function Y(){if(t.closeable&&t.esc){const n=({key:x})=>{x==="Escape"&&(s==null||s.close(t.id),window.removeEventListener("keydown",n))};window.addEventListener("keydown",n)}}function q(){h=v.value.offsetLeft,b=v.value.offsetTop}e.onMounted(()=>{Y(),X()}),e.onUnmounted(()=>{});function U(){return u.value=!0,()=>D()}function D(){u.value=!1}return i({showLoading:U,hideLoading:D}),(n,x)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperRef",ref:y,class:"modal-wrapper",style:e.normalizeStyle(S.value),onClick:x[0]||(x[0]=e.withModifiers(I=>n.maskClosable&&A(),["self"]))},[e.createElementVNode("div",{ref_key:"contentRef",ref:v,class:e.normalizeClass(["modal-content",{[`${n.mode}-mode`]:!0,[`${n.position}-position`]:!0}]),style:e.normalizeStyle(k.value)},[n.header?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"headerRef",ref:d,class:"modal-header",style:e.normalizeStyle(B.value),onMousedown:q},[e.createElementVNode("div",ae,e.toDisplayString(n.title),1),e.createElementVNode("div",ce,[n.closeable?(e.openBlock(),e.createElementBlock("div",{key:0,class:"i-icon-park-outline:close block cursor-pointer",onClick:A})):e.createCommentVNode("",!0)])],36)):e.createCommentVNode("",!0),e.createElementVNode("div",{id:"modal-header-slot",ref_key:"headerSlotRef",ref:f},null,512),e.createElementVNode("div",{class:"modal-body",style:e.normalizeStyle(_.value)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.component),e.normalizeProps(e.guardReactiveProps(n.componentProps)),null,16))],4),e.createElementVNode("div",{id:"modal-footer-slot",ref_key:"footerSlotRef",ref:a},null,512),n.footer?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"footerRef",ref:l,class:"modal-footer space-x-2"},[e.createElementVNode("button",{class:"cancel-button",type:"button",onClick:K},e.toDisplayString(n.cancelText),1),e.createElementVNode("button",{class:"submit-button",form:n.form,type:"submit",onClick:T},e.toDisplayString(n.submitText),9,de)],512)):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createElementBlock("div",ue,pe)):e.createCommentVNode("",!0)],6)],4))}}),L=(o,i)=>{const r=o.__vccOpts||o;for(const[t,c]of i)r[t]=c;return r},j=L(he,[["__scopeId","data-v-8d442648"]]),ve={class:"modal-dialog"},ge={class:"dialog-body"},ye={class:"dialog-title"},we={class:"dialog-content"},be=e.defineComponent({__name:"modal-dialog",props:{type:{},title:{},content:{},okText:{default:"确定"},cancelText:{default:"取消"},onOk:{},onCancel:{},footer:{}},setup(o){const i=o,r=G(),t=e.computed(()=>i.title?i.title:{confirm:"提示",info:"提示",warning:"警告",error:"错误",success:"成功"}[i.type]);async function c(){i.onOk&&await i.onOk(),r.close()}async function s(){i.onCancel&&await i.onCancel(),r.close()}return(u,h)=>(e.openBlock(),e.createElementBlock("section",ve,[e.createElementVNode("div",ge,[e.createElementVNode("div",ye,e.toDisplayString(t.value),1),e.createElementVNode("div",we,e.toDisplayString(u.content),1)]),e.createElementVNode("div",{class:"dialog-footer space-x-2",style:e.normalizeStyle(u.type==="confirm"?{"justify-content":"end"}:{"border-top":"none"})},[u.footer?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.footer),{key:0})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("button",{class:"submit-button",type:"submit",onClick:c},e.toDisplayString(u.okText),1),u.type==="confirm"?(e.openBlock(),e.createElementBlock("button",{key:0,class:"cancel-button",type:"button",onClick:s},e.toDisplayString(u.cancelText),1)):e.createCommentVNode("",!0)],64))],4)]))}}),ke=L(be,[["__scopeId","data-v-0c6b8db2"]]),Ce={key:0,class:"modal-teleport"},_e={name:"ModalProvider",inheritAttrs:!0},xe=e.defineComponent({..._e,props:{appendToBody:{type:[Boolean,String],default:!1},sizes:{default:()=>({small:"50%",middle:"70%",large:"90%"})},maxWidth:{default:"90%"},maxHeight:{default:"90%"},offset:{default:()=>({x:0,y:0})}},setup(o,{expose:i}){const r=e.shallowRef([]),t=e.ref(!1),c=e.getCurrentInstance();function s(l,f={},a={}){const g=e.defineAsyncComponent(()=>Promise.resolve(typeof l=="string"?ke:l));typeof l=="string"&&(f.type=l,a.size="small",a.fullscreen=!1,a.mode="dialog",a.footer=!1,a.header=!1);const p=Math.random().toString(32).slice(2),C=Object.assign({zIndex:typeof l=="string"?1100:1e3},a),M=new Promise((E,$)=>{r.value.push({id:p,component:g,props:f||{},options:{...C,type:typeof l=="string"?l:"component"},resolve:E,reject:$,listeners:[]}),e.triggerRef(r)}).catch(E=>E==="CANCEL"?new Promise(()=>{}):Promise.reject(E));return Object.assign(M,{close:()=>u(p)})}function u(l,f){const a=r.value.findIndex(p=>p.id===l);if(a<0)return;const g=r.value[a];f===void 0?g==null||g.reject("CANCEL"):g==null||g.resolve(f),r.value.splice(a,1),e.triggerRef(r)}function h(){!r.value||r.value.length===0||(r.value.forEach(l=>{l==null||l.reject("CANCEL")}),r.value=[],e.triggerRef(r))}function b(l,f){const a=r.value.find(p=>p.id===l);if(!a)return;const g=a.listeners.find(p=>p.event===f);g&&g.callback({open:s,close:p=>u(a.id,p),closeAll:h,showLoading:()=>y(a.id),hideLoading:()=>v(a.id),confirm:p=>s("confirm",p),success:p=>s("success",p),error:p=>s("error",p),warning:p=>s("warning",p),info:p=>s("info",p)})}function y(l){if(!c)return;const[f]=c.refs[`modal-container_${l}`];if(f)return f.showLoading()}function v(l){if(!c)return;const[f]=c.refs[`modal-container_${l}`];if(f)return f.hideLoading()}function d(l,f,a){const g=r.value.find(p=>p.id===l);g&&g.listeners.push({event:f,callback:a})}return e.provide(V,{open:s,close:u,closeAll:h,addEventListener:d}),i({elements:r,open:s,close:u,closeAll:h}),e.onMounted(()=>{t.value=!0}),(l,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(l.$slots,"default",{},void 0,!0),t.value?(e.openBlock(),e.createElementBlock("div",Ce,[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!l.appendToBody,to:typeof l.appendToBody=="string"?l.appendToBody:"body"},[e.createVNode(e.TransitionGroup,{name:"modal-fade"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,a=>(e.openBlock(),e.createBlock(j,e.mergeProps({id:a.id,key:a.id,ref_for:!0,ref:`modal-container_${a.id}`,component:a.component,"component-props":a.props,"max-height":l.maxHeight,"max-width":l.maxWidth,offset:l.offset,sizes:l.sizes},a.options,{onSubmit:()=>b(a.id,"submit")}),null,16,["id","component","component-props","max-height","max-width","offset","sizes","onSubmit"]))),128))]),_:1})],8,["disabled","to"]))])):e.createCommentVNode("",!0)],64))}}),Ee=L(xe,[["__scopeId","data-v-756481fe"]]),Se={},Be={class:"modal-footer"};function Me(o,i){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=L(Se,[["render",Me],["__scopeId","data-v-46f8d703"]]),Re={},$e={class:"modal-header"};function Ve(o,i){return e.openBlock(),e.createBlock(e.Teleport,{to:"#modal-header-slot"},[e.createElementVNode("div",$e,[e.renderSlot(o.$slots,"default",{},void 0,!0)])])}const Le=L(Re,[["render",Ve],["__scopeId","data-v-d0247172"]]);function z(o,i){var t,c;let r=o==null?void 0:o.parent;for(;r&&((t=r==null?void 0:r.type)==null?void 0:t.name)!==i;)r=r.parent;return((c=r==null?void 0:r.type)==null?void 0:c.name)===i?r:null}function G(){const o=e.inject(V),i=e.getCurrentInstance();function r(t,c,s){if(!o)throw new Error("Not Found Modal Provider Component");return o.open(t,c,s)}return{open:r,close(t){var u;if(!o)throw new Error("Not Found Modal Provider Component");const c=z(i,"ModalContainer"),s=(u=c==null?void 0:c.props)==null?void 0:u.id;if(!s)throw new Error("Not Found Current Modal Container");o.close(s,t)},closeAll(){if(!o)throw new Error("Not Found Modal Provider Component");o.closeAll()},showLoading(){var s;if(!o)throw new Error("Not Found Modal Provider Component");const t=z(i,"ModalContainer");if(!((s=t==null?void 0:t.props)==null?void 0:s.id))throw new Error("Not Found Current Modal Container");t!=null&&t.exposed&&(t==null||t.exposed.showLoading())},hideLoading(){var s;if(!o)throw new Error("Not Found Modal Provider Component");const t=z(i,"ModalContainer");if(!((s=t==null?void 0:t.props)==null?void 0:s.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 s;const i=e.inject(V),r=e.getCurrentInstance(),t=z(r,"ModalContainer"),c=(s=t==null?void 0:t.props)==null?void 0:s.id;i&&c&&i.addEventListener(c,"submit",o)}exports.ModalContainer=j;exports.ModalFooter=Ne;exports.ModalHeader=Le;exports.ModalKey=V;exports.ModalProvider=Ee;exports.onSubmit=Ae;exports.useModal=G;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=Symbol("__MODAL__");function W(o){return e.getCurrentScope()?(e.onScopeDispose(o),!0):!1}function b(o){return typeof o=="function"?o():e.unref(o)}const F=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const J=Object.prototype.toString,Q=o=>J.call(o)==="[object Object]",Z=()=>{};function ee(o){return e.getCurrentInstance()}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 s;if((s=b(l.replaceRef))!=null?s:!0)if(Array.isArray(o.value)){const h=[...o.value];h[t]=a,o.value=h}else{const h={...o.value,[t]:a};Object.setPrototypeOf(h,Object.getPrototypeOf(o.value)),o.value=h}else o.value[t]=a}}));return n}function oe(o,l=!0,n){ee()?e.onMounted(o,n):l?o():e.nextTick(o)}function N(o){var l;const n=b(o);return(l=n==null?void 0:n.$el)!=null?l:n}const O=F?window:void 0;function P(...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 Z;Array.isArray(n)||(n=[n]),Array.isArray(t)||(t=[t]);const s=[],u=()=>{s.forEach(v=>v()),s.length=0},h=(v,f,i,d)=>(v.addEventListener(f,i,d),()=>v.removeEventListener(f,i,d)),w=e.watch(()=>[N(l),b(a)],([v,f])=>{if(u(),!v)return;const i=Q(f)?{...f}:f;s.push(...n.flatMap(d=>t.map(c=>h(v,d,c,i))))},{immediate:!0,flush:"post"}),y=()=>{w(),u()};return W(y),y}function ne(){const o=e.ref(!1),l=e.getCurrentInstance();return l&&e.onMounted(()=>{o.value=!0},l),o}function re(o){const l=ne();return e.computed(()=>(l.value,!!o()))}function le(o,l={}){var n,t;const{pointerTypes:a,preventDefault:s,stopPropagation:u,exact:h,onMove:w,onEnd:y,onStart:v,initialValue:f,axis:i="both",draggingElement:d=O,containerElement:c,handle:g=o}=l,p=e.ref((n=b(f))!=null?n:{x:0,y:0}),k=e.ref(),M=m=>a?a.includes(m.pointerType):!0,x=m=>{b(s)&&m.preventDefault(),b(u)&&m.stopPropagation()},$=m=>{var S;if(b(l.disabled)||!M(m)||b(h)&&m.target!==b(o))return;const _=b(c),B=(S=_==null?void 0:_.getBoundingClientRect)==null?void 0:S.call(_),C=b(o).getBoundingClientRect(),T={x:m.clientX-(_?C.left-B.left+_.scrollLeft:C.left),y:m.clientY-(_?C.top-B.top+_.scrollTop:C.top)};(v==null?void 0:v(T,m))!==!1&&(k.value=T,x(m))},H=m=>{if(b(l.disabled)||!M(m)||!k.value)return;const S=b(c),_=b(o).getBoundingClientRect();let{x:B,y:C}=p.value;(i==="x"||i==="both")&&(B=m.clientX-k.value.x,S&&(B=Math.min(Math.max(0,B),S.scrollWidth-_.width))),(i==="y"||i==="both")&&(C=m.clientY-k.value.y,S&&(C=Math.min(Math.max(0,C),S.scrollHeight-_.height))),p.value={x:B,y:C},w==null||w(p.value,m),x(m)},A=m=>{b(l.disabled)||!M(m)||k.value&&(k.value=void 0,y==null||y(p.value,m),x(m))};if(F){const m={capture:(t=l.capture)!=null?t:!0};P(g,"pointerdown",$,m),P(d,"pointermove",H,m),P(d,"pointerup",A,m)}return{...te(p),position:p,isDragging:e.computed(()=>!!k.value),style:e.computed(()=>`left:${p.value.x}px;top:${p.value.y}px;`)}}function ie(o,l,n={}){const{window:t=O,...a}=n;let s;const u=re(()=>t&&"ResizeObserver"in t),h=()=>{s&&(s.disconnect(),s=void 0)},w=e.computed(()=>Array.isArray(o)?o.map(f=>N(f)):[N(o)]),y=e.watch(w,f=>{if(h(),u.value&&t){s=new ResizeObserver(l);for(const i of f)i&&s.observe(i,a)}},{immediate:!0,flush:"post"}),v=()=>{h(),y()};return W(v),{isSupported:u,stop:v}}function R(o,l={width:0,height:0},n={}){const{window:t=O,box:a="content-box"}=n,s=e.computed(()=>{var f,i;return(i=(f=N(o))==null?void 0:f.namespaceURI)==null?void 0:i.includes("svg")}),u=e.ref(l.width),h=e.ref(l.height),{stop:w}=ie(o,([f])=>{const i=a==="border-box"?f.borderBoxSize:a==="content-box"?f.contentBoxSize:f.devicePixelContentBoxSize;if(t&&s.value){const d=N(o);if(d){const c=t.getComputedStyle(d);u.value=Number.parseFloat(c.width),h.value=Number.parseFloat(c.height)}}else if(i){const d=Array.isArray(i)?i:[i];u.value=d.reduce((c,{inlineSize:g})=>c+g,0),h.value=d.reduce((c,{blockSize:g})=>c+g,0)}else u.value=f.contentRect.width,h.value=f.contentRect.height},n);oe(()=>{const f=N(o);f&&(u.value="offsetWidth"in f?f.offsetWidth:l.width,h.value="offsetHeight"in f?f.offsetHeight:l.height)});const y=e.watch(()=>N(o),f=>{u.value=f?l.width:0,h.value=f?l.height:0});function v(){w(),y()}return{width:u,height:h,stop:v}}const se=o=>(e.pushScopeId("data-v-9a7af353"),o=o(),e.popScopeId(),o),ae={class:"title text-16px font-bold"},ce={class:"action"},de=["form"],ue={key:2,class:"modal-loading"},fe=se(()=>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:{},height:{},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"},position:{default:"right"},type:{},offset:{},backgroundColor:{},bodyStyle:{},submitText:{default:"确定"},cancelText:{default:"取消"},zIndex:{default:1e3}},emits:["submit"],setup(o,{expose:l,emit:n}){e.useCssVars(r=>({"5751bf6b":r.zIndex}));const t=o,a=n,s=e.inject(L),u=e.ref(!1);let h=0,w=0;const y=e.shallowRef(),v=e.shallowRef(),f=e.shallowRef(),i=e.shallowRef(),d=e.shallowRef(),c=e.shallowRef(),{height:g}=R(y),{height:p}=R(f,void 0,{box:"border-box"}),{height:k}=R(i,void 0,{box:"border-box"}),{height:M}=R(d),{height:x}=R(c),{x:$,y:H}=le(f,{initialValue:{x:0,y:0}});function A(){s==null||s.close(t.id)}function m(r){return typeof r=="number"?`${r}px`:r}const S=e.computed(()=>{const r={};return t.mode==="dialog"&&(r.justifyContent="center"),t.mode==="drawer"&&(r.justifyContent={left:"flex-start",right:"flex-end",top:"flex-start",bottom:"flex-end"}[t.position],r.flexDirection={left:"row",right:"row",top:"column",bottom:"column"}[t.position]),r}),_=e.computed(()=>{const r={};return t.mode==="drawer"&&["top","bottom"].includes(t.position)?r.maxHeight=m(t.maxHeight):(r.width=m(t.sizes[t.size]),r.maxWidth=m(t.maxWidth)),t.width&&(r.width=m(t.width)),t.height&&(r.height=m(t.height)),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(${$.value-h}px, ${H.value-w}px, 0px)`),t.mode==="drawer"&&(r.borderRadius=0,["left","right"].includes(t.position)?r.height="100%":r.width="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}),B=e.computed(()=>{const r={};return t.draggable&&!t.fullscreen&&t.mode==="dialog"&&(r.cursor="move"),r}),C=e.computed(()=>{const r={},E=M.value+x.value+p.value+k.value,D=Math.floor(g.value*(Number(m(t.maxHeight).replace("%",""))/100));return t.maxHeight&&(r.maxHeight=`${D-E}px`),t.mode==="drawer"&&(r.maxHeight="unset",["left","right"].includes(t.position)&&(r.height=`${g.value-E}px`)),t.fullscreen&&(r.maxHeight="unset",r.height=`calc(100% - ${E}px)`),t.type!=="component"&&(r.padding="0"),t.bodyStyle&&Object.assign(r,t.bodyStyle),r});function T(){const r=v.value;if(t.form&&r){const E=r.querySelector(`form[name="${t.form}"]`);E&&E.dispatchEvent(new Event("submit"))}a("submit")}function K(){s==null||s.close(t.id)}function X(){window&&window.addEventListener("resize",()=>{e.triggerRef(y),e.triggerRef(v),v.value&&(h=v.value.offsetLeft,w=v.value.offsetTop)})}function Y(){if(t.closeable&&t.esc){const r=({key:E})=>{E==="Escape"&&(s==null||s.close(t.id),window.removeEventListener("keydown",r))};window.addEventListener("keydown",r)}}function q(){h=v.value.offsetLeft,w=v.value.offsetTop}e.onMounted(()=>{Y(),X()}),e.onUnmounted(()=>{});function U(){return u.value=!0,()=>I()}function I(){u.value=!1}return l({showLoading:U,hideLoading:I}),(r,E)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperRef",ref:y,class:"modal-wrapper",style:e.normalizeStyle(S.value),onClick:E[0]||(E[0]=e.withModifiers(D=>r.maskClosable&&A(),["self"]))},[e.createElementVNode("div",{ref_key:"contentRef",ref:v,class:e.normalizeClass(["modal-content",{[`${r.mode}-mode`]:!0,[`${r.position}-position`]:!0}]),style:e.normalizeStyle(_.value)},[r.header?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"headerRef",ref:f,class:"modal-header",style:e.normalizeStyle(B.value),onMousedown:q},[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:A})):e.createCommentVNode("",!0)])],36)):e.createCommentVNode("",!0),e.createElementVNode("div",{id:"modal-header-slot",ref_key:"headerSlotRef",ref:d},null,512),e.createElementVNode("div",{class:"modal-body",style:e.normalizeStyle(C.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:c},null,512),r.footer?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"footerRef",ref:i,class:"modal-footer space-x-2"},[e.createElementVNode("button",{class:"cancel-button",type:"button",onClick:K},e.toDisplayString(r.cancelText),1),e.createElementVNode("button",{class:"submit-button",form:r.form,type:"submit",onClick:T},e.toDisplayString(r.submitText),9,de)],512)):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createElementBlock("div",ue,pe)):e.createCommentVNode("",!0)],6)],4))}}),V=(o,l)=>{const n=o.__vccOpts||o;for(const[t,a]of l)n[t]=a;return n},j=V(he,[["__scopeId","data-v-9a7af353"]]),ve={class:"modal-dialog"},ge={class:"dialog-body"},ye={class:"dialog-title"},be={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=G(),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 s(){l.onCancel&&await l.onCancel(),n.close()}return(u,h)=>(e.openBlock(),e.createElementBlock("section",ve,[e.createElementVNode("div",ge,[e.createElementVNode("div",ye,e.toDisplayString(t.value),1),e.createElementVNode("div",be,e.toDisplayString(u.content),1)]),e.createElementVNode("div",{class:"dialog-footer space-x-2",style:e.normalizeStyle(u.type==="confirm"?{"justify-content":"end"}:{"border-top":"none"})},[u.footer?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.footer),{key:0})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("button",{class:"submit-button",type:"submit",onClick:a},e.toDisplayString(u.okText),1),u.type==="confirm"?(e.openBlock(),e.createElementBlock("button",{key:0,class:"cancel-button",type:"button",onClick:s},e.toDisplayString(u.cancelText),1)):e.createCommentVNode("",!0)],64))],4)]))}}),_e=V(we,[["__scopeId","data-v-0c6b8db2"]]),ke=o=>(e.pushScopeId("data-v-559bdf2e"),o=o(),e.popScopeId(),o),Ce={class:"flex-center"},Ee=ke(()=>e.createElementVNode("div",{class:"modal-loading"},[e.createElementVNode("div",{class:"lds-ring"},[e.createElementVNode("div"),e.createElementVNode("div"),e.createElementVNode("div"),e.createElementVNode("div")])],-1)),xe={class:"modal-loading-text"},Se=e.defineComponent({__name:"modal-loading",props:{text:{default:"加载中"}},setup(o){return(l,n)=>(e.openBlock(),e.createElementBlock("section",Ce,[Ee,e.createElementVNode("div",xe,e.toDisplayString(l.text),1)]))}}),Be=V(Se,[["__scopeId","data-v-559bdf2e"]]),Me={key:0,class:"modal-teleport"},Ne={name:"ModalProvider",inheritAttrs:!0},Ve=e.defineComponent({...Ne,props:{appendToBody:{type:[Boolean,String],default:!1},sizes:{default:()=>({small:"50%",middle:"70%",large:"90%"})},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();function s(i,d={},c={}){const g=e.defineAsyncComponent(()=>Promise.resolve(typeof i=="string"?_e:i));typeof i=="string"&&(d.type=i,c.size="small",c.fullscreen=!1,c.mode="dialog",c.footer=!1,c.header=!1);const p=Math.random().toString(32).slice(2),k=Object.assign({zIndex:typeof i=="string"?1100:1e3},c),M=new Promise((x,$)=>{n.value.push({id:p,component:g,props:d||{},options:{...k,type:typeof i=="string"?i:"component"},resolve:x,reject:$,listeners:[]}),e.triggerRef(n)}).catch(x=>x==="CANCEL"?new Promise(()=>{}):Promise.reject(x));return Object.assign(M,{close:()=>u(p)})}function u(i,d){const c=n.value.findIndex(p=>p.id===i);if(c<0)return;const g=n.value[c];d===void 0?g==null||g.reject("CANCEL"):g==null||g.resolve(d),n.value.splice(c,1),e.triggerRef(n)}function h(){!n.value||n.value.length===0||(n.value.forEach(i=>{i==null||i.reject("CANCEL")}),n.value=[],e.triggerRef(n))}function w(i,d){const c=n.value.find(p=>p.id===i);if(!c)return;const g=c.listeners.find(p=>p.event===d);g&&g.callback({open:s,close:p=>u(c.id,p),closeAll:h,showLoading:()=>y(c.id),hideLoading:()=>v(c.id),confirm:p=>s("confirm",p),success:p=>s("success",p),error:p=>s("error",p),warning:p=>s("warning",p),info:p=>s("info",p)})}function y(i,d){if(!a)return;const[c]=a.refs[`modal-container_${i}`]||[];if(c)return c.showLoading();{const{close:g}=s(Be,{text:d==null?void 0:d.text},{footer:!1,header:!1,closeable:!1,backgroundColor:"transparent"});return d!=null&&d.duration&&setTimeout(()=>{g()},d==null?void 0:d.duration),g}}function v(i){if(!a)return;const[d]=a.refs[`modal-container_${i}`];if(d)return d.hideLoading()}function f(i,d,c){const g=n.value.find(p=>p.id===i);g&&g.listeners.push({event:d,callback:c})}return e.provide(L,{open:s,close:u,closeAll:h,addEventListener:f,showLoading:y,hideLoading:v}),l({elements:n,open:s,close:u,closeAll:h}),e.onMounted(()=>{t.value=!0}),(i,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(i.$slots,"default",{},void 0,!0),t.value?(e.openBlock(),e.createElementBlock("div",Me,[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!i.appendToBody,to:typeof i.appendToBody=="string"?i.appendToBody:"body"},[e.createVNode(e.TransitionGroup,{name:"modal-fade"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,c=>(e.openBlock(),e.createBlock(j,e.mergeProps({id:c.id,key:c.id,ref_for:!0,ref:`modal-container_${c.id}`,component:c.component,"component-props":c.props,"max-height":i.maxHeight,"max-width":i.maxWidth,offset:i.offset,sizes:i.sizes},c.options,{onSubmit:()=>w(c.id,"submit")}),null,16,["id","component","component-props","max-height","max-width","offset","sizes","onSubmit"]))),128))]),_:1})],8,["disabled","to"]))])):e.createCommentVNode("",!0)],64))}}),$e=V(Ve,[["__scopeId","data-v-60414811"]]),Re={},Le={class:"modal-footer"};function Ae(o,l){return e.openBlock(),e.createBlock(e.Teleport,{to:"#modal-footer-slot"},[e.createElementVNode("div",Le,[e.renderSlot(o.$slots,"default",{},void 0,!0)])])}const Te=V(Re,[["render",Ae],["__scopeId","data-v-46f8d703"]]),ze={},Oe={class:"modal-header"};function He(o,l){return e.openBlock(),e.createBlock(e.Teleport,{to:"#modal-header-slot"},[e.createElementVNode("div",Oe,[e.renderSlot(o.$slots,"default",{},void 0,!0)])])}const Pe=V(ze,[["render",He],["__scopeId","data-v-d0247172"]]);function z(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 G(){const o=e.inject(L),l=e.getCurrentInstance();function n(t,a,s){if(!o)throw new Error("Not Found Modal Provider Component");return o.open(t,a,s)}return{open:n,close(t){var u;if(!o)throw new Error("Not Found Modal Provider Component");const a=z(l,"ModalContainer"),s=(u=a==null?void 0:a.props)==null?void 0:u.id;if(!s)throw new Error("Not Found Current Modal Container");o.close(s,t)},closeAll(){if(!o)throw new Error("Not Found Modal Provider Component");o.closeAll()},showLoading(t){var u;if(!o)throw new Error("Not Found Modal Provider Component");const a=z(l,"ModalContainer"),s=(u=a==null?void 0:a.props)==null?void 0:u.id;return o.showLoading(s,t)},hideLoading(){var s;if(!o)throw new Error("Not Found Modal Provider Component");const t=z(l,"ModalContainer"),a=(s=t==null?void 0:t.props)==null?void 0:s.id;return o.hideLoading(a)},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 Ie(o){var s;const l=e.inject(L),n=e.getCurrentInstance(),t=z(n,"ModalContainer"),a=(s=t==null?void 0:t.props)==null?void 0:s.id;l&&a&&l.addEventListener(a,"submit",o)}exports.ModalContainer=j;exports.ModalFooter=Te;exports.ModalHeader=Pe;exports.ModalKey=L;exports.ModalProvider=$e;exports.onSubmit=Ie;exports.useModal=G;
@@ -6,6 +6,10 @@ export interface SizeOptions {
6
6
  middle: string | number;
7
7
  large: string | number;
8
8
  }
9
+ export interface ShowLoadingOptions {
10
+ duration?: number;
11
+ text?: string;
12
+ }
9
13
  export interface OpenModalOptions {
10
14
  closeable?: boolean;
11
15
  esc?: boolean;
@@ -48,4 +52,6 @@ export interface ModalActions {
48
52
  close: (id: string, data?: any) => void;
49
53
  closeAll: () => void;
50
54
  addEventListener: (id: string, event: 'submit', callback: (modal: ReturnType<typeof useModal>) => void) => void;
55
+ showLoading: (id?: string, options?: ShowLoadingOptions) => () => void;
56
+ hideLoading: (id?: string) => void;
51
57
  }
@@ -0,0 +1,29 @@
1
+ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
2
+ text?: string | undefined;
3
+ }>, {
4
+ text: string;
5
+ }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
6
+ text?: string | undefined;
7
+ }>, {
8
+ text: string;
9
+ }>>>, {
10
+ text: string;
11
+ }, {}>;
12
+ export default _default;
13
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
14
+ type __VLS_TypePropsToRuntimeProps<T> = {
15
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
16
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
17
+ } : {
18
+ type: import('vue').PropType<T[K]>;
19
+ required: true;
20
+ };
21
+ };
22
+ type __VLS_WithDefaults<P, D> = {
23
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
24
+ default: D[K];
25
+ }> : P[K];
26
+ };
27
+ type __VLS_Prettify<T> = {
28
+ [K in keyof T]: T[K];
29
+ } & {};
@@ -1,4 +1,4 @@
1
- import { OpenModalOptions } from '../interfaces';
1
+ import { OpenModalOptions, ShowLoadingOptions } from '../interfaces';
2
2
  import { Component } from 'vue';
3
3
 
4
4
  export declare function useModal(): {
@@ -24,7 +24,7 @@ export declare function useModal(): {
24
24
  };
25
25
  close(data?: any): void;
26
26
  closeAll(): void;
27
- showLoading(): void;
27
+ showLoading(options?: ShowLoadingOptions): () => void;
28
28
  hideLoading(): void;
29
29
  confirm(props: {
30
30
  title?: string;
package/dist/es/index.mjs CHANGED
@@ -1,77 +1,77 @@
1
- import { unref as he, isRef as me, toRefs as ve, customRef as ge, onMounted as Y, nextTick as ye, getCurrentScope as be, onScopeDispose as we, getCurrentInstance as F, ref as H, computed as E, watch as Z, defineComponent as ee, useCssVars as _e, inject as te, shallowRef as O, onUnmounted as xe, openBlock as y, createElementBlock as S, normalizeStyle as W, withModifiers as Ce, createElementVNode as g, normalizeClass as ke, toDisplayString as T, createCommentVNode as P, createBlock as N, resolveDynamicComponent as ie, normalizeProps as Me, guardReactiveProps as Se, triggerRef as D, pushScopeId as $e, popScopeId as Ee, Fragment as Q, provide as Le, renderSlot as oe, Teleport as ne, createVNode as Ae, TransitionGroup as Re, withCtx as Oe, renderList as Te, mergeProps as Be, defineAsyncComponent as He } from "vue";
2
- const K = Symbol("__MODAL__");
3
- function le(t) {
4
- return be() ? (we(t), !0) : !1;
1
+ import { unref as ve, isRef as ge, toRefs as ye, customRef as be, onMounted as Y, nextTick as we, getCurrentScope as _e, onScopeDispose as xe, getCurrentInstance as V, ref as H, computed as E, watch as ee, defineComponent as K, useCssVars as Ce, inject as te, shallowRef as O, onUnmounted as ke, openBlock as y, createElementBlock as C, normalizeStyle as D, withModifiers as Me, createElementVNode as v, normalizeClass as Se, toDisplayString as R, createCommentVNode as z, createBlock as P, resolveDynamicComponent as ie, normalizeProps as $e, guardReactiveProps as Ee, triggerRef as F, pushScopeId as le, popScopeId as ae, Fragment as Z, provide as Le, renderSlot as oe, Teleport as ne, createVNode as Ae, TransitionGroup as Re, withCtx as Te, renderList as Oe, mergeProps as Be, defineAsyncComponent as He } from "vue";
2
+ const U = Symbol("__MODAL__");
3
+ function de(t) {
4
+ return _e() ? (xe(t), !0) : !1;
5
5
  }
6
6
  function w(t) {
7
- return typeof t == "function" ? t() : he(t);
7
+ return typeof t == "function" ? t() : ve(t);
8
8
  }
9
- const ae = typeof window < "u" && typeof document < "u";
9
+ const ce = typeof window < "u" && typeof document < "u";
10
10
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
11
- const ze = Object.prototype.toString, Pe = (t) => ze.call(t) === "[object Object]", Ne = () => {
11
+ const ze = Object.prototype.toString, Pe = (t) => ze.call(t) === "[object Object]", Ie = () => {
12
12
  };
13
- function Ie(t) {
14
- return F();
13
+ function Ne(t) {
14
+ return V();
15
15
  }
16
16
  function We(t, r = {}) {
17
- if (!me(t))
18
- return ve(t);
19
- const n = Array.isArray(t.value) ? Array.from({ length: t.value.length }) : {};
17
+ if (!ge(t))
18
+ return ye(t);
19
+ const o = Array.isArray(t.value) ? Array.from({ length: t.value.length }) : {};
20
20
  for (const e in t.value)
21
- n[e] = ge(() => ({
21
+ o[e] = be(() => ({
22
22
  get() {
23
23
  return t.value[e];
24
24
  },
25
- set(a) {
25
+ set(l) {
26
26
  var i;
27
27
  if ((i = w(r.replaceRef)) != null ? i : !0)
28
28
  if (Array.isArray(t.value)) {
29
29
  const h = [...t.value];
30
- h[e] = a, t.value = h;
30
+ h[e] = l, t.value = h;
31
31
  } else {
32
- const h = { ...t.value, [e]: a };
32
+ const h = { ...t.value, [e]: l };
33
33
  Object.setPrototypeOf(h, Object.getPrototypeOf(t.value)), t.value = h;
34
34
  }
35
35
  else
36
- t.value[e] = a;
36
+ t.value[e] = l;
37
37
  }
38
38
  }));
39
- return n;
39
+ return o;
40
40
  }
41
- function De(t, r = !0, n) {
42
- Ie() ? Y(t, n) : r ? t() : ye(t);
41
+ function De(t, r = !0, o) {
42
+ Ne() ? Y(t, o) : r ? t() : we(t);
43
43
  }
44
44
  function B(t) {
45
45
  var r;
46
- const n = w(t);
47
- return (r = n == null ? void 0 : n.$el) != null ? r : n;
46
+ const o = w(t);
47
+ return (r = o == null ? void 0 : o.$el) != null ? r : o;
48
48
  }
49
- const U = ae ? window : void 0;
50
- function J(...t) {
51
- let r, n, e, a;
52
- if (typeof t[0] == "string" || Array.isArray(t[0]) ? ([n, e, a] = t, r = U) : [r, n, e, a] = t, !r)
53
- return Ne;
54
- Array.isArray(n) || (n = [n]), Array.isArray(e) || (e = [e]);
49
+ const q = ce ? window : void 0;
50
+ function Q(...t) {
51
+ let r, o, e, l;
52
+ if (typeof t[0] == "string" || Array.isArray(t[0]) ? ([o, e, l] = t, r = q) : [r, o, e, l] = t, !r)
53
+ return Ie;
54
+ Array.isArray(o) || (o = [o]), Array.isArray(e) || (e = [e]);
55
55
  const i = [], c = () => {
56
56
  i.forEach((m) => m()), i.length = 0;
57
- }, h = (m, d, s, u) => (m.addEventListener(d, s, u), () => m.removeEventListener(d, s, u)), _ = Z(
58
- () => [B(r), w(a)],
59
- ([m, d]) => {
57
+ }, h = (m, u, s, d) => (m.addEventListener(u, s, d), () => m.removeEventListener(u, s, d)), _ = ee(
58
+ () => [B(r), w(l)],
59
+ ([m, u]) => {
60
60
  if (c(), !m)
61
61
  return;
62
- const s = Pe(d) ? { ...d } : d;
62
+ const s = Pe(u) ? { ...u } : u;
63
63
  i.push(
64
- ...n.flatMap((u) => e.map((l) => h(m, u, l, s)))
64
+ ...o.flatMap((d) => e.map((a) => h(m, d, a, s)))
65
65
  );
66
66
  },
67
67
  { immediate: !0, flush: "post" }
68
68
  ), b = () => {
69
69
  _(), c();
70
70
  };
71
- return le(b), b;
71
+ return de(b), b;
72
72
  }
73
73
  function Fe() {
74
- const t = H(!1), r = F();
74
+ const t = H(!1), r = V();
75
75
  return r && Y(() => {
76
76
  t.value = !0;
77
77
  }, r), t;
@@ -81,111 +81,111 @@ function Ve(t) {
81
81
  return E(() => (r.value, !!t()));
82
82
  }
83
83
  function je(t, r = {}) {
84
- var n, e;
84
+ var o, e;
85
85
  const {
86
- pointerTypes: a,
86
+ pointerTypes: l,
87
87
  preventDefault: i,
88
88
  stopPropagation: c,
89
89
  exact: h,
90
90
  onMove: _,
91
91
  onEnd: b,
92
92
  onStart: m,
93
- initialValue: d,
93
+ initialValue: u,
94
94
  axis: s = "both",
95
- draggingElement: u = U,
96
- containerElement: l,
97
- handle: v = t
95
+ draggingElement: d = q,
96
+ containerElement: a,
97
+ handle: g = t
98
98
  } = r, f = H(
99
- (n = w(d)) != null ? n : { x: 0, y: 0 }
100
- ), C = H(), R = (p) => a ? a.includes(p.pointerType) : !0, $ = (p) => {
99
+ (o = w(u)) != null ? o : { x: 0, y: 0 }
100
+ ), k = H(), T = (p) => l ? l.includes(p.pointerType) : !0, $ = (p) => {
101
101
  w(i) && p.preventDefault(), w(c) && p.stopPropagation();
102
- }, I = (p) => {
102
+ }, N = (p) => {
103
103
  var L;
104
- if (w(r.disabled) || !R(p) || w(h) && p.target !== w(t))
104
+ if (w(r.disabled) || !T(p) || w(h) && p.target !== w(t))
105
105
  return;
106
- const x = w(l), A = (L = x == null ? void 0 : x.getBoundingClientRect) == null ? void 0 : L.call(x), k = w(t).getBoundingClientRect(), G = {
107
- x: p.clientX - (x ? k.left - A.left + x.scrollLeft : k.left),
108
- y: p.clientY - (x ? k.top - A.top + x.scrollTop : k.top)
106
+ const x = w(a), A = (L = x == null ? void 0 : x.getBoundingClientRect) == null ? void 0 : L.call(x), M = w(t).getBoundingClientRect(), G = {
107
+ x: p.clientX - (x ? M.left - A.left + x.scrollLeft : M.left),
108
+ y: p.clientY - (x ? M.top - A.top + x.scrollTop : M.top)
109
109
  };
110
- (m == null ? void 0 : m(G, p)) !== !1 && (C.value = G, $(p));
111
- }, q = (p) => {
112
- if (w(r.disabled) || !R(p) || !C.value)
110
+ (m == null ? void 0 : m(G, p)) !== !1 && (k.value = G, $(p));
111
+ }, J = (p) => {
112
+ if (w(r.disabled) || !T(p) || !k.value)
113
113
  return;
114
- const L = w(l), x = w(t).getBoundingClientRect();
115
- let { x: A, y: k } = f.value;
116
- (s === "x" || s === "both") && (A = p.clientX - C.value.x, L && (A = Math.min(Math.max(0, A), L.scrollWidth - x.width))), (s === "y" || s === "both") && (k = p.clientY - C.value.y, L && (k = Math.min(Math.max(0, k), L.scrollHeight - x.height))), f.value = {
114
+ const L = w(a), x = w(t).getBoundingClientRect();
115
+ let { x: A, y: M } = f.value;
116
+ (s === "x" || s === "both") && (A = p.clientX - k.value.x, L && (A = Math.min(Math.max(0, A), L.scrollWidth - x.width))), (s === "y" || s === "both") && (M = p.clientY - k.value.y, L && (M = Math.min(Math.max(0, M), L.scrollHeight - x.height))), f.value = {
117
117
  x: A,
118
- y: k
118
+ y: M
119
119
  }, _ == null || _(f.value, p), $(p);
120
120
  }, j = (p) => {
121
- w(r.disabled) || !R(p) || C.value && (C.value = void 0, b == null || b(f.value, p), $(p));
121
+ w(r.disabled) || !T(p) || k.value && (k.value = void 0, b == null || b(f.value, p), $(p));
122
122
  };
123
- if (ae) {
123
+ if (ce) {
124
124
  const p = { capture: (e = r.capture) != null ? e : !0 };
125
- J(v, "pointerdown", I, p), J(u, "pointermove", q, p), J(u, "pointerup", j, p);
125
+ Q(g, "pointerdown", N, p), Q(d, "pointermove", J, p), Q(d, "pointerup", j, p);
126
126
  }
127
127
  return {
128
128
  ...We(f),
129
129
  position: f,
130
- isDragging: E(() => !!C.value),
130
+ isDragging: E(() => !!k.value),
131
131
  style: E(
132
132
  () => `left:${f.value.x}px;top:${f.value.y}px;`
133
133
  )
134
134
  };
135
135
  }
136
- function Ge(t, r, n = {}) {
137
- const { window: e = U, ...a } = n;
136
+ function Ge(t, r, o = {}) {
137
+ const { window: e = q, ...l } = o;
138
138
  let i;
139
139
  const c = Ve(() => e && "ResizeObserver" in e), h = () => {
140
140
  i && (i.disconnect(), i = void 0);
141
- }, _ = E(() => Array.isArray(t) ? t.map((d) => B(d)) : [B(t)]), b = Z(
141
+ }, _ = E(() => Array.isArray(t) ? t.map((u) => B(u)) : [B(t)]), b = ee(
142
142
  _,
143
- (d) => {
143
+ (u) => {
144
144
  if (h(), c.value && e) {
145
145
  i = new ResizeObserver(r);
146
- for (const s of d)
147
- s && i.observe(s, a);
146
+ for (const s of u)
147
+ s && i.observe(s, l);
148
148
  }
149
149
  },
150
150
  { immediate: !0, flush: "post" }
151
151
  ), m = () => {
152
152
  h(), b();
153
153
  };
154
- return le(m), {
154
+ return de(m), {
155
155
  isSupported: c,
156
156
  stop: m
157
157
  };
158
158
  }
159
- function z(t, r = { width: 0, height: 0 }, n = {}) {
160
- const { window: e = U, box: a = "content-box" } = n, i = E(() => {
161
- var d, s;
162
- return (s = (d = B(t)) == null ? void 0 : d.namespaceURI) == null ? void 0 : s.includes("svg");
159
+ function W(t, r = { width: 0, height: 0 }, o = {}) {
160
+ const { window: e = q, box: l = "content-box" } = o, i = E(() => {
161
+ var u, s;
162
+ return (s = (u = B(t)) == null ? void 0 : u.namespaceURI) == null ? void 0 : s.includes("svg");
163
163
  }), c = H(r.width), h = H(r.height), { stop: _ } = Ge(
164
164
  t,
165
- ([d]) => {
166
- const s = a === "border-box" ? d.borderBoxSize : a === "content-box" ? d.contentBoxSize : d.devicePixelContentBoxSize;
165
+ ([u]) => {
166
+ const s = l === "border-box" ? u.borderBoxSize : l === "content-box" ? u.contentBoxSize : u.devicePixelContentBoxSize;
167
167
  if (e && i.value) {
168
- const u = B(t);
169
- if (u) {
170
- const l = e.getComputedStyle(u);
171
- c.value = Number.parseFloat(l.width), h.value = Number.parseFloat(l.height);
168
+ const d = B(t);
169
+ if (d) {
170
+ const a = e.getComputedStyle(d);
171
+ c.value = Number.parseFloat(a.width), h.value = Number.parseFloat(a.height);
172
172
  }
173
173
  } else if (s) {
174
- const u = Array.isArray(s) ? s : [s];
175
- c.value = u.reduce((l, { inlineSize: v }) => l + v, 0), h.value = u.reduce((l, { blockSize: v }) => l + v, 0);
174
+ const d = Array.isArray(s) ? s : [s];
175
+ c.value = d.reduce((a, { inlineSize: g }) => a + g, 0), h.value = d.reduce((a, { blockSize: g }) => a + g, 0);
176
176
  } else
177
- c.value = d.contentRect.width, h.value = d.contentRect.height;
177
+ c.value = u.contentRect.width, h.value = u.contentRect.height;
178
178
  },
179
- n
179
+ o
180
180
  );
181
181
  De(() => {
182
- const d = B(t);
183
- d && (c.value = "offsetWidth" in d ? d.offsetWidth : r.width, h.value = "offsetHeight" in d ? d.offsetHeight : r.height);
182
+ const u = B(t);
183
+ u && (c.value = "offsetWidth" in u ? u.offsetWidth : r.width, h.value = "offsetHeight" in u ? u.offsetHeight : r.height);
184
184
  });
185
- const b = Z(
185
+ const b = ee(
186
186
  () => B(t),
187
- (d) => {
188
- c.value = d ? r.width : 0, h.value = d ? r.height : 0;
187
+ (u) => {
188
+ c.value = u ? r.width : 0, h.value = u ? r.height : 0;
189
189
  }
190
190
  );
191
191
  function m() {
@@ -197,20 +197,20 @@ function z(t, r = { width: 0, height: 0 }, n = {}) {
197
197
  stop: m
198
198
  };
199
199
  }
200
- const Xe = (t) => ($e("data-v-8d442648"), t = t(), Ee(), t), Ye = { class: "title text-16px font-bold" }, Ke = { class: "action" }, Ue = ["form"], qe = {
200
+ const Xe = (t) => (le("data-v-9a7af353"), t = t(), ae(), t), Ye = { class: "title text-16px font-bold" }, Ke = { class: "action" }, Ue = ["form"], qe = {
201
201
  key: 2,
202
202
  class: "modal-loading"
203
- }, Je = /* @__PURE__ */ Xe(() => /* @__PURE__ */ g("div", { class: "lds-ring" }, [
204
- /* @__PURE__ */ g("div"),
205
- /* @__PURE__ */ g("div"),
206
- /* @__PURE__ */ g("div"),
207
- /* @__PURE__ */ g("div")
203
+ }, Je = /* @__PURE__ */ Xe(() => /* @__PURE__ */ v("div", { class: "lds-ring" }, [
204
+ /* @__PURE__ */ v("div"),
205
+ /* @__PURE__ */ v("div"),
206
+ /* @__PURE__ */ v("div"),
207
+ /* @__PURE__ */ v("div")
208
208
  ], -1)), Qe = [
209
209
  Je
210
210
  ], Ze = {
211
211
  name: "ModalContainer",
212
212
  inheritAttrs: !0
213
- }, et = /* @__PURE__ */ ee({
213
+ }, et = /* @__PURE__ */ K({
214
214
  ...Ze,
215
215
  props: {
216
216
  id: {},
@@ -242,160 +242,158 @@ const Xe = (t) => ($e("data-v-8d442648"), t = t(), Ee(), t), Ye = { class: "titl
242
242
  zIndex: { default: 1e3 }
243
243
  },
244
244
  emits: ["submit"],
245
- setup(t, { expose: r, emit: n }) {
246
- _e((o) => ({
247
- "8796093c": o.zIndex
245
+ setup(t, { expose: r, emit: o }) {
246
+ Ce((n) => ({
247
+ "5751bf6b": n.zIndex
248
248
  }));
249
- const e = t, a = n, i = te(K), c = H(!1);
249
+ const e = t, l = o, i = te(U), c = H(!1);
250
250
  let h = 0, _ = 0;
251
- const b = O(), m = O(), d = O(), s = O(), u = O(), l = O(), { height: v } = z(b);
252
- z(m);
253
- const { height: f } = z(d, void 0, { box: "border-box" }), { height: C } = z(s, void 0, { box: "border-box" }), { height: R } = z(u), { height: $ } = z(l), { x: I, y: q } = je(d, {
251
+ const b = O(), m = O(), u = O(), s = O(), d = O(), a = O(), { height: g } = W(b), { height: f } = W(u, void 0, { box: "border-box" }), { height: k } = W(s, void 0, { box: "border-box" }), { height: T } = W(d), { height: $ } = W(a), { x: N, y: J } = je(u, {
254
252
  initialValue: { x: 0, y: 0 }
255
253
  });
256
254
  function j() {
257
255
  i == null || i.close(e.id);
258
256
  }
259
- function p(o) {
260
- return typeof o == "number" ? `${o}px` : o;
257
+ function p(n) {
258
+ return typeof n == "number" ? `${n}px` : n;
261
259
  }
262
260
  const L = E(() => {
263
- const o = {};
264
- return e.mode === "dialog" && (o.justifyContent = "center"), e.mode === "drawer" && (o.justifyContent = {
261
+ const n = {};
262
+ return e.mode === "dialog" && (n.justifyContent = "center"), e.mode === "drawer" && (n.justifyContent = {
265
263
  left: "flex-start",
266
264
  right: "flex-end",
267
265
  top: "flex-start",
268
266
  bottom: "flex-end"
269
- }[e.position], o.flexDirection = {
267
+ }[e.position], n.flexDirection = {
270
268
  left: "row",
271
269
  right: "row",
272
270
  top: "column",
273
271
  bottom: "column"
274
- }[e.position]), o;
272
+ }[e.position]), n;
275
273
  }), x = E(() => {
276
- const o = {};
277
- return e.mode === "drawer" && ["top", "bottom"].includes(e.position) ? o.maxHeight = p(e.maxHeight) : (o.width = p(e.sizes[e.size]), o.maxWidth = p(e.maxWidth)), e.width && (o.width = p(e.width)), e.height && (o.height = p(e.height)), e.fullscreen && (o.maxWidth = "unset", o.width = "100%", o.position = "fixed", o.top = 0, o.left = 0, o.bottom = 0, o.right = 0, o.borderRadius = 0), e.draggable && !e.fullscreen && e.mode === "dialog" && (o.transform = `translate3d(${I.value - h}px, ${q.value - _}px, 0px)`), e.mode === "drawer" && (o.borderRadius = 0, ["left", "right"].includes(e.position) ? o.height = "100%" : o.width = "100%"), e.offset && e.mode === "dialog" && (o.marginLeft = `${e.offset.x || 0}px`, o.marginTop = `${e.offset.y || 0}px`), e.backgroundColor && (o.backgroundColor = e.backgroundColor), o;
274
+ const n = {};
275
+ return e.mode === "drawer" && ["top", "bottom"].includes(e.position) ? n.maxHeight = p(e.maxHeight) : (n.width = p(e.sizes[e.size]), n.maxWidth = p(e.maxWidth)), e.width && (n.width = p(e.width)), e.height && (n.height = p(e.height)), e.fullscreen && (n.maxWidth = "unset", n.width = "100%", n.position = "fixed", n.top = 0, n.left = 0, n.bottom = 0, n.right = 0, n.borderRadius = 0), e.draggable && !e.fullscreen && e.mode === "dialog" && (n.transform = `translate3d(${N.value - h}px, ${J.value - _}px, 0px)`), e.mode === "drawer" && (n.borderRadius = 0, ["left", "right"].includes(e.position) ? n.height = "100%" : n.width = "100%"), e.offset && e.mode === "dialog" && (n.marginLeft = `${e.offset.x || 0}px`, n.marginTop = `${e.offset.y || 0}px`), e.backgroundColor && (n.backgroundColor = e.backgroundColor), n;
278
276
  }), A = E(() => {
279
- const o = {};
280
- return e.draggable && !e.fullscreen && e.mode === "dialog" && (o.cursor = "move"), o;
281
- }), k = E(() => {
282
- const o = {}, M = R.value + $.value + f.value + C.value, se = Math.floor(v.value * (Number(p(e.maxHeight).replace("%", "")) / 100));
283
- return e.maxHeight && (o.maxHeight = `${se - M}px`), e.mode === "drawer" && (o.maxHeight = "unset", ["left", "right"].includes(e.position) && (o.height = `${v.value - M}px`)), e.fullscreen && (o.maxHeight = "unset", o.height = `calc(100% - ${M}px)`), e.type !== "component" && (o.padding = "0"), e.bodyStyle && Object.assign(o, e.bodyStyle), o;
277
+ const n = {};
278
+ return e.draggable && !e.fullscreen && e.mode === "dialog" && (n.cursor = "move"), n;
279
+ }), M = E(() => {
280
+ const n = {}, S = T.value + $.value + f.value + k.value, se = Math.floor(g.value * (Number(p(e.maxHeight).replace("%", "")) / 100));
281
+ return e.maxHeight && (n.maxHeight = `${se - S}px`), e.mode === "drawer" && (n.maxHeight = "unset", ["left", "right"].includes(e.position) && (n.height = `${g.value - S}px`)), e.fullscreen && (n.maxHeight = "unset", n.height = `calc(100% - ${S}px)`), e.type !== "component" && (n.padding = "0"), e.bodyStyle && Object.assign(n, e.bodyStyle), n;
284
282
  });
285
283
  function G() {
286
- const o = m.value;
287
- if (e.form && o) {
288
- const M = o.querySelector(`form[name="${e.form}"]`);
289
- M && M.dispatchEvent(new Event("submit"));
284
+ const n = m.value;
285
+ if (e.form && n) {
286
+ const S = n.querySelector(`form[name="${e.form}"]`);
287
+ S && S.dispatchEvent(new Event("submit"));
290
288
  }
291
- a("submit");
289
+ l("submit");
292
290
  }
293
- function de() {
291
+ function ue() {
294
292
  i == null || i.close(e.id);
295
293
  }
296
- function ce() {
294
+ function fe() {
297
295
  window && window.addEventListener("resize", () => {
298
- D(b), D(m), m.value && (h = m.value.offsetLeft, _ = m.value.offsetTop);
296
+ F(b), F(m), m.value && (h = m.value.offsetLeft, _ = m.value.offsetTop);
299
297
  });
300
298
  }
301
- function ue() {
299
+ function pe() {
302
300
  if (e.closeable && e.esc) {
303
- const o = ({ key: M }) => {
304
- M === "Escape" && (i == null || i.close(e.id), window.removeEventListener("keydown", o));
301
+ const n = ({ key: S }) => {
302
+ S === "Escape" && (i == null || i.close(e.id), window.removeEventListener("keydown", n));
305
303
  };
306
- window.addEventListener("keydown", o);
304
+ window.addEventListener("keydown", n);
307
305
  }
308
306
  }
309
- function fe() {
307
+ function he() {
310
308
  h = m.value.offsetLeft, _ = m.value.offsetTop;
311
309
  }
312
310
  Y(() => {
313
- ue(), ce();
314
- }), xe(() => {
311
+ pe(), fe();
312
+ }), ke(() => {
315
313
  });
316
- function pe() {
314
+ function me() {
317
315
  return c.value = !0, () => re();
318
316
  }
319
317
  function re() {
320
318
  c.value = !1;
321
319
  }
322
320
  return r({
323
- showLoading: pe,
321
+ showLoading: me,
324
322
  hideLoading: re
325
- }), (o, M) => (y(), S("div", {
323
+ }), (n, S) => (y(), C("div", {
326
324
  ref_key: "wrapperRef",
327
325
  ref: b,
328
326
  class: "modal-wrapper",
329
- style: W(L.value),
330
- onClick: M[0] || (M[0] = Ce((se) => o.maskClosable && j(), ["self"]))
327
+ style: D(L.value),
328
+ onClick: S[0] || (S[0] = Me((se) => n.maskClosable && j(), ["self"]))
331
329
  }, [
332
- g("div", {
330
+ v("div", {
333
331
  ref_key: "contentRef",
334
332
  ref: m,
335
- class: ke(["modal-content", { [`${o.mode}-mode`]: !0, [`${o.position}-position`]: !0 }]),
336
- style: W(x.value)
333
+ class: Se(["modal-content", { [`${n.mode}-mode`]: !0, [`${n.position}-position`]: !0 }]),
334
+ style: D(x.value)
337
335
  }, [
338
- o.header ? (y(), S("div", {
336
+ n.header ? (y(), C("div", {
339
337
  key: 0,
340
338
  ref_key: "headerRef",
341
- ref: d,
339
+ ref: u,
342
340
  class: "modal-header",
343
- style: W(A.value),
344
- onMousedown: fe
341
+ style: D(A.value),
342
+ onMousedown: he
345
343
  }, [
346
- g("div", Ye, T(o.title), 1),
347
- g("div", Ke, [
348
- o.closeable ? (y(), S("div", {
344
+ v("div", Ye, R(n.title), 1),
345
+ v("div", Ke, [
346
+ n.closeable ? (y(), C("div", {
349
347
  key: 0,
350
348
  class: "i-icon-park-outline:close block cursor-pointer",
351
349
  onClick: j
352
- })) : P("", !0)
350
+ })) : z("", !0)
353
351
  ])
354
- ], 36)) : P("", !0),
355
- g("div", {
352
+ ], 36)) : z("", !0),
353
+ v("div", {
356
354
  id: "modal-header-slot",
357
355
  ref_key: "headerSlotRef",
358
- ref: u
356
+ ref: d
359
357
  }, null, 512),
360
- g("div", {
358
+ v("div", {
361
359
  class: "modal-body",
362
- style: W(k.value)
360
+ style: D(M.value)
363
361
  }, [
364
- (y(), N(ie(o.component), Me(Se(o.componentProps)), null, 16))
362
+ (y(), P(ie(n.component), $e(Ee(n.componentProps)), null, 16))
365
363
  ], 4),
366
- g("div", {
364
+ v("div", {
367
365
  id: "modal-footer-slot",
368
366
  ref_key: "footerSlotRef",
369
- ref: l
367
+ ref: a
370
368
  }, null, 512),
371
- o.footer ? (y(), S("div", {
369
+ n.footer ? (y(), C("div", {
372
370
  key: 1,
373
371
  ref_key: "footerRef",
374
372
  ref: s,
375
373
  class: "modal-footer space-x-2"
376
374
  }, [
377
- g("button", {
375
+ v("button", {
378
376
  class: "cancel-button",
379
377
  type: "button",
380
- onClick: de
381
- }, T(o.cancelText), 1),
382
- g("button", {
378
+ onClick: ue
379
+ }, R(n.cancelText), 1),
380
+ v("button", {
383
381
  class: "submit-button",
384
- form: o.form,
382
+ form: n.form,
385
383
  type: "submit",
386
384
  onClick: G
387
- }, T(o.submitText), 9, Ue)
388
- ], 512)) : P("", !0),
389
- c.value ? (y(), S("div", qe, Qe)) : P("", !0)
385
+ }, R(n.submitText), 9, Ue)
386
+ ], 512)) : z("", !0),
387
+ c.value ? (y(), C("div", qe, Qe)) : z("", !0)
390
388
  ], 6)
391
389
  ], 4));
392
390
  }
393
- }), V = (t, r) => {
394
- const n = t.__vccOpts || t;
395
- for (const [e, a] of r)
396
- n[e] = a;
397
- return n;
398
- }, tt = /* @__PURE__ */ V(et, [["__scopeId", "data-v-8d442648"]]), ot = { class: "modal-dialog" }, nt = { class: "dialog-body" }, rt = { class: "dialog-title" }, st = { class: "dialog-content" }, it = /* @__PURE__ */ ee({
391
+ }), I = (t, r) => {
392
+ const o = t.__vccOpts || t;
393
+ for (const [e, l] of r)
394
+ o[e] = l;
395
+ return o;
396
+ }, tt = /* @__PURE__ */ I(et, [["__scopeId", "data-v-9a7af353"]]), ot = { class: "modal-dialog" }, nt = { class: "dialog-body" }, rt = { class: "dialog-title" }, st = { class: "dialog-content" }, it = /* @__PURE__ */ K({
399
397
  __name: "modal-dialog",
400
398
  props: {
401
399
  type: {},
@@ -408,52 +406,70 @@ const Xe = (t) => ($e("data-v-8d442648"), t = t(), Ee(), t), Ye = { class: "titl
408
406
  footer: {}
409
407
  },
410
408
  setup(t) {
411
- const r = t, n = gt(), e = E(() => r.title ? r.title : {
409
+ const r = t, o = Ct(), e = E(() => r.title ? r.title : {
412
410
  confirm: "提示",
413
411
  info: "提示",
414
412
  warning: "警告",
415
413
  error: "错误",
416
414
  success: "成功"
417
415
  }[r.type]);
418
- async function a() {
419
- r.onOk && await r.onOk(), n.close();
416
+ async function l() {
417
+ r.onOk && await r.onOk(), o.close();
420
418
  }
421
419
  async function i() {
422
- r.onCancel && await r.onCancel(), n.close();
420
+ r.onCancel && await r.onCancel(), o.close();
423
421
  }
424
- return (c, h) => (y(), S("section", ot, [
425
- g("div", nt, [
426
- g("div", rt, T(e.value), 1),
427
- g("div", st, T(c.content), 1)
422
+ return (c, h) => (y(), C("section", ot, [
423
+ v("div", nt, [
424
+ v("div", rt, R(e.value), 1),
425
+ v("div", st, R(c.content), 1)
428
426
  ]),
429
- g("div", {
427
+ v("div", {
430
428
  class: "dialog-footer space-x-2",
431
- style: W(c.type === "confirm" ? { "justify-content": "end" } : { "border-top": "none" })
429
+ style: D(c.type === "confirm" ? { "justify-content": "end" } : { "border-top": "none" })
432
430
  }, [
433
- c.footer ? (y(), N(ie(c.footer), { key: 0 })) : (y(), S(Q, { key: 1 }, [
434
- g("button", {
431
+ c.footer ? (y(), P(ie(c.footer), { key: 0 })) : (y(), C(Z, { key: 1 }, [
432
+ v("button", {
435
433
  class: "submit-button",
436
434
  type: "submit",
437
- onClick: a
438
- }, T(c.okText), 1),
439
- c.type === "confirm" ? (y(), S("button", {
435
+ onClick: l
436
+ }, R(c.okText), 1),
437
+ c.type === "confirm" ? (y(), C("button", {
440
438
  key: 0,
441
439
  class: "cancel-button",
442
440
  type: "button",
443
441
  onClick: i
444
- }, T(c.cancelText), 1)) : P("", !0)
442
+ }, R(c.cancelText), 1)) : z("", !0)
445
443
  ], 64))
446
444
  ], 4)
447
445
  ]));
448
446
  }
449
- }), lt = /* @__PURE__ */ V(it, [["__scopeId", "data-v-0c6b8db2"]]), at = {
447
+ }), lt = /* @__PURE__ */ I(it, [["__scopeId", "data-v-0c6b8db2"]]), at = (t) => (le("data-v-559bdf2e"), t = t(), ae(), t), dt = { class: "flex-center" }, ct = /* @__PURE__ */ at(() => /* @__PURE__ */ v("div", { class: "modal-loading" }, [
448
+ /* @__PURE__ */ v("div", { class: "lds-ring" }, [
449
+ /* @__PURE__ */ v("div"),
450
+ /* @__PURE__ */ v("div"),
451
+ /* @__PURE__ */ v("div"),
452
+ /* @__PURE__ */ v("div")
453
+ ])
454
+ ], -1)), ut = { class: "modal-loading-text" }, ft = /* @__PURE__ */ K({
455
+ __name: "modal-loading",
456
+ props: {
457
+ text: { default: "加载中" }
458
+ },
459
+ setup(t) {
460
+ return (r, o) => (y(), C("section", dt, [
461
+ ct,
462
+ v("div", ut, R(r.text), 1)
463
+ ]));
464
+ }
465
+ }), pt = /* @__PURE__ */ I(ft, [["__scopeId", "data-v-559bdf2e"]]), ht = {
450
466
  key: 0,
451
467
  class: "modal-teleport"
452
- }, dt = {
468
+ }, mt = {
453
469
  name: "ModalProvider",
454
470
  inheritAttrs: !0
455
- }, ct = /* @__PURE__ */ ee({
456
- ...dt,
471
+ }, vt = /* @__PURE__ */ K({
472
+ ...mt,
457
473
  props: {
458
474
  appendToBody: { type: [Boolean, String], default: !1 },
459
475
  sizes: { default: () => ({
@@ -466,56 +482,56 @@ const Xe = (t) => ($e("data-v-8d442648"), t = t(), Ee(), t), Ye = { class: "titl
466
482
  offset: { default: () => ({ x: 0, y: 0 }) }
467
483
  },
468
484
  setup(t, { expose: r }) {
469
- const n = O([]), e = H(!1), a = F();
470
- function i(s, u = {}, l = {}) {
471
- const v = He(
485
+ const o = O([]), e = H(!1), l = V();
486
+ function i(s, d = {}, a = {}) {
487
+ const g = He(
472
488
  () => Promise.resolve(typeof s == "string" ? lt : s)
473
489
  );
474
- typeof s == "string" && (u.type = s, l.size = "small", l.fullscreen = !1, l.mode = "dialog", l.footer = !1, l.header = !1);
475
- const f = Math.random().toString(32).slice(2), C = Object.assign({
490
+ typeof s == "string" && (d.type = s, a.size = "small", a.fullscreen = !1, a.mode = "dialog", a.footer = !1, a.header = !1);
491
+ const f = Math.random().toString(32).slice(2), k = Object.assign({
476
492
  zIndex: typeof s == "string" ? 1100 : 1e3
477
- }, l), R = new Promise(($, I) => {
478
- n.value.push({
493
+ }, a), T = new Promise(($, N) => {
494
+ o.value.push({
479
495
  id: f,
480
- component: v,
481
- props: u || {},
496
+ component: g,
497
+ props: d || {},
482
498
  options: {
483
- ...C,
499
+ ...k,
484
500
  type: typeof s == "string" ? s : "component"
485
501
  },
486
502
  resolve: $,
487
- reject: I,
503
+ reject: N,
488
504
  listeners: []
489
- }), D(n);
505
+ }), F(o);
490
506
  }).catch(($) => $ === "CANCEL" ? new Promise(() => {
491
507
  }) : Promise.reject($));
492
- return Object.assign(R, {
508
+ return Object.assign(T, {
493
509
  close: () => c(f)
494
510
  });
495
511
  }
496
- function c(s, u) {
497
- const l = n.value.findIndex((f) => f.id === s);
498
- if (l < 0)
512
+ function c(s, d) {
513
+ const a = o.value.findIndex((f) => f.id === s);
514
+ if (a < 0)
499
515
  return;
500
- const v = n.value[l];
501
- u === void 0 ? v == null || v.reject("CANCEL") : v == null || v.resolve(u), n.value.splice(l, 1), D(n);
516
+ const g = o.value[a];
517
+ d === void 0 ? g == null || g.reject("CANCEL") : g == null || g.resolve(d), o.value.splice(a, 1), F(o);
502
518
  }
503
519
  function h() {
504
- !n.value || n.value.length === 0 || (n.value.forEach((s) => {
520
+ !o.value || o.value.length === 0 || (o.value.forEach((s) => {
505
521
  s == null || s.reject("CANCEL");
506
- }), n.value = [], D(n));
522
+ }), o.value = [], F(o));
507
523
  }
508
- function _(s, u) {
509
- const l = n.value.find((f) => f.id === s);
510
- if (!l)
524
+ function _(s, d) {
525
+ const a = o.value.find((f) => f.id === s);
526
+ if (!a)
511
527
  return;
512
- const v = l.listeners.find((f) => f.event === u);
513
- v && v.callback({
528
+ const g = a.listeners.find((f) => f.event === d);
529
+ g && g.callback({
514
530
  open: i,
515
- close: (f) => c(l.id, f),
531
+ close: (f) => c(a.id, f),
516
532
  closeAll: h,
517
- showLoading: () => b(l.id),
518
- hideLoading: () => m(l.id),
533
+ showLoading: () => b(a.id),
534
+ hideLoading: () => m(a.id),
519
535
  confirm: (f) => i("confirm", f),
520
536
  success: (f) => i("success", f),
521
537
  error: (f) => i("error", f),
@@ -523,107 +539,125 @@ const Xe = (t) => ($e("data-v-8d442648"), t = t(), Ee(), t), Ye = { class: "titl
523
539
  info: (f) => i("info", f)
524
540
  });
525
541
  }
526
- function b(s) {
527
- if (!a)
542
+ function b(s, d) {
543
+ if (!l)
528
544
  return;
529
- const [u] = a.refs[`modal-container_${s}`];
530
- if (u)
531
- return u.showLoading();
545
+ const [a] = l.refs[`modal-container_${s}`] || [];
546
+ if (a)
547
+ return a.showLoading();
548
+ {
549
+ const { close: g } = i(pt, {
550
+ text: d == null ? void 0 : d.text
551
+ }, {
552
+ footer: !1,
553
+ header: !1,
554
+ closeable: !1,
555
+ backgroundColor: "transparent"
556
+ });
557
+ return d != null && d.duration && setTimeout(
558
+ () => {
559
+ g();
560
+ },
561
+ d == null ? void 0 : d.duration
562
+ ), g;
563
+ }
532
564
  }
533
565
  function m(s) {
534
- if (!a)
566
+ if (!l)
535
567
  return;
536
- const [u] = a.refs[`modal-container_${s}`];
537
- if (u)
538
- return u.hideLoading();
568
+ const [d] = l.refs[`modal-container_${s}`];
569
+ if (d)
570
+ return d.hideLoading();
539
571
  }
540
- function d(s, u, l) {
541
- const v = n.value.find((f) => f.id === s);
542
- v && v.listeners.push({
543
- event: u,
544
- callback: l
572
+ function u(s, d, a) {
573
+ const g = o.value.find((f) => f.id === s);
574
+ g && g.listeners.push({
575
+ event: d,
576
+ callback: a
545
577
  });
546
578
  }
547
- return Le(K, {
579
+ return Le(U, {
548
580
  open: i,
549
581
  close: c,
550
582
  closeAll: h,
551
- addEventListener: d
583
+ addEventListener: u,
584
+ showLoading: b,
585
+ hideLoading: m
552
586
  }), r({
553
- elements: n,
587
+ elements: o,
554
588
  open: i,
555
589
  close: c,
556
590
  closeAll: h
557
591
  }), Y(() => {
558
592
  e.value = !0;
559
- }), (s, u) => (y(), S(Q, null, [
593
+ }), (s, d) => (y(), C(Z, null, [
560
594
  oe(s.$slots, "default", {}, void 0, !0),
561
- e.value ? (y(), S("div", at, [
562
- (y(), N(ne, {
595
+ e.value ? (y(), C("div", ht, [
596
+ (y(), P(ne, {
563
597
  disabled: !s.appendToBody,
564
598
  to: typeof s.appendToBody == "string" ? s.appendToBody : "body"
565
599
  }, [
566
600
  Ae(Re, { name: "modal-fade" }, {
567
- default: Oe(() => [
568
- (y(!0), S(Q, null, Te(n.value, (l) => (y(), N(tt, Be({
569
- id: l.id,
570
- key: l.id,
601
+ default: Te(() => [
602
+ (y(!0), C(Z, null, Oe(o.value, (a) => (y(), P(tt, Be({
603
+ id: a.id,
604
+ key: a.id,
571
605
  ref_for: !0,
572
- ref: `modal-container_${l.id}`,
573
- component: l.component,
574
- "component-props": l.props,
606
+ ref: `modal-container_${a.id}`,
607
+ component: a.component,
608
+ "component-props": a.props,
575
609
  "max-height": s.maxHeight,
576
610
  "max-width": s.maxWidth,
577
611
  offset: s.offset,
578
612
  sizes: s.sizes
579
- }, l.options, {
580
- onSubmit: () => _(l.id, "submit")
613
+ }, a.options, {
614
+ onSubmit: () => _(a.id, "submit")
581
615
  }), null, 16, ["id", "component", "component-props", "max-height", "max-width", "offset", "sizes", "onSubmit"]))), 128))
582
616
  ]),
583
617
  _: 1
584
618
  })
585
619
  ], 8, ["disabled", "to"]))
586
- ])) : P("", !0)
620
+ ])) : z("", !0)
587
621
  ], 64));
588
622
  }
589
- }), bt = /* @__PURE__ */ V(ct, [["__scopeId", "data-v-756481fe"]]), ut = {}, ft = { class: "modal-footer" };
590
- function pt(t, r) {
591
- return y(), N(ne, { to: "#modal-footer-slot" }, [
592
- g("div", ft, [
623
+ }), Mt = /* @__PURE__ */ I(vt, [["__scopeId", "data-v-60414811"]]), gt = {}, yt = { class: "modal-footer" };
624
+ function bt(t, r) {
625
+ return y(), P(ne, { to: "#modal-footer-slot" }, [
626
+ v("div", yt, [
593
627
  oe(t.$slots, "default", {}, void 0, !0)
594
628
  ])
595
629
  ]);
596
630
  }
597
- const wt = /* @__PURE__ */ V(ut, [["render", pt], ["__scopeId", "data-v-46f8d703"]]), ht = {}, mt = { class: "modal-header" };
598
- function vt(t, r) {
599
- return y(), N(ne, { to: "#modal-header-slot" }, [
600
- g("div", mt, [
631
+ const St = /* @__PURE__ */ I(gt, [["render", bt], ["__scopeId", "data-v-46f8d703"]]), wt = {}, _t = { class: "modal-header" };
632
+ function xt(t, r) {
633
+ return y(), P(ne, { to: "#modal-header-slot" }, [
634
+ v("div", _t, [
601
635
  oe(t.$slots, "default", {}, void 0, !0)
602
636
  ])
603
637
  ]);
604
638
  }
605
- const _t = /* @__PURE__ */ V(ht, [["render", vt], ["__scopeId", "data-v-d0247172"]]);
639
+ const $t = /* @__PURE__ */ I(wt, [["render", xt], ["__scopeId", "data-v-d0247172"]]);
606
640
  function X(t, r) {
607
- var e, a;
608
- let n = t == null ? void 0 : t.parent;
609
- for (; n && ((e = n == null ? void 0 : n.type) == null ? void 0 : e.name) !== r; )
610
- n = n.parent;
611
- return ((a = n == null ? void 0 : n.type) == null ? void 0 : a.name) === r ? n : null;
641
+ var e, l;
642
+ let o = t == null ? void 0 : t.parent;
643
+ for (; o && ((e = o == null ? void 0 : o.type) == null ? void 0 : e.name) !== r; )
644
+ o = o.parent;
645
+ return ((l = o == null ? void 0 : o.type) == null ? void 0 : l.name) === r ? o : null;
612
646
  }
613
- function gt() {
614
- const t = te(K), r = F();
615
- function n(e, a, i) {
647
+ function Ct() {
648
+ const t = te(U), r = V();
649
+ function o(e, l, i) {
616
650
  if (!t)
617
651
  throw new Error("Not Found Modal Provider Component");
618
- return t.open(e, a, i);
652
+ return t.open(e, l, i);
619
653
  }
620
654
  return {
621
- open: n,
655
+ open: o,
622
656
  close(e) {
623
657
  var c;
624
658
  if (!t)
625
659
  throw new Error("Not Found Modal Provider Component");
626
- const a = X(r, "ModalContainer"), i = (c = a == null ? void 0 : a.props) == null ? void 0 : c.id;
660
+ const l = X(r, "ModalContainer"), i = (c = l == null ? void 0 : l.props) == null ? void 0 : c.id;
627
661
  if (!i)
628
662
  throw new Error("Not Found Current Modal Container");
629
663
  t.close(i, e);
@@ -633,23 +667,19 @@ function gt() {
633
667
  throw new Error("Not Found Modal Provider Component");
634
668
  t.closeAll();
635
669
  },
636
- showLoading() {
637
- var i;
670
+ showLoading(e) {
671
+ var c;
638
672
  if (!t)
639
673
  throw new Error("Not Found Modal Provider Component");
640
- const e = X(r, "ModalContainer");
641
- if (!((i = e == null ? void 0 : e.props) == null ? void 0 : i.id))
642
- throw new Error("Not Found Current Modal Container");
643
- e != null && e.exposed && (e == null || e.exposed.showLoading());
674
+ const l = X(r, "ModalContainer"), i = (c = l == null ? void 0 : l.props) == null ? void 0 : c.id;
675
+ return t.showLoading(i, e);
644
676
  },
645
677
  hideLoading() {
646
678
  var i;
647
679
  if (!t)
648
680
  throw new Error("Not Found Modal Provider Component");
649
- const e = X(r, "ModalContainer");
650
- if (!((i = e == null ? void 0 : e.props) == null ? void 0 : i.id))
651
- throw new Error("Not Found Current Modal Container");
652
- e != null && e.exposed && (e == null || e.exposed.hideLoading());
681
+ const e = X(r, "ModalContainer"), l = (i = e == null ? void 0 : e.props) == null ? void 0 : i.id;
682
+ return t.hideLoading(l);
653
683
  },
654
684
  confirm(e) {
655
685
  return this.open("confirm", e);
@@ -668,17 +698,17 @@ function gt() {
668
698
  }
669
699
  };
670
700
  }
671
- function xt(t) {
701
+ function Et(t) {
672
702
  var i;
673
- const r = te(K), n = F(), e = X(n, "ModalContainer"), a = (i = e == null ? void 0 : e.props) == null ? void 0 : i.id;
674
- r && a && r.addEventListener(a, "submit", t);
703
+ const r = te(U), o = V(), e = X(o, "ModalContainer"), l = (i = e == null ? void 0 : e.props) == null ? void 0 : i.id;
704
+ r && l && r.addEventListener(l, "submit", t);
675
705
  }
676
706
  export {
677
707
  tt as ModalContainer,
678
- wt as ModalFooter,
679
- _t as ModalHeader,
680
- K as ModalKey,
681
- bt as ModalProvider,
682
- xt as onSubmit,
683
- gt as useModal
708
+ St as ModalFooter,
709
+ $t as ModalHeader,
710
+ U as ModalKey,
711
+ Mt as ModalProvider,
712
+ Et as onSubmit,
713
+ Ct as useModal
684
714
  };
@@ -6,6 +6,10 @@ export interface SizeOptions {
6
6
  middle: string | number;
7
7
  large: string | number;
8
8
  }
9
+ export interface ShowLoadingOptions {
10
+ duration?: number;
11
+ text?: string;
12
+ }
9
13
  export interface OpenModalOptions {
10
14
  closeable?: boolean;
11
15
  esc?: boolean;
@@ -48,4 +52,6 @@ export interface ModalActions {
48
52
  close: (id: string, data?: any) => void;
49
53
  closeAll: () => void;
50
54
  addEventListener: (id: string, event: 'submit', callback: (modal: ReturnType<typeof useModal>) => void) => void;
55
+ showLoading: (id?: string, options?: ShowLoadingOptions) => () => void;
56
+ hideLoading: (id?: string) => void;
51
57
  }
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-8d442648]{z-index:var(--8796093c);position:fixed;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;background:#0000004d}.modal-content[data-v-8d442648]{background:#fff;border-radius:5px;position:relative}.modal-header[data-v-8d442648]{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-8d442648]{padding:10px;box-sizing:border-box;overflow:auto;position:relative}.modal-footer[data-v-8d442648]{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-8d442648]{height:32px;line-height:28px;min-width:80px;outline:none;border-color:transparent;font-size:14px;border-radius:4px;padding:0 10px;box-sizing:border-box}.modal-footer button.submit-button[data-v-8d442648]{color:#fff;background-color:rgb(var(--primary-6, 45, 106, 251))}.modal-footer button.submit-button[data-v-8d442648]:hover{background-color:rgb(var(--primary-5, 28, 76, 207))}.modal-footer button.submit-button[data-v-8d442648]:active{background-color:rgb(var(--primary-7, 14, 66, 210))}.modal-footer button.cancel-button[data-v-8d442648]{color:rgb(var(--color-text-2, 78, 89, 105));background-color:var(--color-fill-1, #f5f5f5)}.modal-footer button.cancel-button[data-v-8d442648]:hover{background-color:var(--color-fill-3, #e5e6eb)}.modal-footer button.cancel-button[data-v-8d442648]:active{background-color:var(--color-fill-4, #c9cdd4)}.modal-loading[data-v-8d442648]{position:absolute;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-8d442648]{display:inline-block;position:relative;width:80px;height:80px}.modal-loading .lds-ring div[data-v-8d442648]{box-sizing:border-box;display:block;position:absolute;width:48px;height:48px;margin:8px;border:5px solid #fff;border-radius:50%;animation:lds-ring-8d442648 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#fff transparent transparent transparent}.modal-loading .lds-ring div[data-v-8d442648]:nth-child(1){animation-delay:-.45s}.modal-loading .lds-ring div[data-v-8d442648]:nth-child(2){animation-delay:-.3s}.modal-loading .lds-ring div[data-v-8d442648]:nth-child(3){animation-delay:-.15s}@keyframes lds-ring-8d442648{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.dialog-body[data-v-0c6b8db2]{padding:20px 10px 10px}.dialog-title[data-v-0c6b8db2]{padding:5px;font-weight:700;font-size:16px}.dialog-content[data-v-0c6b8db2]{padding:5px}.dialog-footer[data-v-0c6b8db2]{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-0c6b8db2]{height:32px;line-height:28px;min-width:80px;outline:none;border-color:transparent;font-size:14px;border-radius:4px;padding:0;box-sizing:border-box}.dialog-footer button.submit-button[data-v-0c6b8db2]{color:#fff;background-color:rgb(var(--primary-6, 45, 106, 251))}.dialog-footer button.submit-button[data-v-0c6b8db2]:hover{background-color:rgb(var(--primary-5, 28, 76, 207))}.dialog-footer button.submit-button[data-v-0c6b8db2]:active{background-color:rgb(var(--primary-7, 14, 66, 210))}.dialog-footer button.cancel-button[data-v-0c6b8db2]{color:rgb(var(--color-text-2, 78, 89, 105));background-color:var(--color-fill-1, #f5f5f5)}.dialog-footer button.cancel-button[data-v-0c6b8db2]:hover{background-color:var(--color-fill-4, #c9cdd4)}.modal-fade-enter-active[data-v-756481fe],.modal-fade-leave-active[data-v-756481fe]{transition:opacity .5s ease}.modal-fade-enter-active[data-v-756481fe] .modal-content.drawer-mode,.modal-fade-leave-active[data-v-756481fe] .modal-content.drawer-mode{transition:transform .5s ease}.modal-fade-enter-from[data-v-756481fe],.modal-fade-leave-to[data-v-756481fe]{opacity:0}.modal-fade-enter-from[data-v-756481fe] .modal-content.drawer-mode.left-position,.modal-fade-leave-to[data-v-756481fe] .modal-content.drawer-mode.left-position{transform:translate3d(-100%,0,0)}.modal-fade-enter-from[data-v-756481fe] .modal-content.drawer-mode.right-position,.modal-fade-leave-to[data-v-756481fe] .modal-content.drawer-mode.right-position{transform:translate3d(100%,0,0)}.modal-fade-enter-from[data-v-756481fe] .modal-content.drawer-mode.top-position,.modal-fade-leave-to[data-v-756481fe] .modal-content.drawer-mode.top-position{transform:translate3d(0,-100%,0)}.modal-fade-enter-from[data-v-756481fe] .modal-content.drawer-mode.bottom-position,.modal-fade-leave-to[data-v-756481fe] .modal-content.drawer-mode.bottom-position{transform:translate3d(0,100%,0)}.modal-footer[data-v-46f8d703]{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-46f8d703]{height:32px;line-height:28px;min-width:80px;outline:none;border-color:transparent;font-size:14px;border-radius:4px;padding:0;box-sizing:border-box}.modal-footer button.submit-button[data-v-46f8d703]{color:#fff;background-color:rgb(var(--primary-6, 45, 106, 251))}.modal-footer button.submit-button[data-v-46f8d703]:hover{background-color:rgb(var(--primary-5, 28, 76, 207))}.modal-footer button.submit-button[data-v-46f8d703]:active{background-color:rgb(var(--primary-7, 14, 66, 210))}.modal-footer button.cancel-button[data-v-46f8d703]{color:rgb(var(--color-text-2, 78, 89, 105));background-color:var(--color-fill-1, #f5f5f5)}.modal-footer button.cancel-button[data-v-46f8d703]:hover{background-color:var(--color-fill-3, #e5e6eb)}.modal-footer button.cancel-button[data-v-46f8d703]:active{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}.inline-flex{display:inline-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-9a7af353]{z-index:var(--5751bf6b);position:fixed;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;background:#0000004d}.modal-content[data-v-9a7af353]{background:#fff;border-radius:5px;position:relative}.modal-header[data-v-9a7af353]{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-9a7af353]{padding:10px;box-sizing:border-box;overflow:auto;position:relative}.modal-footer[data-v-9a7af353]{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-9a7af353]{height:32px;line-height:28px;min-width:80px;outline:none;border-color:transparent;font-size:14px;border-radius:4px;padding:0 10px;box-sizing:border-box}.modal-footer button.submit-button[data-v-9a7af353]{color:#fff;background-color:rgb(var(--primary-6, 45, 106, 251))}.modal-footer button.submit-button[data-v-9a7af353]:hover{background-color:rgb(var(--primary-5, 28, 76, 207))}.modal-footer button.submit-button[data-v-9a7af353]:active{background-color:rgb(var(--primary-7, 14, 66, 210))}.modal-footer button.cancel-button[data-v-9a7af353]{color:rgb(var(--color-text-2, 78, 89, 105));background-color:var(--color-fill-1, #f5f5f5)}.modal-footer button.cancel-button[data-v-9a7af353]:hover{background-color:var(--color-fill-3, #e5e6eb)}.modal-footer button.cancel-button[data-v-9a7af353]:active{background-color:var(--color-fill-4, #c9cdd4)}.modal-loading[data-v-9a7af353]{position:absolute;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-9a7af353]{display:inline-block;position:relative;width:80px;height:80px}.modal-loading .lds-ring div[data-v-9a7af353]{box-sizing:border-box;display:block;position:absolute;width:48px;height:48px;margin:8px;border:5px solid #fff;border-radius:50%;animation:lds-ring-9a7af353 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#fff transparent transparent transparent}.modal-loading .lds-ring div[data-v-9a7af353]:nth-child(1){animation-delay:-.45s}.modal-loading .lds-ring div[data-v-9a7af353]:nth-child(2){animation-delay:-.3s}.modal-loading .lds-ring div[data-v-9a7af353]:nth-child(3){animation-delay:-.15s}@keyframes lds-ring-9a7af353{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.dialog-body[data-v-0c6b8db2]{padding:20px 10px 10px}.dialog-title[data-v-0c6b8db2]{padding:5px;font-weight:700;font-size:16px}.dialog-content[data-v-0c6b8db2]{padding:5px}.dialog-footer[data-v-0c6b8db2]{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-0c6b8db2]{height:32px;line-height:28px;min-width:80px;outline:none;border-color:transparent;font-size:14px;border-radius:4px;padding:0;box-sizing:border-box}.dialog-footer button.submit-button[data-v-0c6b8db2]{color:#fff;background-color:rgb(var(--primary-6, 45, 106, 251))}.dialog-footer button.submit-button[data-v-0c6b8db2]:hover{background-color:rgb(var(--primary-5, 28, 76, 207))}.dialog-footer button.submit-button[data-v-0c6b8db2]:active{background-color:rgb(var(--primary-7, 14, 66, 210))}.dialog-footer button.cancel-button[data-v-0c6b8db2]{color:rgb(var(--color-text-2, 78, 89, 105));background-color:var(--color-fill-1, #f5f5f5)}.dialog-footer button.cancel-button[data-v-0c6b8db2]:hover{background-color:var(--color-fill-4, #c9cdd4)}.modal-loading .lds-ring[data-v-559bdf2e]{display:inline-flex;justify-content:center;align-items:center;position:relative;width:80px;height:80px}.modal-loading .lds-ring div[data-v-559bdf2e]{box-sizing:border-box;display:block;position:absolute;width:48px;height:48px;margin:8px;border:5px solid #fff;border-radius:50%;animation:lds-ring-559bdf2e 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#fff transparent transparent transparent}.modal-loading .lds-ring div[data-v-559bdf2e]:nth-child(1){animation-delay:-.45s}.modal-loading .lds-ring div[data-v-559bdf2e]:nth-child(2){animation-delay:-.3s}.modal-loading .lds-ring div[data-v-559bdf2e]:nth-child(3){animation-delay:-.15s}@keyframes lds-ring-559bdf2e{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.modal-loading-text[data-v-559bdf2e]{color:#fff;font-weight:700}.modal-fade-enter-active[data-v-60414811],.modal-fade-leave-active[data-v-60414811]{transition:opacity .5s ease}.modal-fade-enter-active[data-v-60414811] .modal-content.drawer-mode,.modal-fade-leave-active[data-v-60414811] .modal-content.drawer-mode{transition:transform .5s ease}.modal-fade-enter-from[data-v-60414811],.modal-fade-leave-to[data-v-60414811]{opacity:0}.modal-fade-enter-from[data-v-60414811] .modal-content.drawer-mode.left-position,.modal-fade-leave-to[data-v-60414811] .modal-content.drawer-mode.left-position{transform:translate3d(-100%,0,0)}.modal-fade-enter-from[data-v-60414811] .modal-content.drawer-mode.right-position,.modal-fade-leave-to[data-v-60414811] .modal-content.drawer-mode.right-position{transform:translate3d(100%,0,0)}.modal-fade-enter-from[data-v-60414811] .modal-content.drawer-mode.top-position,.modal-fade-leave-to[data-v-60414811] .modal-content.drawer-mode.top-position{transform:translate3d(0,-100%,0)}.modal-fade-enter-from[data-v-60414811] .modal-content.drawer-mode.bottom-position,.modal-fade-leave-to[data-v-60414811] .modal-content.drawer-mode.bottom-position{transform:translate3d(0,100%,0)}.modal-footer[data-v-46f8d703]{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-46f8d703]{height:32px;line-height:28px;min-width:80px;outline:none;border-color:transparent;font-size:14px;border-radius:4px;padding:0;box-sizing:border-box}.modal-footer button.submit-button[data-v-46f8d703]{color:#fff;background-color:rgb(var(--primary-6, 45, 106, 251))}.modal-footer button.submit-button[data-v-46f8d703]:hover{background-color:rgb(var(--primary-5, 28, 76, 207))}.modal-footer button.submit-button[data-v-46f8d703]:active{background-color:rgb(var(--primary-7, 14, 66, 210))}.modal-footer button.cancel-button[data-v-46f8d703]{color:rgb(var(--color-text-2, 78, 89, 105));background-color:var(--color-fill-1, #f5f5f5)}.modal-footer button.cancel-button[data-v-46f8d703]:hover{background-color:var(--color-fill-3, #e5e6eb)}.modal-footer button.cancel-button[data-v-46f8d703]:active{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.39",
4
+ "version": "0.0.41",
5
5
  "author": {
6
6
  "name": "zhuchentong",
7
7
  "email": "2037630@gmail.com"
@@ -56,6 +56,7 @@
56
56
  "@unocss/preset-icons": "^0.59.4",
57
57
  "@unocss/preset-uno": "^0.59.4",
58
58
  "@vitejs/plugin-vue": "5.0.4",
59
+ "@vitejs/plugin-vue-jsx": "^3.1.0",
59
60
  "@vue/compiler-sfc": "3.4.23",
60
61
  "@vueuse/core": "^10.9.0",
61
62
  "less": "^4.2.0",