@gopowerteam/modal-render 0.0.1 → 0.0.2
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.
- package/dist/index.cjs +1 -1
- package/dist/index.js +215 -209
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");const B=Symbol("__MODAL__");function R(o){return e.getCurrentScope()?(e.onScopeDispose(o),!0):!1}function g(o){return typeof o=="function"?o():e.unref(o)}const V=typeof window<"u"&&typeof document<"u",W=Object.prototype.toString,D=o=>W.call(o)==="[object Object]",T=()=>{};function F(o,a={}){if(!e.isRef(o))return e.toRefs(o);const t=Array.isArray(o.value)?Array.from({length:o.value.length}):{};for(const n in o.value)t[n]=e.customRef(()=>({get(){return o.value[n]},set(r){var u;if((u=g(a.replaceRef))!=null?u:!0)if(Array.isArray(o.value)){const p=[...o.value];p[n]=r,o.value=p}else{const p={...o.value,[n]:r};Object.setPrototypeOf(p,Object.getPrototypeOf(o.value)),o.value=p}else o.value[n]=r}}));return t}function H(o){var a;const t=g(o);return(a=t==null?void 0:t.$el)!=null?a:t}const z=V?window:void 0;function A(...o){let a,t,n,r;if(typeof o[0]=="string"||Array.isArray(o[0])?([t,n,r]=o,a=z):[a,t,n,r]=o,!a)return T;Array.isArray(t)||(t=[t]),Array.isArray(n)||(n=[n]);const u=[],v=()=>{u.forEach(d=>d()),u.length=0},p=(d,c,f,m)=>(d.addEventListener(c,f,m),()=>d.removeEventListener(c,f,m)),_=e.watch(()=>[H(a),g(r)],([d,c])=>{if(v(),!d)return;const f=D(c)?{...c}:c;u.push(...t.flatMap(m=>n.map(w=>p(d,m,w,f))))},{immediate:!0,flush:"post"}),s=()=>{_(),v()};return R(s),s}function I(o,a={}){var t,n;const{pointerTypes:r,preventDefault:u,stopPropagation:v,exact:p,onMove:_,onEnd:s,onStart:d,initialValue:c,axis:f="both",draggingElement:m=z,containerElement:w,handle:M=o}=a,y=e.ref((t=g(c))!=null?t:{x:0,y:0}),b=e.ref(),k=l=>r?r.includes(l.pointerType):!0,E=l=>{g(u)&&l.preventDefault(),g(v)&&l.stopPropagation()},S=l=>{var h;if(!k(l)||g(p)&&l.target!==g(o))return;const N=((h=g(w))!=null?h:g(o)).getBoundingClientRect(),O={x:l.clientX-N.left,y:l.clientY-N.top};(d==null?void 0:d(O,l))!==!1&&(b.value=O,E(l))},x=l=>{if(!k(l)||!b.value)return;let{x:h,y:C}=y.value;(f==="x"||f==="both")&&(h=l.clientX-b.value.x),(f==="y"||f==="both")&&(C=l.clientY-b.value.y),y.value={x:h,y:C},_==null||_(y.value,l),E(l)},i=l=>{k(l)&&b.value&&(b.value=void 0,s==null||s(y.value,l),E(l))};if(V){const l={capture:(n=a.capture)!=null?n:!0};A(M,"pointerdown",S,l),A(m,"pointermove",x,l),A(m,"pointerup",i,l)}return{...F(y),position:y,isDragging:e.computed(()=>!!b.value),style:e.computed(()=>`left:${y.value.x}px;top:${y.value.y}px;`)}}const X={class:"modal-container"},Y={class:"title font-bold"},K={class:"action"},q={key:1,class:"modal-footer space-x-2"},G=["form"],U={name:"ModalContainer",inheritAttrs:!0},J=e.defineComponent({...U,props:{id:{},formId:{},component:{},componentProps:{},width:{},maxWidth:{},maxHeight:{},sizes:{},size:{default:"middle"},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}},emits:["submit"],setup(o,{emit:a}){const t=o,n=a,r=e.inject(B);let u=0,v=0,p;const _=e.shallowRef(),s=e.shallowRef(),{x:d,y:c}=I(s,{initialValue:{x:0,y:0}});function f(){r==null||r.close(t.id)}function m(i){if(typeof i=="number")return`${i}px`;if(typeof i=="string")return i}const w=e.computed(()=>{const i={};return t.size&&(i.width=m(t.sizes[t.size])),t.width&&(i.width=m(t.width)),t.maxWidth&&(i.maxWidth=m(t.maxWidth)),t.draggable&&(i.transform=`translate(${d.value-u}px, ${c.value-v}px)`),i}),M=e.computed(()=>{const i={};return t.draggable&&(i.cursor="move"),i}),y=e.computed(()=>{var l;const i={};return t.maxHeight&&(i.maxHeight=`calc(${(l=m(t.maxWidth))==null?void 0:l.replace("%","vh")} - 50px)`),i});function b(){n("submit")}function k(){r==null||r.close(t.id)}function E(){window&&window.addEventListener("resize",()=>{e.triggerRef(_),e.triggerRef(s),u=s.value.offsetLeft,v=s.value.offsetTop})}function S(){if(t.closeable&&t.esc){const i=({key:l})=>{l==="Escape"&&(r==null||r.close(t.id),window.removeEventListener("keydown",i))};window.addEventListener("keydown",i)}}function x(){p=new MutationObserver(i=>{i.forEach(l=>{const h=s.value.offsetLeft,C=s.value.offsetTop;h!==u&&(u=h),C!==v&&(v=h)})}),p.observe(s.value,{attributes:!0,attributeFilter:["style","offsetHeight","offsetWidth","clientHeight","clientWidth"],attributeOldValue:!0})}return e.onMounted(()=>{S(),x(),E()}),e.onUnmounted(()=>{p&&(p.disconnect(),p.takeRecords())}),(i,l)=>(e.openBlock(),e.createElementBlock("div",X,[e.createElementVNode("div",{ref_key:"wrapperRef",ref:_,class:"modal-wrapper",onClick:l[0]||(l[0]=e.withModifiers(h=>i.maskClosable&&f(),["self"]))},[e.createElementVNode("div",{ref_key:"contentRef",ref:s,class:"modal-content",style:e.normalizeStyle(w.value)},[i.header?(e.openBlock(),e.createElementBlock("div",{key:0,ref:"",class:"modal-header",style:e.normalizeStyle(M.value)},[e.createElementVNode("div",Y,e.toDisplayString(i.title),1),e.createElementVNode("div",K,[i.closeable?(e.openBlock(),e.createElementBlock("div",{key:0,class:"i-icon-park-outline:close block cursor-pointer",onClick:f})):e.createCommentVNode("",!0)])],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"modal-body",style:e.normalizeStyle(y.value)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.component),e.normalizeProps(e.guardReactiveProps(i.componentProps)),null,16))],4),i.footer?(e.openBlock(),e.createElementBlock("div",q,[e.createElementVNode("button",{class:"submit-button",form:i.formId,type:"submit",onClick:b}," 确定 ",8,G),e.createElementVNode("button",{class:"cancel-button",type:"button",onClick:k}," 取消 ")])):e.createCommentVNode("",!0)],4)],512)]))}});const L=(o,a)=>{const t=o.__vccOpts||o;for(const[n,r]of a)t[n]=r;return t},$=L(J,[["__scopeId","data-v-e6f6653f"]]),Q={key:0,class:"modal-teleport"},Z={name:"ModalProvider",inheritAttrs:!0},j=e.defineComponent({...Z,props:{appendToBody:{type:Boolean,default:!1},sizes:{default:()=>({small:520,middle:860,large:1190})},maxWidth:{default:"80%"},maxHeight:{default:"80%"}},setup(o,{expose:a}){const t=e.shallowRef([]),n=e.ref(!1);async function r(s,d,c){const f=e.defineAsyncComponent(()=>Promise.resolve(s));return new Promise(m=>{t.value.push({id:Math.random().toString(32).slice(2),component:f,props:d,options:c,resolve:m,onSubmit:e.ref(()=>{})}),e.triggerRef(t)})}function u(s,d){const c=t.value.findIndex(m=>m.id===s);if(c<0)return;const f=t.value[c];f==null||f.resolve(d),t.value.splice(c,1),e.triggerRef(t)}function v(){t.value.forEach(s=>{s.resolve()}),t.value=[],e.triggerRef(t)}function p(s){return t.value.find(d=>d.id===s)}function _(s,d){const c=t.value.find(f=>f.id===s);c&&(c.onSubmit.value=d)}return e.provide(B,{open:r,close:u,closeAll:v,getElement:p,addSubmitListener:_}),a({elements:t}),e.onMounted(()=>{n.value=!0}),(s,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(s.$slots,"default",{},void 0,!0),n.value?(e.openBlock(),e.createElementBlock("div",Q,[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!s.appendToBody,to:"body"},[e.createVNode(e.TransitionGroup,{name:"modal-fade"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,c=>(e.openBlock(),e.createBlock($,e.mergeProps({id:c.id,key:c.id,component:c.component,"component-props":c.props,"max-height":s.maxHeight,"max-width":s.maxWidth,sizes:s.sizes},c.options,{onSubmit:c.onSubmit.value}),null,16,["id","component","component-props","max-height","max-width","sizes","onSubmit"]))),128))]),_:1})],8,["disabled"]))])):e.createCommentVNode("",!0)],64))}});const ee=L(j,[["__scopeId","data-v-171d9bdd"]]);function P(o,a){var n,r;let t=o==null?void 0:o.parent;for(;t&&((n=t==null?void 0:t.type)==null?void 0:n.name)!==a;)t=t.parent;return((r=t==null?void 0:t.type)==null?void 0:r.name)===a?t:null}function te(){const o=e.inject(B),a=e.getCurrentInstance();return{open(t,n,r){if(!o)throw new Error("Not Found Modal Provider Component");return o.open(t,n||{},r||{})},close(t){var u;if(!o)throw new Error("Not Found Modal Provider Component");const n=P(a,"ModalContainer"),r=(u=n==null?void 0:n.props)==null?void 0:u.id;if(!r)throw new Error("Not Found Current Modal Container");o.close(r,t)},closeAll(){if(!o)throw new Error("Not Found Modal Provider Component");o.closeAll()},onSubmit(t){const n=P(a,"ModalContainer");if(!(n==null?void 0:n.props.id))throw new Error("Not Found Current Modal Container")}}}function oe(o){var u;const a=e.inject(B),t=e.getCurrentInstance(),n=P(t,"ModalContainer"),r=(u=n==null?void 0:n.props)==null?void 0:u.id;a&&r&&a.addSubmitListener(r,o)}exports.ModalContainer=$;exports.ModalProvider=ee;exports.onSubmit=oe;exports.useModal=te;
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { unref as
|
|
2
|
-
const
|
|
3
|
-
function
|
|
1
|
+
import { unref as J, isRef as Q, toRefs as Z, customRef as j, getCurrentScope as ee, onScopeDispose as te, ref as O, computed as k, watch as ne, defineComponent as X, inject as V, shallowRef as H, onMounted as Y, onUnmounted as oe, openBlock as _, createElementBlock as C, createElementVNode as w, withModifiers as re, normalizeStyle as W, toDisplayString as ie, createCommentVNode as P, createBlock as N, resolveDynamicComponent as se, normalizeProps as le, guardReactiveProps as ae, triggerRef as A, provide as ue, Fragment as R, renderSlot as ce, Teleport as de, createVNode as fe, TransitionGroup as pe, withCtx as ve, renderList as me, mergeProps as ye, defineAsyncComponent as he, getCurrentInstance as K } from "vue";
|
|
2
|
+
const z = Symbol("__MODAL__");
|
|
3
|
+
function _e(t) {
|
|
4
4
|
return ee() ? (te(t), !0) : !1;
|
|
5
5
|
}
|
|
6
|
-
function
|
|
7
|
-
return typeof t == "function" ? t() :
|
|
6
|
+
function h(t) {
|
|
7
|
+
return typeof t == "function" ? t() : J(t);
|
|
8
8
|
}
|
|
9
|
-
const G = typeof window < "u" && typeof document < "u",
|
|
9
|
+
const G = typeof window < "u" && typeof document < "u", ge = Object.prototype.toString, be = (t) => ge.call(t) === "[object Object]", we = () => {
|
|
10
10
|
};
|
|
11
|
-
function
|
|
12
|
-
if (!
|
|
11
|
+
function Ce(t, l = {}) {
|
|
12
|
+
if (!Q(t))
|
|
13
13
|
return Z(t);
|
|
14
14
|
const e = Array.isArray(t.value) ? Array.from({ length: t.value.length }) : {};
|
|
15
15
|
for (const n in t.value)
|
|
@@ -18,14 +18,14 @@ function we(t, i = {}) {
|
|
|
18
18
|
return t.value[n];
|
|
19
19
|
},
|
|
20
20
|
set(o) {
|
|
21
|
-
var
|
|
22
|
-
if ((
|
|
21
|
+
var u;
|
|
22
|
+
if ((u = h(l.replaceRef)) != null ? u : !0)
|
|
23
23
|
if (Array.isArray(t.value)) {
|
|
24
|
-
const
|
|
25
|
-
|
|
24
|
+
const f = [...t.value];
|
|
25
|
+
f[n] = o, t.value = f;
|
|
26
26
|
} else {
|
|
27
|
-
const
|
|
28
|
-
Object.setPrototypeOf(
|
|
27
|
+
const f = { ...t.value, [n]: o };
|
|
28
|
+
Object.setPrototypeOf(f, Object.getPrototypeOf(t.value)), t.value = f;
|
|
29
29
|
}
|
|
30
30
|
else
|
|
31
31
|
t.value[n] = o;
|
|
@@ -33,95 +33,95 @@ function we(t, i = {}) {
|
|
|
33
33
|
}));
|
|
34
34
|
return e;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
var
|
|
38
|
-
const e =
|
|
39
|
-
return (
|
|
36
|
+
function xe(t) {
|
|
37
|
+
var l;
|
|
38
|
+
const e = h(t);
|
|
39
|
+
return (l = e == null ? void 0 : e.$el) != null ? l : e;
|
|
40
40
|
}
|
|
41
|
-
const
|
|
41
|
+
const U = G ? window : void 0;
|
|
42
42
|
function D(...t) {
|
|
43
|
-
let
|
|
44
|
-
if (typeof t[0] == "string" || Array.isArray(t[0]) ? ([e, n, o] = t,
|
|
45
|
-
return
|
|
43
|
+
let l, e, n, o;
|
|
44
|
+
if (typeof t[0] == "string" || Array.isArray(t[0]) ? ([e, n, o] = t, l = U) : [l, e, n, o] = t, !l)
|
|
45
|
+
return we;
|
|
46
46
|
Array.isArray(e) || (e = [e]), Array.isArray(n) || (n = [n]);
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
() => [
|
|
51
|
-
([
|
|
52
|
-
if (
|
|
47
|
+
const u = [], v = () => {
|
|
48
|
+
u.forEach((c) => c()), u.length = 0;
|
|
49
|
+
}, f = (c, a, d, p) => (c.addEventListener(a, d, p), () => c.removeEventListener(a, d, p)), g = ne(
|
|
50
|
+
() => [xe(l), h(o)],
|
|
51
|
+
([c, a]) => {
|
|
52
|
+
if (v(), !c)
|
|
53
53
|
return;
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
...e.flatMap((
|
|
54
|
+
const d = be(a) ? { ...a } : a;
|
|
55
|
+
u.push(
|
|
56
|
+
...e.flatMap((p) => n.map((x) => f(c, p, x, d)))
|
|
57
57
|
);
|
|
58
58
|
},
|
|
59
59
|
{ immediate: !0, flush: "post" }
|
|
60
|
-
),
|
|
61
|
-
|
|
60
|
+
), s = () => {
|
|
61
|
+
g(), v();
|
|
62
62
|
};
|
|
63
|
-
return
|
|
63
|
+
return _e(s), s;
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function Ee(t, l = {}) {
|
|
66
66
|
var e, n;
|
|
67
67
|
const {
|
|
68
68
|
pointerTypes: o,
|
|
69
|
-
preventDefault:
|
|
70
|
-
stopPropagation:
|
|
71
|
-
exact:
|
|
72
|
-
onMove:
|
|
73
|
-
onEnd:
|
|
74
|
-
onStart:
|
|
75
|
-
initialValue:
|
|
76
|
-
axis:
|
|
77
|
-
draggingElement:
|
|
78
|
-
containerElement:
|
|
79
|
-
handle:
|
|
80
|
-
} =
|
|
81
|
-
(e =
|
|
82
|
-
), b =
|
|
83
|
-
|
|
84
|
-
},
|
|
85
|
-
var
|
|
86
|
-
if (!
|
|
69
|
+
preventDefault: u,
|
|
70
|
+
stopPropagation: v,
|
|
71
|
+
exact: f,
|
|
72
|
+
onMove: g,
|
|
73
|
+
onEnd: s,
|
|
74
|
+
onStart: c,
|
|
75
|
+
initialValue: a,
|
|
76
|
+
axis: d = "both",
|
|
77
|
+
draggingElement: p = U,
|
|
78
|
+
containerElement: x,
|
|
79
|
+
handle: B = t
|
|
80
|
+
} = l, m = O(
|
|
81
|
+
(e = h(a)) != null ? e : { x: 0, y: 0 }
|
|
82
|
+
), b = O(), E = (r) => o ? o.includes(r.pointerType) : !0, M = (r) => {
|
|
83
|
+
h(u) && r.preventDefault(), h(v) && r.stopPropagation();
|
|
84
|
+
}, $ = (r) => {
|
|
85
|
+
var y;
|
|
86
|
+
if (!E(r) || h(f) && r.target !== h(t))
|
|
87
87
|
return;
|
|
88
|
-
const F = ((
|
|
89
|
-
x:
|
|
90
|
-
y:
|
|
88
|
+
const F = ((y = h(x)) != null ? y : h(t)).getBoundingClientRect(), I = {
|
|
89
|
+
x: r.clientX - F.left,
|
|
90
|
+
y: r.clientY - F.top
|
|
91
91
|
};
|
|
92
|
-
(
|
|
93
|
-
},
|
|
94
|
-
if (!
|
|
92
|
+
(c == null ? void 0 : c(I, r)) !== !1 && (b.value = I, M(r));
|
|
93
|
+
}, L = (r) => {
|
|
94
|
+
if (!E(r) || !b.value)
|
|
95
95
|
return;
|
|
96
|
-
let { x:
|
|
97
|
-
(
|
|
98
|
-
x:
|
|
99
|
-
y:
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
|
|
96
|
+
let { x: y, y: S } = m.value;
|
|
97
|
+
(d === "x" || d === "both") && (y = r.clientX - b.value.x), (d === "y" || d === "both") && (S = r.clientY - b.value.y), m.value = {
|
|
98
|
+
x: y,
|
|
99
|
+
y: S
|
|
100
|
+
}, g == null || g(m.value, r), M(r);
|
|
101
|
+
}, i = (r) => {
|
|
102
|
+
E(r) && b.value && (b.value = void 0, s == null || s(m.value, r), M(r));
|
|
103
103
|
};
|
|
104
104
|
if (G) {
|
|
105
|
-
const
|
|
106
|
-
D(
|
|
105
|
+
const r = { capture: (n = l.capture) != null ? n : !0 };
|
|
106
|
+
D(B, "pointerdown", $, r), D(p, "pointermove", L, r), D(p, "pointerup", i, r);
|
|
107
107
|
}
|
|
108
108
|
return {
|
|
109
|
-
...
|
|
110
|
-
position:
|
|
111
|
-
isDragging:
|
|
112
|
-
style:
|
|
113
|
-
() => `left:${
|
|
109
|
+
...Ce(m),
|
|
110
|
+
position: m,
|
|
111
|
+
isDragging: k(() => !!b.value),
|
|
112
|
+
style: k(
|
|
113
|
+
() => `left:${m.value.x}px;top:${m.value.y}px;`
|
|
114
114
|
)
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
|
-
const
|
|
117
|
+
const Me = { class: "modal-container" }, Se = { class: "title font-bold" }, ke = { class: "action" }, Ae = {
|
|
118
118
|
key: 1,
|
|
119
119
|
class: "modal-footer space-x-2"
|
|
120
|
-
},
|
|
120
|
+
}, Pe = ["form"], Oe = {
|
|
121
121
|
name: "ModalContainer",
|
|
122
122
|
inheritAttrs: !0
|
|
123
|
-
},
|
|
124
|
-
...
|
|
123
|
+
}, ze = /* @__PURE__ */ X({
|
|
124
|
+
...Oe,
|
|
125
125
|
props: {
|
|
126
126
|
id: {},
|
|
127
127
|
formId: {},
|
|
@@ -141,126 +141,132 @@ const Ee = { class: "modal-container" }, Me = { class: "title font-bold" }, Se =
|
|
|
141
141
|
draggable: { type: Boolean, default: !1 }
|
|
142
142
|
},
|
|
143
143
|
emits: ["submit"],
|
|
144
|
-
setup(t, { emit:
|
|
145
|
-
const e = t, n =
|
|
146
|
-
let
|
|
147
|
-
const
|
|
144
|
+
setup(t, { emit: l }) {
|
|
145
|
+
const e = t, n = l, o = V(z);
|
|
146
|
+
let u = 0, v = 0, f;
|
|
147
|
+
const g = H(), s = H(), { x: c, y: a } = Ee(s, {
|
|
148
148
|
initialValue: { x: 0, y: 0 }
|
|
149
149
|
});
|
|
150
|
-
function
|
|
150
|
+
function d() {
|
|
151
151
|
o == null || o.close(e.id);
|
|
152
152
|
}
|
|
153
|
-
function
|
|
154
|
-
if (typeof
|
|
155
|
-
return `${
|
|
156
|
-
if (typeof
|
|
157
|
-
return
|
|
153
|
+
function p(i) {
|
|
154
|
+
if (typeof i == "number")
|
|
155
|
+
return `${i}px`;
|
|
156
|
+
if (typeof i == "string")
|
|
157
|
+
return i;
|
|
158
158
|
}
|
|
159
|
-
const
|
|
160
|
-
const
|
|
161
|
-
return e.size && (
|
|
162
|
-
}),
|
|
163
|
-
const
|
|
164
|
-
return e.draggable && (
|
|
165
|
-
}),
|
|
166
|
-
var
|
|
167
|
-
const
|
|
168
|
-
return e.maxHeight && (
|
|
159
|
+
const x = k(() => {
|
|
160
|
+
const i = {};
|
|
161
|
+
return e.size && (i.width = p(e.sizes[e.size])), e.width && (i.width = p(e.width)), e.maxWidth && (i.maxWidth = p(e.maxWidth)), e.draggable && (i.transform = `translate(${c.value - u}px, ${a.value - v}px)`), i;
|
|
162
|
+
}), B = k(() => {
|
|
163
|
+
const i = {};
|
|
164
|
+
return e.draggable && (i.cursor = "move"), i;
|
|
165
|
+
}), m = k(() => {
|
|
166
|
+
var r;
|
|
167
|
+
const i = {};
|
|
168
|
+
return e.maxHeight && (i.maxHeight = `calc(${(r = p(e.maxWidth)) == null ? void 0 : r.replace("%", "vh")} - 50px)`), i;
|
|
169
169
|
});
|
|
170
|
-
function
|
|
170
|
+
function b() {
|
|
171
171
|
n("submit");
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function E() {
|
|
174
174
|
o == null || o.close(e.id);
|
|
175
175
|
}
|
|
176
176
|
function M() {
|
|
177
177
|
window && window.addEventListener("resize", () => {
|
|
178
|
-
|
|
178
|
+
A(g), A(s), u = s.value.offsetLeft, v = s.value.offsetTop;
|
|
179
179
|
});
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function $() {
|
|
182
182
|
if (e.closeable && e.esc) {
|
|
183
|
-
const
|
|
184
|
-
|
|
183
|
+
const i = ({ key: r }) => {
|
|
184
|
+
r === "Escape" && (o == null || o.close(e.id), window.removeEventListener("keydown", i));
|
|
185
185
|
};
|
|
186
|
-
window.addEventListener("keydown",
|
|
186
|
+
window.addEventListener("keydown", i);
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
function L() {
|
|
190
|
-
new MutationObserver((
|
|
191
|
-
|
|
192
|
-
const
|
|
193
|
-
|
|
190
|
+
f = new MutationObserver((i) => {
|
|
191
|
+
i.forEach((r) => {
|
|
192
|
+
const y = s.value.offsetLeft, S = s.value.offsetTop;
|
|
193
|
+
y !== u && (u = y), S !== v && (v = y);
|
|
194
194
|
});
|
|
195
|
-
}).observe(
|
|
195
|
+
}), f.observe(s.value, {
|
|
196
|
+
attributes: !0,
|
|
197
|
+
attributeFilter: ["style", "offsetHeight", "offsetWidth", "clientHeight", "clientWidth"],
|
|
198
|
+
attributeOldValue: !0
|
|
199
|
+
});
|
|
196
200
|
}
|
|
197
201
|
return Y(() => {
|
|
198
|
-
|
|
199
|
-
}), (
|
|
200
|
-
|
|
202
|
+
$(), L(), M();
|
|
203
|
+
}), oe(() => {
|
|
204
|
+
f && (f.disconnect(), f.takeRecords());
|
|
205
|
+
}), (i, r) => (_(), C("div", Me, [
|
|
206
|
+
w("div", {
|
|
201
207
|
ref_key: "wrapperRef",
|
|
202
|
-
ref:
|
|
208
|
+
ref: g,
|
|
203
209
|
class: "modal-wrapper",
|
|
204
|
-
onClick:
|
|
210
|
+
onClick: r[0] || (r[0] = re((y) => i.maskClosable && d(), ["self"]))
|
|
205
211
|
}, [
|
|
206
|
-
|
|
212
|
+
w("div", {
|
|
207
213
|
ref_key: "contentRef",
|
|
208
|
-
ref:
|
|
214
|
+
ref: s,
|
|
209
215
|
class: "modal-content",
|
|
210
|
-
style: W(
|
|
216
|
+
style: W(x.value)
|
|
211
217
|
}, [
|
|
212
|
-
|
|
218
|
+
i.header ? (_(), C("div", {
|
|
213
219
|
key: 0,
|
|
214
220
|
ref: "",
|
|
215
221
|
class: "modal-header",
|
|
216
|
-
style: W(
|
|
222
|
+
style: W(B.value)
|
|
217
223
|
}, [
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
224
|
+
w("div", Se, ie(i.title), 1),
|
|
225
|
+
w("div", ke, [
|
|
226
|
+
i.closeable ? (_(), C("div", {
|
|
221
227
|
key: 0,
|
|
222
228
|
class: "i-icon-park-outline:close block cursor-pointer",
|
|
223
|
-
onClick:
|
|
224
|
-
})) :
|
|
229
|
+
onClick: d
|
|
230
|
+
})) : P("", !0)
|
|
225
231
|
])
|
|
226
|
-
], 4)) :
|
|
227
|
-
|
|
232
|
+
], 4)) : P("", !0),
|
|
233
|
+
w("div", {
|
|
228
234
|
class: "modal-body",
|
|
229
|
-
style: W(
|
|
235
|
+
style: W(m.value)
|
|
230
236
|
}, [
|
|
231
|
-
(
|
|
237
|
+
(_(), N(se(i.component), le(ae(i.componentProps)), null, 16))
|
|
232
238
|
], 4),
|
|
233
|
-
|
|
234
|
-
|
|
239
|
+
i.footer ? (_(), C("div", Ae, [
|
|
240
|
+
w("button", {
|
|
235
241
|
class: "submit-button",
|
|
236
|
-
form:
|
|
242
|
+
form: i.formId,
|
|
237
243
|
type: "submit",
|
|
238
|
-
onClick:
|
|
239
|
-
}, " 确定 ", 8,
|
|
240
|
-
|
|
244
|
+
onClick: b
|
|
245
|
+
}, " 确定 ", 8, Pe),
|
|
246
|
+
w("button", {
|
|
241
247
|
class: "cancel-button",
|
|
242
248
|
type: "button",
|
|
243
|
-
onClick:
|
|
249
|
+
onClick: E
|
|
244
250
|
}, " 取消 ")
|
|
245
|
-
])) :
|
|
251
|
+
])) : P("", !0)
|
|
246
252
|
], 4)
|
|
247
253
|
], 512)
|
|
248
254
|
]));
|
|
249
255
|
}
|
|
250
256
|
});
|
|
251
|
-
const
|
|
257
|
+
const q = (t, l) => {
|
|
252
258
|
const e = t.__vccOpts || t;
|
|
253
|
-
for (const [n, o] of
|
|
259
|
+
for (const [n, o] of l)
|
|
254
260
|
e[n] = o;
|
|
255
261
|
return e;
|
|
256
|
-
},
|
|
262
|
+
}, Be = /* @__PURE__ */ q(ze, [["__scopeId", "data-v-e6f6653f"]]), $e = {
|
|
257
263
|
key: 0,
|
|
258
264
|
class: "modal-teleport"
|
|
259
|
-
},
|
|
265
|
+
}, Le = {
|
|
260
266
|
name: "ModalProvider",
|
|
261
267
|
inheritAttrs: !0
|
|
262
|
-
},
|
|
263
|
-
|
|
268
|
+
}, We = /* @__PURE__ */ X({
|
|
269
|
+
...Le,
|
|
264
270
|
props: {
|
|
265
271
|
appendToBody: { type: Boolean, default: !1 },
|
|
266
272
|
sizes: { default: () => ({
|
|
@@ -271,91 +277,91 @@ const J = (t, i) => {
|
|
|
271
277
|
maxWidth: { default: "80%" },
|
|
272
278
|
maxHeight: { default: "80%" }
|
|
273
279
|
},
|
|
274
|
-
setup(t, { expose:
|
|
275
|
-
const e = H([]), n =
|
|
276
|
-
async function o(
|
|
277
|
-
const
|
|
278
|
-
() => Promise.resolve(
|
|
280
|
+
setup(t, { expose: l }) {
|
|
281
|
+
const e = H([]), n = O(!1);
|
|
282
|
+
async function o(s, c, a) {
|
|
283
|
+
const d = he(
|
|
284
|
+
() => Promise.resolve(s)
|
|
279
285
|
);
|
|
280
|
-
return new Promise((
|
|
286
|
+
return new Promise((p) => {
|
|
281
287
|
e.value.push({
|
|
282
288
|
id: Math.random().toString(32).slice(2),
|
|
283
|
-
component:
|
|
284
|
-
props:
|
|
285
|
-
options:
|
|
286
|
-
resolve:
|
|
287
|
-
onSubmit:
|
|
289
|
+
component: d,
|
|
290
|
+
props: c,
|
|
291
|
+
options: a,
|
|
292
|
+
resolve: p,
|
|
293
|
+
onSubmit: O(() => {
|
|
288
294
|
})
|
|
289
|
-
}),
|
|
295
|
+
}), A(e);
|
|
290
296
|
});
|
|
291
297
|
}
|
|
292
|
-
function
|
|
293
|
-
const
|
|
294
|
-
if (
|
|
298
|
+
function u(s, c) {
|
|
299
|
+
const a = e.value.findIndex((p) => p.id === s);
|
|
300
|
+
if (a < 0)
|
|
295
301
|
return;
|
|
296
|
-
const
|
|
297
|
-
|
|
302
|
+
const d = e.value[a];
|
|
303
|
+
d == null || d.resolve(c), e.value.splice(a, 1), A(e);
|
|
298
304
|
}
|
|
299
|
-
function
|
|
300
|
-
e.value.forEach((
|
|
301
|
-
|
|
302
|
-
}), e.value = [],
|
|
305
|
+
function v() {
|
|
306
|
+
e.value.forEach((s) => {
|
|
307
|
+
s.resolve();
|
|
308
|
+
}), e.value = [], A(e);
|
|
303
309
|
}
|
|
304
|
-
function
|
|
305
|
-
return e.value.find((
|
|
310
|
+
function f(s) {
|
|
311
|
+
return e.value.find((c) => c.id === s);
|
|
306
312
|
}
|
|
307
|
-
function
|
|
308
|
-
const
|
|
309
|
-
|
|
313
|
+
function g(s, c) {
|
|
314
|
+
const a = e.value.find((d) => d.id === s);
|
|
315
|
+
a && (a.onSubmit.value = c);
|
|
310
316
|
}
|
|
311
|
-
return
|
|
317
|
+
return ue(z, {
|
|
312
318
|
open: o,
|
|
313
|
-
close:
|
|
314
|
-
closeAll:
|
|
315
|
-
getElement:
|
|
316
|
-
addSubmitListener:
|
|
317
|
-
}),
|
|
319
|
+
close: u,
|
|
320
|
+
closeAll: v,
|
|
321
|
+
getElement: f,
|
|
322
|
+
addSubmitListener: g
|
|
323
|
+
}), l({
|
|
318
324
|
elements: e
|
|
319
325
|
}), Y(() => {
|
|
320
326
|
n.value = !0;
|
|
321
|
-
}), (
|
|
322
|
-
|
|
323
|
-
n.value ? (
|
|
324
|
-
(
|
|
325
|
-
disabled: !
|
|
327
|
+
}), (s, c) => (_(), C(R, null, [
|
|
328
|
+
ce(s.$slots, "default", {}, void 0, !0),
|
|
329
|
+
n.value ? (_(), C("div", $e, [
|
|
330
|
+
(_(), N(de, {
|
|
331
|
+
disabled: !s.appendToBody,
|
|
326
332
|
to: "body"
|
|
327
333
|
}, [
|
|
328
|
-
|
|
329
|
-
default:
|
|
330
|
-
(
|
|
331
|
-
id:
|
|
332
|
-
key:
|
|
333
|
-
component:
|
|
334
|
-
"component-props":
|
|
335
|
-
"max-height":
|
|
336
|
-
"max-width":
|
|
337
|
-
sizes:
|
|
338
|
-
},
|
|
339
|
-
onSubmit:
|
|
334
|
+
fe(pe, { name: "modal-fade" }, {
|
|
335
|
+
default: ve(() => [
|
|
336
|
+
(_(!0), C(R, null, me(e.value, (a) => (_(), N(Be, ye({
|
|
337
|
+
id: a.id,
|
|
338
|
+
key: a.id,
|
|
339
|
+
component: a.component,
|
|
340
|
+
"component-props": a.props,
|
|
341
|
+
"max-height": s.maxHeight,
|
|
342
|
+
"max-width": s.maxWidth,
|
|
343
|
+
sizes: s.sizes
|
|
344
|
+
}, a.options, {
|
|
345
|
+
onSubmit: a.onSubmit.value
|
|
340
346
|
}), null, 16, ["id", "component", "component-props", "max-height", "max-width", "sizes", "onSubmit"]))), 128))
|
|
341
347
|
]),
|
|
342
348
|
_: 1
|
|
343
349
|
})
|
|
344
350
|
], 8, ["disabled"]))
|
|
345
|
-
])) :
|
|
351
|
+
])) : P("", !0)
|
|
346
352
|
], 64));
|
|
347
353
|
}
|
|
348
354
|
});
|
|
349
|
-
const
|
|
350
|
-
function T(t,
|
|
355
|
+
const He = /* @__PURE__ */ q(We, [["__scopeId", "data-v-171d9bdd"]]);
|
|
356
|
+
function T(t, l) {
|
|
351
357
|
var n, o;
|
|
352
358
|
let e = t == null ? void 0 : t.parent;
|
|
353
|
-
for (; e && ((n = e == null ? void 0 : e.type) == null ? void 0 : n.name) !==
|
|
359
|
+
for (; e && ((n = e == null ? void 0 : e.type) == null ? void 0 : n.name) !== l; )
|
|
354
360
|
e = e.parent;
|
|
355
|
-
return ((o = e == null ? void 0 : e.type) == null ? void 0 : o.name) ===
|
|
361
|
+
return ((o = e == null ? void 0 : e.type) == null ? void 0 : o.name) === l ? e : null;
|
|
356
362
|
}
|
|
357
|
-
function
|
|
358
|
-
const t = V(
|
|
363
|
+
function Ne() {
|
|
364
|
+
const t = V(z), l = K();
|
|
359
365
|
return {
|
|
360
366
|
open(e, n, o) {
|
|
361
367
|
if (!t)
|
|
@@ -363,10 +369,10 @@ function He() {
|
|
|
363
369
|
return t.open(e, n || {}, o || {});
|
|
364
370
|
},
|
|
365
371
|
close(e) {
|
|
366
|
-
var
|
|
372
|
+
var u;
|
|
367
373
|
if (!t)
|
|
368
374
|
throw new Error("Not Found Modal Provider Component");
|
|
369
|
-
const n = T(
|
|
375
|
+
const n = T(l, "ModalContainer"), o = (u = n == null ? void 0 : n.props) == null ? void 0 : u.id;
|
|
370
376
|
if (!o)
|
|
371
377
|
throw new Error("Not Found Current Modal Container");
|
|
372
378
|
t.close(o, e);
|
|
@@ -377,20 +383,20 @@ function He() {
|
|
|
377
383
|
t.closeAll();
|
|
378
384
|
},
|
|
379
385
|
onSubmit(e) {
|
|
380
|
-
const n = T(
|
|
386
|
+
const n = T(l, "ModalContainer");
|
|
381
387
|
if (!(n == null ? void 0 : n.props.id))
|
|
382
388
|
throw new Error("Not Found Current Modal Container");
|
|
383
389
|
}
|
|
384
390
|
};
|
|
385
391
|
}
|
|
386
|
-
function
|
|
387
|
-
var
|
|
388
|
-
const
|
|
389
|
-
|
|
392
|
+
function Te(t) {
|
|
393
|
+
var u;
|
|
394
|
+
const l = V(z), e = K(), n = T(e, "ModalContainer"), o = (u = n == null ? void 0 : n.props) == null ? void 0 : u.id;
|
|
395
|
+
l && o && l.addSubmitListener(o, t);
|
|
390
396
|
}
|
|
391
397
|
export {
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
398
|
+
Be as ModalContainer,
|
|
399
|
+
He as ModalProvider,
|
|
400
|
+
Te as onSubmit,
|
|
401
|
+
Ne as useModal
|
|
396
402
|
};
|
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}.fixed{position:fixed}.block{display:block}.flex{display:flex}.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))}.px{padding-left:1rem;padding-right:1rem}.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-
|
|
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}.fixed{position:fixed}.block{display:block}.flex{display:flex}.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))}.px{padding-left:1rem;padding-right:1rem}.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-e6f6653f]{z-index:1000;position:fixed;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;background:rgba(0,0,0,.3)}.modal-content[data-v-e6f6653f]{background:#ffffff;border-radius:5px}.modal-header[data-v-e6f6653f]{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)}.modal-body[data-v-e6f6653f]{padding:20px 10px;box-sizing:border-box;max-height:10vw;overflow:auto}.modal-footer[data-v-e6f6653f]{box-sizing:border-box;height:50px;border-top:solid 1px var(--color-border-1, #E8E8E8);display:flex;justify-content:end;padding:10px}.modal-footer button[data-v-e6f6653f]{height:28px;line-height:28px;width:80px;outline:none;border-color:transparent;font-size:14px;border-radius:4px;padding:0;box-sizing:content-box}.modal-footer button.submit-button[data-v-e6f6653f]{color:#fff;background-color:rgb(var(--primary-6, 45, 106, 251))}.modal-footer button.submit-button[data-v-e6f6653f]:hover{background-color:rgb(var(--primary-5, 28, 76, 207))}.modal-footer button.cancel-button[data-v-e6f6653f]{color:rgb(var(--color-text-2, 78, 89, 105));background-color:rgb(var(--color-fill-1, 245, 245, 245))}.modal-footer button.cancel-button[data-v-e6f6653f]:hover{background-color:rgb(var(--color-fill-4, 201, 205, 212))}.modal-fade-enter-active[data-v-171d9bdd],.modal-fade-leave-active[data-v-171d9bdd]{transition:all .5s ease}.modal-fade-enter-from[data-v-171d9bdd],.modal-fade-leave-to[data-v-171d9bdd]{opacity:0}
|