geekin-devtoys 0.2.9 → 0.2.11
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/GBubble/index.js +2 -2
- package/lib/GBubble/index.mjs +143 -166
- package/lib/GBubble/style.css +1 -1
- package/lib/GBubble.d.ts +1 -0
- package/lib/GCount/index.js +1 -1
- package/lib/GCount/index.mjs +65 -52
- package/lib/GCount.d.ts +1 -0
- package/lib/GDialog/index.js +1 -1
- package/lib/GDialog/index.mjs +109 -99
- package/lib/GDialog/style.css +1 -1
- package/lib/GDialog.d.ts +1 -0
- package/lib/GPluginVideo/index.js +1 -14
- package/lib/GPluginVideo/index.mjs +1431 -3470
- package/lib/GPluginVideo.d.ts +1 -0
- package/lib/GProgress/index.js +1 -1
- package/lib/GProgress/index.mjs +21 -54
- package/lib/GProgress/style.css +1 -1
- package/lib/GProgress.d.ts +1 -0
- package/lib/GScreen/index.js +1 -1
- package/lib/GScreen/index.mjs +36 -173
- package/lib/GScreen.d.ts +1 -0
- package/lib/GTable/index.js +1 -1
- package/lib/GTable/index.mjs +110 -1430
- package/lib/GTable/style.css +1 -1
- package/lib/GTable.d.ts +1 -0
- package/lib/GVideo/index.js +2 -7
- package/lib/GVideo/index.mjs +125 -6899
- package/lib/GVideo/style.css +1 -1
- package/lib/GVideo.d.ts +1 -0
- package/lib/components/GBubble/index.d.ts +61 -0
- package/lib/components/GCount/index.d.ts +39 -0
- package/lib/components/GDialog/GDialogMinimizedIcon.d.ts +17 -0
- package/lib/components/GDialog/const.d.ts +25 -0
- package/lib/components/GDialog/index.d.ts +53 -0
- package/lib/components/GDialog/useDialogManager.d.ts +58 -0
- package/lib/components/GPluginVideo/index.d.ts +3 -0
- package/lib/components/GProgress/index.d.ts +49 -0
- package/lib/components/GScreen/index.d.ts +55 -0
- package/lib/components/GTable/index.d.ts +84 -0
- package/lib/components/GVideo/index.d.ts +3 -0
- package/lib/index/index.js +1 -1
- package/lib/index/index.mjs +24 -27
- package/lib/index-B1MYKy3L.js +1 -0
- package/lib/index-Dxw2pU4z.mjs +106 -0
- package/lib/index.d.ts +13 -0
- package/package.json +27 -12
- package/lib/GPercent/index.js +0 -1
- package/lib/GPercent/index.mjs +0 -127
- package/lib/GPercent/style.css +0 -1
- package/lib/index-BVvzBt8u.mjs +0 -53
- package/lib/index-CC5ivGYd.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"),_=require("../index-B1MYKy3L.js"),k=require("../_plugin-vue_export-helper-BHFhmbuH.js"),E=Symbol("GDialogManager"),h={small:"380px",medium:"480px",large:"580px"},V={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}=V;return l.forEach((r,u)=>{const o=Math.floor(u/t),i=u%t;d.set(r,{right:n+i*(a+m),bottom:g+o*(s+m)})}),d}function $(){const l=e.reactive(new Map),d=e.computed(()=>{const o=[];return l.forEach(i=>{i.isMinimized&&o.push(i.id)}),o}),a=e.computed(()=>B(d.value));function s(o){l.set(o.id,{attentionTick:0,...o})}function m(o){l.delete(o)}function g(o){const i=l.get(o);if(i){if(i.isMinimized){i.attentionTick=(i.attentionTick??0)+1;return}i.isMinimized=!0}}function n(o){const i=l.get(o);i?.isMinimized&&(i.attentionTick=(i.attentionTick??0)+1)}function t(o){const i=l.get(o);i&&(i.isMinimized=!1)}function r(o){return e.computed(()=>a.value.get(o)??{right:V.RIGHT_OFFSET,bottom:V.BOTTOM_OFFSET})}const u=e.computed(()=>d.value.map(o=>l.get(o)).filter(Boolean));return{dialogs:l,register:s,unregister:m,minimize:g,remindMinimized:n,restore:t,getPosition:r,minimizedList:u}}function I(){return e.inject(E,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,(o,i)=>{i===void 0||o===i||(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(o,i)=>{const z=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},[i[0]||(i[0]=e.createElementVNode("span",{class:"g-dialog-minimized-icon__glow","aria-hidden":"true"},null,-1)),i[1]||(i[1]=e.createElementVNode("span",{class:"g-dialog-minimized-icon__wave","aria-hidden":"true"},null,-1)),e.createElementVNode("span",P,[e.createVNode(z,null,{default:e.withCtx(()=>[e.createVNode(e.unref(_.chat_dot_round_default))]),_:1})]),e.createElementVNode("span",R,e.toDisplayString(m.value),1)],14,H)])}}}),v=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=I(),r=e.ref(!1),u=e.ref(!0),o=e.ref(0),i=e.ref(!1),z=e.computed(()=>t?t.dialogs.get(n)?.isMinimized??!1:r.value),C=e.computed(()=>t?t.dialogs.get(n)?.attentionTick??0:o.value),N=e.computed(()=>t?!(t.dialogs.get(n)?.isMinimized??!1):u.value),w=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(i.value){i.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&&(o.value+=1))});const O=e.computed(()=>a.size in h?h[a.size]:a.size);function b(){s("cancel")}function D(){s("reset")}function S(){s("save")}const T=e.ref(!1),G=()=>{T.value=!T.value},y=()=>{if(i.value=!0,t)t.minimize(n);else{if(r.value){o.value+=1,s("minimize",{id:n});return}u.value=!1,r.value=!0}s("update:modelValue",!1),s("minimize",{id:n})},x=()=>{t?t.restore(n):(u.value=!0,r.value=!1),s("update:modelValue",!0)};return(c,f)=>{const M=e.resolveComponent("el-button"),A=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[N.value?(e.openBlock(),e.createBlock(A,e.mergeProps({key:0},c.$attrs,{"model-value":m.value,width:O.value,"lock-scroll":!1,"show-close":!1,fullscreen:T.value,"onUpdate:modelValue":g}),{header:e.withCtx(({close:F})=>[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:y}),e.createElementVNode("button",{type:"button",class:"g-dialog-control g-dialog-control--minimize","aria-label":"最小化",onClick:G}),e.createElementVNode("button",{type:"button",class:"g-dialog-control g-dialog-control--close","aria-label":"关闭",onClick:F},null,8,Y)])])]),footer:e.withCtx(()=>[e.createVNode(M,{onClick:b,size:"small",icon:e.unref(_.remove_default)},{default:e.withCtx(()=>f[0]||(f[0]=[e.createTextVNode(" 取消 ")])),_:1,__:[0]},8,["icon"]),e.createVNode(M,{onClick:D,size:"small",icon:e.unref(_.refresh_default)},{default:e.withCtx(()=>f[1]||(f[1]=[e.createTextVNode(" 重置 ")])),_:1,__:[1]},8,["icon"]),e.createVNode(M,{type:"primary",onClick:S,size:"small",icon:e.unref(_.circle_check_default)},{default:e.withCtx(()=>f[2]||(f[2]=[e.createTextVNode(" 保存 ")])),_:1,__:[2]},8,["icon"]),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),z.value?(e.openBlock(),e.createBlock(v,{key:1,title:c.title,position:w.value,"attention-tick":C.value,onRestore:x},null,8,["title","position","attention-tick"])):e.createCommentVNode("",!0)])}}}),p=k._export_sfc(j,[["__scopeId","data-v-1e2f8946"]]);p.install=l=>{l.component(p.name,p),l.component(v.name,v)};exports.DIALOG_MANAGER_KEY=E;exports.GDialog=p;exports.GDialogMinimizedIcon=v;exports.createDialogManager=$;exports.default=p;exports.useDialogManager=I;
|
package/lib/GDialog/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { inject as
|
|
2
|
-
import { c as ne } from "../index-
|
|
3
|
-
import { _ as
|
|
4
|
-
const
|
|
1
|
+
import { inject as J, reactive as Q, computed as r, defineComponent as A, ref as v, watch as C, onUnmounted as $, resolveComponent as y, createBlock as T, openBlock as M, Teleport as N, createElementVNode as d, normalizeStyle as ee, normalizeClass as te, createVNode as z, withCtx as p, unref as I, toDisplayString as H, useId as G, onMounted as ie, createCommentVNode as D, mergeProps as oe, renderSlot as F, createTextVNode as h } from "vue";
|
|
2
|
+
import { c as ne, r as le, a as ae, b as se } from "../index-Dxw2pU4z.mjs";
|
|
3
|
+
import { _ as P } from "../_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
|
+
const re = /* @__PURE__ */ Symbol("GDialogManager"), V = {
|
|
5
5
|
small: "380px",
|
|
6
6
|
medium: "480px",
|
|
7
7
|
large: "580px"
|
|
8
|
-
},
|
|
8
|
+
}, E = {
|
|
9
9
|
ICON_WIDTH: 92,
|
|
10
10
|
ICON_HEIGHT: 34,
|
|
11
11
|
GAP: 8,
|
|
@@ -13,23 +13,23 @@ const le = /* @__PURE__ */ Symbol("GDialogManager"), F = {
|
|
|
13
13
|
RIGHT_OFFSET: 18,
|
|
14
14
|
MAX_PER_ROW: 8
|
|
15
15
|
};
|
|
16
|
-
function
|
|
17
|
-
const m = /* @__PURE__ */ new Map(), { ICON_WIDTH: l, ICON_HEIGHT: a, GAP: f, BOTTOM_OFFSET: _, RIGHT_OFFSET: o, MAX_PER_ROW: e } =
|
|
18
|
-
return n.forEach((s,
|
|
19
|
-
const i = Math.floor(
|
|
16
|
+
function ce(n) {
|
|
17
|
+
const m = /* @__PURE__ */ new Map(), { ICON_WIDTH: l, ICON_HEIGHT: a, GAP: f, BOTTOM_OFFSET: _, RIGHT_OFFSET: o, MAX_PER_ROW: e } = E;
|
|
18
|
+
return n.forEach((s, u) => {
|
|
19
|
+
const i = Math.floor(u / e), t = u % e;
|
|
20
20
|
m.set(s, {
|
|
21
21
|
right: o + t * (l + f),
|
|
22
22
|
bottom: _ + i * (a + f)
|
|
23
23
|
});
|
|
24
24
|
}), m;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
const n =
|
|
26
|
+
function Oe() {
|
|
27
|
+
const n = Q(/* @__PURE__ */ new Map()), m = r(() => {
|
|
28
28
|
const i = [];
|
|
29
29
|
return n.forEach((t) => {
|
|
30
30
|
t.isMinimized && i.push(t.id);
|
|
31
31
|
}), i;
|
|
32
|
-
}), l = r(() =>
|
|
32
|
+
}), l = r(() => ce(m.value));
|
|
33
33
|
function a(i) {
|
|
34
34
|
n.set(i.id, { attentionTick: 0, ...i });
|
|
35
35
|
}
|
|
@@ -57,12 +57,12 @@ function Me() {
|
|
|
57
57
|
function s(i) {
|
|
58
58
|
return r(
|
|
59
59
|
() => l.value.get(i) ?? {
|
|
60
|
-
right:
|
|
61
|
-
bottom:
|
|
60
|
+
right: E.RIGHT_OFFSET,
|
|
61
|
+
bottom: E.BOTTOM_OFFSET
|
|
62
62
|
}
|
|
63
63
|
);
|
|
64
64
|
}
|
|
65
|
-
const
|
|
65
|
+
const u = r(() => m.value.map((i) => n.get(i)).filter(Boolean));
|
|
66
66
|
return {
|
|
67
67
|
dialogs: n,
|
|
68
68
|
register: a,
|
|
@@ -71,16 +71,16 @@ function Me() {
|
|
|
71
71
|
remindMinimized: o,
|
|
72
72
|
restore: e,
|
|
73
73
|
getPosition: s,
|
|
74
|
-
minimizedList:
|
|
74
|
+
minimizedList: u
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
return
|
|
77
|
+
function ue() {
|
|
78
|
+
return J(re, null);
|
|
79
79
|
}
|
|
80
|
-
const
|
|
80
|
+
const de = ["title", "aria-label"], me = {
|
|
81
81
|
class: "g-dialog-minimized-icon__icon",
|
|
82
82
|
"aria-hidden": "true"
|
|
83
|
-
},
|
|
83
|
+
}, fe = { class: "g-dialog-minimized-icon__title" }, ge = /* @__PURE__ */ A({
|
|
84
84
|
name: "GDialogMinimizedIcon",
|
|
85
85
|
__name: "GDialogMinimizedIcon",
|
|
86
86
|
props: {
|
|
@@ -96,28 +96,28 @@ const re = ["title", "aria-label"], ue = {
|
|
|
96
96
|
bottom: `${l.position.bottom}px`
|
|
97
97
|
})), e = v(!1);
|
|
98
98
|
let s;
|
|
99
|
-
|
|
99
|
+
C(() => l.attentionTick, (i, t) => {
|
|
100
100
|
t === void 0 || i === t || (e.value = !1, window.clearTimeout(s), window.requestAnimationFrame(() => {
|
|
101
101
|
e.value = !0, s = window.setTimeout(() => {
|
|
102
102
|
e.value = !1;
|
|
103
103
|
}, 580);
|
|
104
104
|
}));
|
|
105
|
-
}),
|
|
105
|
+
}), $(() => {
|
|
106
106
|
window.clearTimeout(s);
|
|
107
107
|
});
|
|
108
|
-
function
|
|
108
|
+
function u() {
|
|
109
109
|
a("restore");
|
|
110
110
|
}
|
|
111
111
|
return (i, t) => {
|
|
112
|
-
const
|
|
113
|
-
return M(), T(
|
|
112
|
+
const k = y("el-icon");
|
|
113
|
+
return M(), T(N, { to: "body" }, [
|
|
114
114
|
d("div", {
|
|
115
|
-
class:
|
|
115
|
+
class: te(["g-dialog-minimized-icon", { "is-attention": e.value }]),
|
|
116
116
|
type: "button",
|
|
117
|
-
style:
|
|
117
|
+
style: ee(o.value),
|
|
118
118
|
title: _.value,
|
|
119
119
|
"aria-label": _.value,
|
|
120
|
-
onClick:
|
|
120
|
+
onClick: u
|
|
121
121
|
}, [
|
|
122
122
|
t[0] || (t[0] = d("span", {
|
|
123
123
|
class: "g-dialog-minimized-icon__glow",
|
|
@@ -127,23 +127,23 @@ const re = ["title", "aria-label"], ue = {
|
|
|
127
127
|
class: "g-dialog-minimized-icon__wave",
|
|
128
128
|
"aria-hidden": "true"
|
|
129
129
|
}, null, -1)),
|
|
130
|
-
d("span",
|
|
131
|
-
z(
|
|
130
|
+
d("span", me, [
|
|
131
|
+
z(k, null, {
|
|
132
132
|
default: p(() => [
|
|
133
|
-
z(
|
|
133
|
+
z(I(ne))
|
|
134
134
|
]),
|
|
135
135
|
_: 1
|
|
136
136
|
})
|
|
137
137
|
]),
|
|
138
|
-
d("span",
|
|
139
|
-
], 14,
|
|
138
|
+
d("span", fe, H(f.value), 1)
|
|
139
|
+
], 14, de)
|
|
140
140
|
]);
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
|
-
}),
|
|
143
|
+
}), S = /* @__PURE__ */ P(ge, [["__scopeId", "data-v-5195816e"]]), _e = { class: "g-dialog-header" }, pe = { class: "g-dialog-title" }, ve = {
|
|
144
144
|
class: "g-dialog-operation-container",
|
|
145
145
|
"aria-label": "弹窗操作"
|
|
146
|
-
},
|
|
146
|
+
}, ze = ["onClick"], Te = /* @__PURE__ */ A({
|
|
147
147
|
name: "GDialog",
|
|
148
148
|
inheritAttrs: !1,
|
|
149
149
|
__name: "index",
|
|
@@ -155,52 +155,52 @@ const re = ["title", "aria-label"], ue = {
|
|
|
155
155
|
emits: ["cancel", "reset", "save", "minimize", "update:modelValue"],
|
|
156
156
|
setup(n, { emit: m }) {
|
|
157
157
|
const l = n, a = m, f = r(() => l.modelValue);
|
|
158
|
-
function _(
|
|
159
|
-
a("update:modelValue",
|
|
158
|
+
function _(c) {
|
|
159
|
+
a("update:modelValue", c);
|
|
160
160
|
}
|
|
161
|
-
const o =
|
|
161
|
+
const o = G ? G() : `g-dialog-${Date.now()}-${Math.random().toString(36).slice(2)}`, e = ue(), s = v(!1), u = v(!0), i = v(0), t = v(!1), k = r(() => e ? e.dialogs.get(o)?.isMinimized ?? !1 : s.value), R = r(() => e ? e.dialogs.get(o)?.attentionTick ?? 0 : i.value), x = r(() => e ? !(e.dialogs.get(o)?.isMinimized ?? !1) : u.value), B = r(() => e ? e.getPosition(o).value : { right: 20, bottom: 20 });
|
|
162
162
|
ie(() => {
|
|
163
163
|
e?.register({
|
|
164
164
|
id: o,
|
|
165
165
|
title: l.title,
|
|
166
166
|
isMinimized: !1
|
|
167
167
|
});
|
|
168
|
-
}),
|
|
168
|
+
}), $(() => {
|
|
169
169
|
e?.unregister(o);
|
|
170
|
-
}),
|
|
170
|
+
}), C(
|
|
171
171
|
() => l.title,
|
|
172
|
-
(
|
|
172
|
+
(c) => {
|
|
173
173
|
if (e) {
|
|
174
174
|
const g = e.dialogs.get(o);
|
|
175
|
-
g && (g.title =
|
|
175
|
+
g && (g.title = c);
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
-
),
|
|
178
|
+
), C(
|
|
179
179
|
() => l.modelValue,
|
|
180
|
-
(
|
|
181
|
-
if (
|
|
180
|
+
(c) => {
|
|
181
|
+
if (c === !1) {
|
|
182
182
|
if (t.value) {
|
|
183
183
|
t.value = !1;
|
|
184
184
|
return;
|
|
185
185
|
}
|
|
186
|
-
e ? e.restore(o) : (
|
|
186
|
+
e ? e.restore(o) : (u.value = !0, s.value = !1);
|
|
187
187
|
}
|
|
188
|
-
|
|
188
|
+
c === !0 && (e?.dialogs.get(o)?.isMinimized ? e.remindMinimized(o) : s.value && (i.value += 1));
|
|
189
189
|
}
|
|
190
190
|
);
|
|
191
|
-
const
|
|
192
|
-
function
|
|
191
|
+
const L = r(() => l.size in V ? V[l.size] : l.size);
|
|
192
|
+
function W() {
|
|
193
193
|
a("cancel");
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function U() {
|
|
196
196
|
a("reset");
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function X() {
|
|
199
199
|
a("save");
|
|
200
200
|
}
|
|
201
|
-
const
|
|
202
|
-
|
|
203
|
-
},
|
|
201
|
+
const O = v(!1), Y = () => {
|
|
202
|
+
O.value = !O.value;
|
|
203
|
+
}, Z = () => {
|
|
204
204
|
if (t.value = !0, e)
|
|
205
205
|
e.minimize(o);
|
|
206
206
|
else {
|
|
@@ -208,99 +208,109 @@ const re = ["title", "aria-label"], ue = {
|
|
|
208
208
|
i.value += 1, a("minimize", { id: o });
|
|
209
209
|
return;
|
|
210
210
|
}
|
|
211
|
-
|
|
211
|
+
u.value = !1, s.value = !0;
|
|
212
212
|
}
|
|
213
213
|
a("update:modelValue", !1), a("minimize", { id: o });
|
|
214
|
-
},
|
|
215
|
-
e ? e.restore(o) : (
|
|
214
|
+
}, j = () => {
|
|
215
|
+
e ? e.restore(o) : (u.value = !0, s.value = !1), a("update:modelValue", !0);
|
|
216
216
|
};
|
|
217
|
-
return (
|
|
218
|
-
const
|
|
219
|
-
return M(), T(
|
|
220
|
-
|
|
217
|
+
return (c, g) => {
|
|
218
|
+
const b = y("el-button"), q = y("el-dialog");
|
|
219
|
+
return M(), T(N, { to: "body" }, [
|
|
220
|
+
x.value ? (M(), T(q, oe({ key: 0 }, c.$attrs, {
|
|
221
221
|
"model-value": f.value,
|
|
222
|
-
width:
|
|
222
|
+
width: L.value,
|
|
223
223
|
"lock-scroll": !1,
|
|
224
224
|
"show-close": !1,
|
|
225
|
-
fullscreen:
|
|
225
|
+
fullscreen: O.value,
|
|
226
226
|
"onUpdate:modelValue": _
|
|
227
227
|
}), {
|
|
228
|
-
header: p(({ close:
|
|
229
|
-
d("div",
|
|
230
|
-
d("p",
|
|
231
|
-
d("div",
|
|
228
|
+
header: p(({ close: K }) => [
|
|
229
|
+
d("div", _e, [
|
|
230
|
+
d("p", pe, H(c.title), 1),
|
|
231
|
+
d("div", ve, [
|
|
232
232
|
d("button", {
|
|
233
233
|
type: "button",
|
|
234
234
|
class: "g-dialog-control g-dialog-control--full-screen",
|
|
235
235
|
"aria-label": "最大化",
|
|
236
|
-
onClick:
|
|
236
|
+
onClick: Z
|
|
237
237
|
}),
|
|
238
238
|
d("button", {
|
|
239
239
|
type: "button",
|
|
240
240
|
class: "g-dialog-control g-dialog-control--minimize",
|
|
241
241
|
"aria-label": "最小化",
|
|
242
|
-
onClick:
|
|
242
|
+
onClick: Y
|
|
243
243
|
}),
|
|
244
244
|
d("button", {
|
|
245
245
|
type: "button",
|
|
246
246
|
class: "g-dialog-control g-dialog-control--close",
|
|
247
247
|
"aria-label": "关闭",
|
|
248
|
-
onClick:
|
|
249
|
-
}, null, 8,
|
|
248
|
+
onClick: K
|
|
249
|
+
}, null, 8, ze)
|
|
250
250
|
])
|
|
251
251
|
])
|
|
252
252
|
]),
|
|
253
253
|
footer: p(() => [
|
|
254
|
-
z(
|
|
254
|
+
z(b, {
|
|
255
|
+
onClick: W,
|
|
256
|
+
size: "small",
|
|
257
|
+
icon: I(le)
|
|
258
|
+
}, {
|
|
255
259
|
default: p(() => g[0] || (g[0] = [
|
|
256
|
-
|
|
260
|
+
h(" 取消 ")
|
|
257
261
|
])),
|
|
258
262
|
_: 1,
|
|
259
263
|
__: [0]
|
|
260
|
-
}),
|
|
261
|
-
z(
|
|
264
|
+
}, 8, ["icon"]),
|
|
265
|
+
z(b, {
|
|
266
|
+
onClick: U,
|
|
267
|
+
size: "small",
|
|
268
|
+
icon: I(ae)
|
|
269
|
+
}, {
|
|
262
270
|
default: p(() => g[1] || (g[1] = [
|
|
263
|
-
|
|
271
|
+
h(" 重置 ")
|
|
264
272
|
])),
|
|
265
273
|
_: 1,
|
|
266
274
|
__: [1]
|
|
267
|
-
}),
|
|
268
|
-
z(
|
|
275
|
+
}, 8, ["icon"]),
|
|
276
|
+
z(b, {
|
|
269
277
|
type: "primary",
|
|
270
|
-
onClick:
|
|
278
|
+
onClick: X,
|
|
279
|
+
size: "small",
|
|
280
|
+
icon: I(se)
|
|
271
281
|
}, {
|
|
272
282
|
default: p(() => g[2] || (g[2] = [
|
|
273
|
-
|
|
283
|
+
h(" 保存 ")
|
|
274
284
|
])),
|
|
275
285
|
_: 1,
|
|
276
286
|
__: [2]
|
|
277
|
-
}),
|
|
278
|
-
|
|
287
|
+
}, 8, ["icon"]),
|
|
288
|
+
F(c.$slots, "moreOperations", {}, void 0, !0)
|
|
279
289
|
]),
|
|
280
290
|
default: p(() => [
|
|
281
|
-
|
|
291
|
+
F(c.$slots, "default", {}, void 0, !0)
|
|
282
292
|
]),
|
|
283
293
|
_: 3
|
|
284
|
-
}, 16, ["model-value", "width", "fullscreen"])) :
|
|
285
|
-
|
|
294
|
+
}, 16, ["model-value", "width", "fullscreen"])) : D("", !0),
|
|
295
|
+
k.value ? (M(), T(S, {
|
|
286
296
|
key: 1,
|
|
287
|
-
title:
|
|
288
|
-
position:
|
|
289
|
-
"attention-tick":
|
|
290
|
-
onRestore:
|
|
291
|
-
}, null, 8, ["title", "position", "attention-tick"])) :
|
|
297
|
+
title: c.title,
|
|
298
|
+
position: B.value,
|
|
299
|
+
"attention-tick": R.value,
|
|
300
|
+
onRestore: j
|
|
301
|
+
}, null, 8, ["title", "position", "attention-tick"])) : D("", !0)
|
|
292
302
|
]);
|
|
293
303
|
};
|
|
294
304
|
}
|
|
295
|
-
}),
|
|
296
|
-
|
|
297
|
-
n.component(
|
|
305
|
+
}), w = /* @__PURE__ */ P(Te, [["__scopeId", "data-v-1e2f8946"]]);
|
|
306
|
+
w.install = (n) => {
|
|
307
|
+
n.component(w.name, w), n.component(S.name, S);
|
|
298
308
|
};
|
|
299
309
|
export {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
310
|
+
re as DIALOG_MANAGER_KEY,
|
|
311
|
+
w as GDialog,
|
|
312
|
+
S as GDialogMinimizedIcon,
|
|
313
|
+
Oe as createDialogManager,
|
|
314
|
+
w as default,
|
|
315
|
+
ue as useDialogManager
|
|
306
316
|
};
|
package/lib/GDialog/style.css
CHANGED
|
@@ -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-
|
|
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-1e2f8946]{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;gap:16px}.g-dialog-header .g-dialog-title[data-v-1e2f8946]{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-1e2f8946]{display:flex;flex-direction:row;align-items:center;gap:8px;padding:0;margin-top:-4px}.g-dialog-control[data-v-1e2f8946]{width:12px;height:12px;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-1e2f8946]:hover{filter:brightness(1.04);transform:scale(1.06)}.g-dialog-control[data-v-1e2f8946]:active{transform:scale(.94)}.g-dialog-control[data-v-1e2f8946]:focus-visible{outline:2px solid rgba(68,68,68,.32);outline-offset:3px}.g-dialog-control--close[data-v-1e2f8946]{background:#ff5f57}.g-dialog-control--minimize[data-v-1e2f8946]{background:#ffbd2e}.g-dialog-control--full-screen[data-v-1e2f8946]{background:#28c840}@media(prefers-reduced-motion:reduce){.g-dialog-control[data-v-1e2f8946]{transition:none}}
|
package/lib/GDialog.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|