geekin-devtoys 0.2.5 → 0.2.8
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/lib/GDialog/index.js +1 -1
- package/lib/GDialog/index.mjs +265 -101
- package/lib/GDialog/style.css +1 -1
- package/lib/GPluginVideo/index.js +14 -14
- package/lib/GPluginVideo/index.mjs +3460 -1526
- package/lib/GTable/index.js +1 -1
- package/lib/GTable/index.mjs +1 -1
- package/lib/index-BVvzBt8u.mjs +53 -0
- package/lib/index-CC5ivGYd.js +1 -0
- package/package.json +1 -1
- package/lib/GPluginVideo/web-control_1.2.5.min.js +0 -2
- package/lib/index-B86xv9Xx.js +0 -1
- package/lib/index-DSzb017c.mjs +0 -98
- package/lib/web-control.esm.min-BC66rx6c.mjs +0 -1938
- package/lib/web-control.esm.min-DLrkEUOV.js +0 -1
package/lib/GDialog/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),F=require("../index-CC5ivGYd.js"),k=require("../_plugin-vue_export-helper-BHFhmbuH.js"),h=Symbol("GDialogManager"),V={small:"380px",medium:"480px",large:"580px"},z={ICON_WIDTH:92,ICON_HEIGHT:34,GAP:8,BOTTOM_OFFSET:18,RIGHT_OFFSET:18,MAX_PER_ROW:8};function B(l){const d=new Map,{ICON_WIDTH:a,ICON_HEIGHT:s,GAP:m,BOTTOM_OFFSET:g,RIGHT_OFFSET:n,MAX_PER_ROW:t}=z;return l.forEach((r,u)=>{const i=Math.floor(u/t),o=u%t;d.set(r,{right:n+o*(a+m),bottom:g+i*(s+m)})}),d}function $(){const l=e.reactive(new Map),d=e.computed(()=>{const i=[];return l.forEach(o=>{o.isMinimized&&i.push(o.id)}),i}),a=e.computed(()=>B(d.value));function s(i){l.set(i.id,{attentionTick:0,...i})}function m(i){l.delete(i)}function g(i){const o=l.get(i);if(o){if(o.isMinimized){o.attentionTick=(o.attentionTick??0)+1;return}o.isMinimized=!0}}function n(i){const o=l.get(i);o?.isMinimized&&(o.attentionTick=(o.attentionTick??0)+1)}function t(i){const o=l.get(i);o&&(o.isMinimized=!1)}function r(i){return e.computed(()=>a.value.get(i)??{right:z.RIGHT_OFFSET,bottom:z.BOTTOM_OFFSET})}const u=e.computed(()=>d.value.map(i=>l.get(i)).filter(Boolean));return{dialogs:l,register:s,unregister:m,minimize:g,remindMinimized:n,restore:t,getPosition:r,minimizedList:u}}function E(){return e.inject(h,null)}const H=["title","aria-label"],P={class:"g-dialog-minimized-icon__icon","aria-hidden":"true"},R={class:"g-dialog-minimized-icon__title"},L=e.defineComponent({name:"GDialogMinimizedIcon",__name:"GDialogMinimizedIcon",props:{title:{},position:{},attentionTick:{default:0}},emits:["restore"],setup(l,{emit:d}){const a=l,s=d,m=e.computed(()=>a.title||"弹窗"),g=e.computed(()=>`恢复 ${m.value}`),n=e.computed(()=>({position:"fixed",right:`${a.position.right}px`,bottom:`${a.position.bottom}px`})),t=e.ref(!1);let r;e.watch(()=>a.attentionTick,(i,o)=>{o===void 0||i===o||(t.value=!1,window.clearTimeout(r),window.requestAnimationFrame(()=>{t.value=!0,r=window.setTimeout(()=>{t.value=!1},580)}))}),e.onUnmounted(()=>{window.clearTimeout(r)});function u(){s("restore")}return(i,o)=>{const v=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createElementVNode("div",{class:e.normalizeClass(["g-dialog-minimized-icon",{"is-attention":t.value}]),type:"button",style:e.normalizeStyle(n.value),title:g.value,"aria-label":g.value,onClick:u},[o[0]||(o[0]=e.createElementVNode("span",{class:"g-dialog-minimized-icon__glow","aria-hidden":"true"},null,-1)),o[1]||(o[1]=e.createElementVNode("span",{class:"g-dialog-minimized-icon__wave","aria-hidden":"true"},null,-1)),e.createElementVNode("span",P,[e.createVNode(v,null,{default:e.withCtx(()=>[e.createVNode(e.unref(F.chat_dot_round_default))]),_:1})]),e.createElementVNode("span",R,e.toDisplayString(m.value),1)],14,H)])}}}),_=k._export_sfc(L,[["__scopeId","data-v-5195816e"]]),q={class:"g-dialog-header"},U={class:"g-dialog-title"},W={class:"g-dialog-operation-container","aria-label":"弹窗操作"},Y=["onClick"],j=e.defineComponent({name:"GDialog",inheritAttrs:!1,__name:"index",props:{title:{default:""},size:{default:"medium"},modelValue:{type:Boolean}},emits:["cancel","reset","save","minimize","update:modelValue"],setup(l,{emit:d}){const a=l,s=d,m=e.computed(()=>a.modelValue);function g(c){s("update:modelValue",c)}const n=e.useId?e.useId():`g-dialog-${Date.now()}-${Math.random().toString(36).slice(2)}`,t=E(),r=e.ref(!1),u=e.ref(!0),i=e.ref(0),o=e.ref(!1),v=e.computed(()=>t?t.dialogs.get(n)?.isMinimized??!1:r.value),I=e.computed(()=>t?t.dialogs.get(n)?.attentionTick??0:i.value),C=e.computed(()=>t?!(t.dialogs.get(n)?.isMinimized??!1):u.value),N=e.computed(()=>t?t.getPosition(n).value:{right:20,bottom:20});e.onMounted(()=>{t?.register({id:n,title:a.title,isMinimized:!1})}),e.onUnmounted(()=>{t?.unregister(n)}),e.watch(()=>a.title,c=>{if(t){const f=t.dialogs.get(n);f&&(f.title=c)}}),e.watch(()=>a.modelValue,c=>{if(c===!1){if(o.value){o.value=!1;return}t?t.restore(n):(u.value=!0,r.value=!1)}c===!0&&(t?.dialogs.get(n)?.isMinimized?t.remindMinimized(n):r.value&&(i.value+=1))});const w=e.computed(()=>a.size in V?V[a.size]:a.size);function O(){s("cancel")}function b(){s("reset")}function D(){s("save")}const T=e.ref(!1),S=()=>{T.value=!T.value},G=()=>{if(o.value=!0,t)t.minimize(n);else{if(r.value){i.value+=1,s("minimize",{id:n});return}u.value=!1,r.value=!0}s("update:modelValue",!1),s("minimize",{id:n})},y=()=>{t?t.restore(n):(u.value=!0,r.value=!1),s("update:modelValue",!0)};return(c,f)=>{const M=e.resolveComponent("el-button"),x=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[C.value?(e.openBlock(),e.createBlock(x,e.mergeProps({key:0},c.$attrs,{"model-value":m.value,width:w.value,"lock-scroll":!1,"show-close":!1,fullscreen:T.value,"onUpdate:modelValue":g}),{header:e.withCtx(({close:A})=>[e.createElementVNode("div",q,[e.createElementVNode("p",U,e.toDisplayString(c.title),1),e.createElementVNode("div",W,[e.createElementVNode("button",{type:"button",class:"g-dialog-control g-dialog-control--full-screen","aria-label":"最大化",onClick:G}),e.createElementVNode("button",{type:"button",class:"g-dialog-control g-dialog-control--minimize","aria-label":"最小化",onClick:S}),e.createElementVNode("button",{type:"button",class:"g-dialog-control g-dialog-control--close","aria-label":"关闭",onClick:A},null,8,Y)])])]),footer:e.withCtx(()=>[e.createVNode(M,{onClick:O},{default:e.withCtx(()=>f[0]||(f[0]=[e.createTextVNode(" 取消 ")])),_:1,__:[0]}),e.createVNode(M,{onClick:b},{default:e.withCtx(()=>f[1]||(f[1]=[e.createTextVNode(" 重置 ")])),_:1,__:[1]}),e.createVNode(M,{type:"primary",onClick:D},{default:e.withCtx(()=>f[2]||(f[2]=[e.createTextVNode(" 保存 ")])),_:1,__:[2]}),e.renderSlot(c.$slots,"moreOperations",{},void 0,!0)]),default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{},void 0,!0)]),_:3},16,["model-value","width","fullscreen"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createBlock(_,{key:1,title:c.title,position:N.value,"attention-tick":I.value,onRestore:y},null,8,["title","position","attention-tick"])):e.createCommentVNode("",!0)])}}}),p=k._export_sfc(j,[["__scopeId","data-v-61ac1da5"]]);p.install=l=>{l.component(p.name,p),l.component(_.name,_)};exports.DIALOG_MANAGER_KEY=h;exports.GDialog=p;exports.GDialogMinimizedIcon=_;exports.createDialogManager=$;exports.default=p;exports.useDialogManager=E;
|
package/lib/GDialog/index.mjs
CHANGED
|
@@ -1,142 +1,306 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { _ as
|
|
4
|
-
const
|
|
5
|
-
small: "
|
|
6
|
-
medium: "
|
|
7
|
-
large: "
|
|
8
|
-
},
|
|
1
|
+
import { inject as K, reactive as J, computed as r, defineComponent as V, ref as v, watch as w, onUnmounted as A, resolveComponent as C, createBlock as T, openBlock as M, Teleport as $, createElementVNode as d, normalizeStyle as Q, normalizeClass as ee, createVNode as z, withCtx as p, unref as te, toDisplayString as N, useId as S, onMounted as ie, createCommentVNode as G, mergeProps as oe, renderSlot as D, createTextVNode as b } from "vue";
|
|
2
|
+
import { c as ne } from "../index-BVvzBt8u.mjs";
|
|
3
|
+
import { _ as H } from "../_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
|
+
const le = /* @__PURE__ */ Symbol("GDialogManager"), F = {
|
|
5
|
+
small: "380px",
|
|
6
|
+
medium: "480px",
|
|
7
|
+
large: "580px"
|
|
8
|
+
}, y = {
|
|
9
|
+
ICON_WIDTH: 92,
|
|
10
|
+
ICON_HEIGHT: 34,
|
|
11
|
+
GAP: 8,
|
|
12
|
+
BOTTOM_OFFSET: 18,
|
|
13
|
+
RIGHT_OFFSET: 18,
|
|
14
|
+
MAX_PER_ROW: 8
|
|
15
|
+
};
|
|
16
|
+
function ae(n) {
|
|
17
|
+
const m = /* @__PURE__ */ new Map(), { ICON_WIDTH: l, ICON_HEIGHT: a, GAP: f, BOTTOM_OFFSET: _, RIGHT_OFFSET: o, MAX_PER_ROW: e } = y;
|
|
18
|
+
return n.forEach((s, c) => {
|
|
19
|
+
const i = Math.floor(c / e), t = c % e;
|
|
20
|
+
m.set(s, {
|
|
21
|
+
right: o + t * (l + f),
|
|
22
|
+
bottom: _ + i * (a + f)
|
|
23
|
+
});
|
|
24
|
+
}), m;
|
|
25
|
+
}
|
|
26
|
+
function Me() {
|
|
27
|
+
const n = J(/* @__PURE__ */ new Map()), m = r(() => {
|
|
28
|
+
const i = [];
|
|
29
|
+
return n.forEach((t) => {
|
|
30
|
+
t.isMinimized && i.push(t.id);
|
|
31
|
+
}), i;
|
|
32
|
+
}), l = r(() => ae(m.value));
|
|
33
|
+
function a(i) {
|
|
34
|
+
n.set(i.id, { attentionTick: 0, ...i });
|
|
35
|
+
}
|
|
36
|
+
function f(i) {
|
|
37
|
+
n.delete(i);
|
|
38
|
+
}
|
|
39
|
+
function _(i) {
|
|
40
|
+
const t = n.get(i);
|
|
41
|
+
if (t) {
|
|
42
|
+
if (t.isMinimized) {
|
|
43
|
+
t.attentionTick = (t.attentionTick ?? 0) + 1;
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
t.isMinimized = !0;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function o(i) {
|
|
50
|
+
const t = n.get(i);
|
|
51
|
+
t?.isMinimized && (t.attentionTick = (t.attentionTick ?? 0) + 1);
|
|
52
|
+
}
|
|
53
|
+
function e(i) {
|
|
54
|
+
const t = n.get(i);
|
|
55
|
+
t && (t.isMinimized = !1);
|
|
56
|
+
}
|
|
57
|
+
function s(i) {
|
|
58
|
+
return r(
|
|
59
|
+
() => l.value.get(i) ?? {
|
|
60
|
+
right: y.RIGHT_OFFSET,
|
|
61
|
+
bottom: y.BOTTOM_OFFSET
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
const c = r(() => m.value.map((i) => n.get(i)).filter(Boolean));
|
|
66
|
+
return {
|
|
67
|
+
dialogs: n,
|
|
68
|
+
register: a,
|
|
69
|
+
unregister: f,
|
|
70
|
+
minimize: _,
|
|
71
|
+
remindMinimized: o,
|
|
72
|
+
restore: e,
|
|
73
|
+
getPosition: s,
|
|
74
|
+
minimizedList: c
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
function se() {
|
|
78
|
+
return K(le, null);
|
|
79
|
+
}
|
|
80
|
+
const re = ["title", "aria-label"], ue = {
|
|
81
|
+
class: "g-dialog-minimized-icon__icon",
|
|
82
|
+
"aria-hidden": "true"
|
|
83
|
+
}, ce = { class: "g-dialog-minimized-icon__title" }, de = /* @__PURE__ */ V({
|
|
84
|
+
name: "GDialogMinimizedIcon",
|
|
85
|
+
__name: "GDialogMinimizedIcon",
|
|
86
|
+
props: {
|
|
87
|
+
title: {},
|
|
88
|
+
position: {},
|
|
89
|
+
attentionTick: { default: 0 }
|
|
90
|
+
},
|
|
91
|
+
emits: ["restore"],
|
|
92
|
+
setup(n, { emit: m }) {
|
|
93
|
+
const l = n, a = m, f = r(() => l.title || "弹窗"), _ = r(() => `恢复 ${f.value}`), o = r(() => ({
|
|
94
|
+
position: "fixed",
|
|
95
|
+
right: `${l.position.right}px`,
|
|
96
|
+
bottom: `${l.position.bottom}px`
|
|
97
|
+
})), e = v(!1);
|
|
98
|
+
let s;
|
|
99
|
+
w(() => l.attentionTick, (i, t) => {
|
|
100
|
+
t === void 0 || i === t || (e.value = !1, window.clearTimeout(s), window.requestAnimationFrame(() => {
|
|
101
|
+
e.value = !0, s = window.setTimeout(() => {
|
|
102
|
+
e.value = !1;
|
|
103
|
+
}, 580);
|
|
104
|
+
}));
|
|
105
|
+
}), A(() => {
|
|
106
|
+
window.clearTimeout(s);
|
|
107
|
+
});
|
|
108
|
+
function c() {
|
|
109
|
+
a("restore");
|
|
110
|
+
}
|
|
111
|
+
return (i, t) => {
|
|
112
|
+
const I = C("el-icon");
|
|
113
|
+
return M(), T($, { to: "body" }, [
|
|
114
|
+
d("div", {
|
|
115
|
+
class: ee(["g-dialog-minimized-icon", { "is-attention": e.value }]),
|
|
116
|
+
type: "button",
|
|
117
|
+
style: Q(o.value),
|
|
118
|
+
title: _.value,
|
|
119
|
+
"aria-label": _.value,
|
|
120
|
+
onClick: c
|
|
121
|
+
}, [
|
|
122
|
+
t[0] || (t[0] = d("span", {
|
|
123
|
+
class: "g-dialog-minimized-icon__glow",
|
|
124
|
+
"aria-hidden": "true"
|
|
125
|
+
}, null, -1)),
|
|
126
|
+
t[1] || (t[1] = d("span", {
|
|
127
|
+
class: "g-dialog-minimized-icon__wave",
|
|
128
|
+
"aria-hidden": "true"
|
|
129
|
+
}, null, -1)),
|
|
130
|
+
d("span", ue, [
|
|
131
|
+
z(I, null, {
|
|
132
|
+
default: p(() => [
|
|
133
|
+
z(te(ne))
|
|
134
|
+
]),
|
|
135
|
+
_: 1
|
|
136
|
+
})
|
|
137
|
+
]),
|
|
138
|
+
d("span", ce, N(f.value), 1)
|
|
139
|
+
], 14, re)
|
|
140
|
+
]);
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
}), E = /* @__PURE__ */ H(de, [["__scopeId", "data-v-5195816e"]]), me = { class: "g-dialog-header" }, fe = { class: "g-dialog-title" }, ge = {
|
|
144
|
+
class: "g-dialog-operation-container",
|
|
145
|
+
"aria-label": "弹窗操作"
|
|
146
|
+
}, _e = ["onClick"], pe = /* @__PURE__ */ V({
|
|
9
147
|
name: "GDialog",
|
|
10
148
|
inheritAttrs: !1,
|
|
11
149
|
__name: "index",
|
|
12
150
|
props: {
|
|
13
151
|
title: { default: "" },
|
|
14
|
-
size: { default: "" }
|
|
152
|
+
size: { default: "medium" },
|
|
153
|
+
modelValue: { type: Boolean }
|
|
15
154
|
},
|
|
16
|
-
emits: ["cancel", "reset", "save", "minimize"],
|
|
17
|
-
setup(
|
|
18
|
-
const l =
|
|
19
|
-
function
|
|
20
|
-
|
|
155
|
+
emits: ["cancel", "reset", "save", "minimize", "update:modelValue"],
|
|
156
|
+
setup(n, { emit: m }) {
|
|
157
|
+
const l = n, a = m, f = r(() => l.modelValue);
|
|
158
|
+
function _(u) {
|
|
159
|
+
a("update:modelValue", u);
|
|
21
160
|
}
|
|
22
|
-
|
|
23
|
-
|
|
161
|
+
const o = S ? S() : `g-dialog-${Date.now()}-${Math.random().toString(36).slice(2)}`, e = se(), s = v(!1), c = v(!0), i = v(0), t = v(!1), I = r(() => e ? e.dialogs.get(o)?.isMinimized ?? !1 : s.value), P = r(() => e ? e.dialogs.get(o)?.attentionTick ?? 0 : i.value), R = r(() => e ? !(e.dialogs.get(o)?.isMinimized ?? !1) : c.value), x = r(() => e ? e.getPosition(o).value : { right: 20, bottom: 20 });
|
|
162
|
+
ie(() => {
|
|
163
|
+
e?.register({
|
|
164
|
+
id: o,
|
|
165
|
+
title: l.title,
|
|
166
|
+
isMinimized: !1
|
|
167
|
+
});
|
|
168
|
+
}), A(() => {
|
|
169
|
+
e?.unregister(o);
|
|
170
|
+
}), w(
|
|
171
|
+
() => l.title,
|
|
172
|
+
(u) => {
|
|
173
|
+
if (e) {
|
|
174
|
+
const g = e.dialogs.get(o);
|
|
175
|
+
g && (g.title = u);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
), w(
|
|
179
|
+
() => l.modelValue,
|
|
180
|
+
(u) => {
|
|
181
|
+
if (u === !1) {
|
|
182
|
+
if (t.value) {
|
|
183
|
+
t.value = !1;
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
e ? e.restore(o) : (c.value = !0, s.value = !1);
|
|
187
|
+
}
|
|
188
|
+
u === !0 && (e?.dialogs.get(o)?.isMinimized ? e.remindMinimized(o) : s.value && (i.value += 1));
|
|
189
|
+
}
|
|
190
|
+
);
|
|
191
|
+
const B = r(() => l.size in F ? F[l.size] : l.size);
|
|
192
|
+
function L() {
|
|
193
|
+
a("cancel");
|
|
24
194
|
}
|
|
25
|
-
function
|
|
26
|
-
|
|
195
|
+
function W() {
|
|
196
|
+
a("reset");
|
|
27
197
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
198
|
+
function U() {
|
|
199
|
+
a("save");
|
|
200
|
+
}
|
|
201
|
+
const k = v(!1), X = () => {
|
|
202
|
+
k.value = !k.value;
|
|
203
|
+
}, Y = () => {
|
|
204
|
+
if (t.value = !0, e)
|
|
205
|
+
e.minimize(o);
|
|
206
|
+
else {
|
|
207
|
+
if (s.value) {
|
|
208
|
+
i.value += 1, a("minimize", { id: o });
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
c.value = !1, s.value = !0;
|
|
212
|
+
}
|
|
213
|
+
a("update:modelValue", !1), a("minimize", { id: o });
|
|
214
|
+
}, Z = () => {
|
|
215
|
+
e ? e.restore(o) : (c.value = !0, s.value = !1), a("update:modelValue", !0);
|
|
216
|
+
};
|
|
217
|
+
return (u, g) => {
|
|
218
|
+
const O = C("el-button"), j = C("el-dialog");
|
|
219
|
+
return M(), T($, { to: "body" }, [
|
|
220
|
+
R.value ? (M(), T(j, oe({ key: 0 }, u.$attrs, {
|
|
221
|
+
"model-value": f.value,
|
|
222
|
+
width: B.value,
|
|
49
223
|
"lock-scroll": !1,
|
|
50
224
|
"show-close": !1,
|
|
51
|
-
fullscreen:
|
|
225
|
+
fullscreen: k.value,
|
|
226
|
+
"onUpdate:modelValue": _
|
|
52
227
|
}), {
|
|
53
|
-
header:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
class: "g-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
e(s(Z))
|
|
63
|
-
]),
|
|
64
|
-
_: 1
|
|
228
|
+
header: p(({ close: q }) => [
|
|
229
|
+
d("div", me, [
|
|
230
|
+
d("p", fe, N(u.title), 1),
|
|
231
|
+
d("div", ge, [
|
|
232
|
+
d("button", {
|
|
233
|
+
type: "button",
|
|
234
|
+
class: "g-dialog-control g-dialog-control--full-screen",
|
|
235
|
+
"aria-label": "最大化",
|
|
236
|
+
onClick: Y
|
|
65
237
|
}),
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
class: "g-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
e(s(j))
|
|
72
|
-
]),
|
|
73
|
-
_: 1
|
|
238
|
+
d("button", {
|
|
239
|
+
type: "button",
|
|
240
|
+
class: "g-dialog-control g-dialog-control--minimize",
|
|
241
|
+
"aria-label": "最小化",
|
|
242
|
+
onClick: X
|
|
74
243
|
}),
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
class: "g-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
]),
|
|
82
|
-
_: 2
|
|
83
|
-
}, 1032, ["onClick"])
|
|
244
|
+
d("button", {
|
|
245
|
+
type: "button",
|
|
246
|
+
class: "g-dialog-control g-dialog-control--close",
|
|
247
|
+
"aria-label": "关闭",
|
|
248
|
+
onClick: q
|
|
249
|
+
}, null, 8, _e)
|
|
84
250
|
])
|
|
85
251
|
])
|
|
86
252
|
]),
|
|
87
|
-
footer:
|
|
88
|
-
|
|
89
|
-
default:
|
|
90
|
-
|
|
253
|
+
footer: p(() => [
|
|
254
|
+
z(O, { onClick: L }, {
|
|
255
|
+
default: p(() => g[0] || (g[0] = [
|
|
256
|
+
b(" 取消 ")
|
|
91
257
|
])),
|
|
92
258
|
_: 1,
|
|
93
259
|
__: [0]
|
|
94
260
|
}),
|
|
95
|
-
|
|
96
|
-
default:
|
|
97
|
-
|
|
261
|
+
z(O, { onClick: W }, {
|
|
262
|
+
default: p(() => g[1] || (g[1] = [
|
|
263
|
+
b(" 重置 ")
|
|
98
264
|
])),
|
|
99
265
|
_: 1,
|
|
100
266
|
__: [1]
|
|
101
267
|
}),
|
|
102
|
-
|
|
268
|
+
z(O, {
|
|
103
269
|
type: "primary",
|
|
104
|
-
onClick:
|
|
270
|
+
onClick: U
|
|
105
271
|
}, {
|
|
106
|
-
default:
|
|
107
|
-
|
|
272
|
+
default: p(() => g[2] || (g[2] = [
|
|
273
|
+
b(" 保存 ")
|
|
108
274
|
])),
|
|
109
275
|
_: 1,
|
|
110
276
|
__: [2]
|
|
111
277
|
}),
|
|
112
|
-
|
|
278
|
+
D(u.$slots, "moreOperations", {}, void 0, !0)
|
|
113
279
|
]),
|
|
114
|
-
default:
|
|
115
|
-
|
|
280
|
+
default: p(() => [
|
|
281
|
+
D(u.$slots, "default", {}, void 0, !0)
|
|
116
282
|
]),
|
|
117
283
|
_: 3
|
|
118
|
-
}, 16, ["width", "fullscreen"])) :
|
|
119
|
-
|
|
284
|
+
}, 16, ["model-value", "width", "fullscreen"])) : G("", !0),
|
|
285
|
+
I.value ? (M(), T(E, {
|
|
120
286
|
key: 1,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
default: t(() => [
|
|
127
|
-
e(s(H))
|
|
128
|
-
]),
|
|
129
|
-
_: 1
|
|
130
|
-
})
|
|
131
|
-
], 4)) : x("", !0)
|
|
287
|
+
title: u.title,
|
|
288
|
+
position: x.value,
|
|
289
|
+
"attention-tick": P.value,
|
|
290
|
+
onRestore: Z
|
|
291
|
+
}, null, 8, ["title", "position", "attention-tick"])) : G("", !0)
|
|
132
292
|
]);
|
|
133
293
|
};
|
|
134
294
|
}
|
|
135
|
-
}),
|
|
136
|
-
|
|
137
|
-
|
|
295
|
+
}), h = /* @__PURE__ */ H(pe, [["__scopeId", "data-v-61ac1da5"]]);
|
|
296
|
+
h.install = (n) => {
|
|
297
|
+
n.component(h.name, h), n.component(E.name, E);
|
|
138
298
|
};
|
|
139
299
|
export {
|
|
140
|
-
|
|
141
|
-
|
|
300
|
+
le as DIALOG_MANAGER_KEY,
|
|
301
|
+
h as GDialog,
|
|
302
|
+
E as GDialogMinimizedIcon,
|
|
303
|
+
Me as createDialogManager,
|
|
304
|
+
h as default,
|
|
305
|
+
se as useDialogManager
|
|
142
306
|
};
|
package/lib/GDialog/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
.g-dialog-minimized-icon[data-v-5195816e]{width:78px;height:34px;padding:0 6px;border-radius:10px 18px;background:linear-gradient(90deg,rgba(106,210,255,.18) 1px,transparent 1px) 0 0/8px 8px,linear-gradient(180deg,rgba(255,255,255,.16),transparent 42%),linear-gradient(135deg,#10294c,var(--el-color-primary) 58%,#00d1ff);color:#f4fbff;display:flex;align-items:center;justify-content:flex-start;gap:6px;cursor:pointer;z-index:999;overflow:hidden;isolation:isolate;clip-path:polygon(9px 0,100% 0,100% calc(100% - 9px),calc(100% - 9px) 100%,0 100%,0 9px);transition:right .3s ease,bottom .3s ease,transform .18s ease,box-shadow .18s ease,filter .18s ease;animation:g-dialog-minimized-enter-5195816e .28s cubic-bezier(.2,.8,.2,1) both}.g-dialog-minimized-icon[data-v-5195816e]:before{content:"";position:absolute;inset:3px;border:1px solid rgba(163,232,255,.24);clip-path:inherit;pointer-events:none}.g-dialog-minimized-icon[data-v-5195816e]:after{content:"";position:absolute;top:-32%;left:-38%;width:32px;height:62px;background:linear-gradient(90deg,transparent,rgba(180,244,255,.64),transparent);transform:rotate(18deg) translate(-16px);opacity:0;pointer-events:none}.g-dialog-minimized-icon[data-v-5195816e]:hover{transform:translateY(-2px);filter:saturate(1.2) brightness(1.08)}.g-dialog-minimized-icon[data-v-5195816e]:hover:after{opacity:1;animation:g-dialog-minimized-shine-5195816e .62s ease}.g-dialog-minimized-icon:hover .g-dialog-minimized-icon__wave[data-v-5195816e]{opacity:1;animation:g-dialog-minimized-wave-5195816e 1.45s ease-in-out infinite}.g-dialog-minimized-icon:hover .g-dialog-minimized-icon__icon[data-v-5195816e]{transform:scale(1.08)}.g-dialog-minimized-icon[data-v-5195816e]:active{transform:translateY(0) scale(.98);box-shadow:0 0 0 1px #ffffff14 inset,0 5px 14px #0092ff3d,0 2px 6px #0003}.g-dialog-minimized-icon[data-v-5195816e]:focus-visible{outline:2px solid rgba(0,209,255,.72);outline-offset:3px}.g-dialog-minimized-icon.is-attention[data-v-5195816e]{animation:g-dialog-minimized-attention-5195816e .58s ease both;filter:saturate(1.22) brightness(1.08)}.g-dialog-minimized-icon.is-attention[data-v-5195816e]:after{opacity:1;animation:g-dialog-minimized-shine-5195816e .58s ease}.g-dialog-minimized-icon.is-attention .g-dialog-minimized-icon__wave[data-v-5195816e]{opacity:1;animation:g-dialog-minimized-wave-5195816e .58s ease-in-out}.g-dialog-minimized-icon.is-attention .g-dialog-minimized-icon__icon[data-v-5195816e]{animation:g-dialog-minimized-icon-pop-5195816e .58s ease both}.g-dialog-minimized-icon__glow[data-v-5195816e]{position:absolute;inset:auto 8px -14px auto;width:38px;height:28px;border-radius:50%;background:#00d1ff7a;filter:blur(13px);pointer-events:none;z-index:-1}.g-dialog-minimized-icon__wave[data-v-5195816e]{position:absolute;inset:-18px -24px;background:radial-gradient(ellipse at 22% 62%,rgba(173,243,255,.62) 0 9%,transparent 26%),radial-gradient(ellipse at 52% 78%,rgba(0,209,255,.58) 0 12%,transparent 30%),radial-gradient(ellipse at 82% 58%,rgba(67,170,255,.5) 0 10%,transparent 28%),linear-gradient(90deg,#147bff14,#00d1ff5c,#147bff14);background-size:72px 46px,86px 42px,70px 48px,100% 100%;background-position:-10px 16px,18px 20px,58px 14px,0 0;filter:blur(1px) saturate(1.25);opacity:0;pointer-events:none;transform:translate(-18px) translateY(6px) rotate(-2deg);transition:opacity .18s ease;z-index:-1}.g-dialog-minimized-icon__icon[data-v-5195816e]{width:20px;height:20px;border:1px solid rgba(203,246,255,.32);border-radius:7px;background:linear-gradient(135deg,rgba(255,255,255,.2),transparent),#00132b2e;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:inset 0 0 10px #00d1ff3d;transition:transform .18s ease}.g-dialog-minimized-icon__icon .el-icon[data-v-5195816e]{font-size:13px}.g-dialog-minimized-icon__title[data-v-5195816e]{min-width:0;max-width:50px;font-size:10px;font-weight:600;line-height:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@keyframes g-dialog-minimized-enter-5195816e{0%{transform:translateY(8px) scale(.92);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}@keyframes g-dialog-minimized-shine-5195816e{0%{transform:rotate(18deg) translate(-16px)}to{transform:rotate(18deg) translate(116px)}}@keyframes g-dialog-minimized-wave-5195816e{0%{background-position:-18px 18px,8px 22px,54px 14px,0 0;transform:translate(-14px) translateY(7px) rotate(-3deg) scaleY(.82)}45%{background-position:18px 8px,42px 18px,88px 10px,0 0;transform:translate(0) translateY(0) rotate(1deg) scaleY(1.05)}to{background-position:58px 17px,82px 22px,126px 15px,0 0;transform:translate(14px) translateY(5px) rotate(3deg) scaleY(.9)}}@keyframes g-dialog-minimized-attention-5195816e{0%,to{transform:translateY(0) scale(1)}18%{transform:translateY(-5px) scale(1.04)}36%{transform:translateY(0) scale(.98)}54%{transform:translateY(-3px) scale(1.02)}72%{transform:translateY(0) scale(1)}}@keyframes g-dialog-minimized-icon-pop-5195816e{0%,to{transform:scale(1)}30%{transform:scale(1.18) rotate(-8deg)}60%{transform:scale(1.08) rotate(6deg)}}@media(prefers-reduced-motion:reduce){.g-dialog-minimized-icon[data-v-5195816e]{animation:none;transition:right .3s ease,bottom .3s ease}.g-dialog-minimized-icon[data-v-5195816e]:after{display:none}.g-dialog-minimized-icon[data-v-5195816e]:hover,.g-dialog-minimized-icon[data-v-5195816e]:active,.g-dialog-minimized-icon.is-attention[data-v-5195816e]{transform:none;filter:none}.g-dialog-minimized-icon__wave[data-v-5195816e]{animation:none!important;opacity:0}.g-dialog-minimized-icon__icon[data-v-5195816e]{animation:none!important;transition:none}}.g-dialog-header[data-v-61ac1da5]{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;gap:16px}.g-dialog-header .g-dialog-title[data-v-61ac1da5]{position:relative;max-width:calc(100% - 88px);margin:-8px 0 0;overflow:hidden;color:#1f2937;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:.02em;text-overflow:ellipsis;white-space:nowrap}.g-dialog-header .g-dialog-operation-container[data-v-61ac1da5]{display:flex;flex-direction:row;align-items:center;gap:8px;padding:0;margin-top:-8px}.g-dialog-control[data-v-61ac1da5]{width:14px;height:14px;padding:0;border:0;border-radius:50%;cursor:pointer;flex-shrink:0;box-shadow:inset 0 1px 1px #ffffffa6,0 0 0 1px #00000014;transition:transform .16s ease,filter .16s ease}.g-dialog-control[data-v-61ac1da5]:hover{filter:brightness(1.04);transform:scale(1.06)}.g-dialog-control[data-v-61ac1da5]:active{transform:scale(.94)}.g-dialog-control[data-v-61ac1da5]:focus-visible{outline:2px solid rgba(68,68,68,.32);outline-offset:3px}.g-dialog-control--close[data-v-61ac1da5]{background:#ff5f57}.g-dialog-control--minimize[data-v-61ac1da5]{background:#ffbd2e}.g-dialog-control--full-screen[data-v-61ac1da5]{background:#28c840}@media(prefers-reduced-motion:reduce){.g-dialog-control[data-v-61ac1da5]{transition:none}}
|