geekin-devtoys 0.3.6 → 0.3.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/GButton/index.js +1 -0
- package/lib/GButton/index.mjs +8 -0
- package/lib/GDialog/index.js +1 -1
- package/lib/GDialog/index.mjs +351 -300
- package/lib/GDialog/style.css +1 -1
- package/lib/GInputTreeTag/index.js +1 -1
- package/lib/GInputTreeTag/index.mjs +1 -1
- package/lib/GInputTreeTag/style.css +1 -1
- package/lib/GSteps/index.js +1 -0
- package/lib/GSteps/index.mjs +69 -0
- package/lib/GSteps/style.css +1 -0
- package/lib/GSteps.d.ts +1 -0
- package/lib/GTable/index.js +1 -1
- package/lib/GTable/index.mjs +106 -79
- package/lib/GVideo/index.js +2 -2
- package/lib/GVideo/index.mjs +159 -158
- package/lib/GVideo/style.css +1 -1
- package/lib/components/GButton/index.d.ts +38 -0
- package/lib/components/GDialog/const.d.ts +5 -5
- package/lib/components/{GDialogPro → GDialog}/icons.d.ts +4 -4
- package/lib/components/GDialog/index.d.ts +1 -1
- package/lib/components/GInputTreeTag/index.d.ts +25 -17
- package/lib/components/GProgress/index.d.ts +1 -1
- package/lib/components/GRing/index.d.ts +1 -1
- package/lib/components/GScreen/index.d.ts +1 -1
- package/lib/components/GSteps/index.d.ts +43 -0
- package/lib/index/index.js +1 -1
- package/lib/index/index.mjs +40 -36
- package/lib/index/style.css +1 -0
- package/lib/index-CWxEZ_zc.mjs +74 -0
- package/lib/index-Q0Ej8RIj.js +1 -0
- package/lib/index.d.ts +3 -2
- package/package.json +17 -9
- package/lib/GDialog/style2.css +0 -1
- package/lib/GDialogPro/index.js +0 -1
- package/lib/GDialogPro/index.mjs +0 -529
- package/lib/components/GDialogPro/GButton.d.ts +0 -42
- package/lib/components/GDialogPro/GDialogMinimizedIcon.d.ts +0 -17
- package/lib/components/GDialogPro/const.d.ts +0 -55
- package/lib/components/GDialogPro/index.d.ts +0 -147
- package/lib/components/GDialogPro/useDialogManager.d.ts +0 -58
- package/lib/index-B1MYKy3L.js +0 -1
- package/lib/index-Dxw2pU4z.mjs +0 -106
- /package/lib/{GDialogPro.d.ts → GButton.d.ts} +0 -0
package/lib/GDialog/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { inject as fe, reactive as
|
|
2
|
-
import {
|
|
3
|
-
import { A as be } from "../AnimatePresence-nl0c23TZ.mjs";
|
|
1
|
+
import { inject as fe, reactive as ee, computed as r, h as u, defineComponent as te, ref as _, watch as N, onUnmounted as ie, createBlock as k, openBlock as m, Teleport as oe, createVNode as w, unref as O, normalizeStyle as ge, normalizeClass as pe, withCtx as f, createElementVNode as d, toDisplayString as b, useId as Z, onMounted as ve, Transition as he, createElementBlock as F, createCommentVNode as C, withModifiers as ye, mergeProps as ze, renderSlot as P, Fragment as q, renderList as _e, createSlots as ke, createTextVNode as H, resolveDynamicComponent as Me } from "vue";
|
|
2
|
+
import { A as Te } from "../AnimatePresence-nl0c23TZ.mjs";
|
|
4
3
|
import { m as we } from "../index-Bbr5fWvI.mjs";
|
|
5
|
-
import { _ as
|
|
6
|
-
|
|
4
|
+
import { _ as ae } from "../_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
5
|
+
import { G as L } from "../index-CWxEZ_zc.mjs";
|
|
6
|
+
const Ce = /* @__PURE__ */ Symbol("GDialogManager"), J = {
|
|
7
7
|
small: "380px",
|
|
8
8
|
medium: "480px",
|
|
9
9
|
large: "580px"
|
|
10
|
-
},
|
|
10
|
+
}, x = {
|
|
11
11
|
ICON_WIDTH: 92,
|
|
12
12
|
ICON_HEIGHT: 34,
|
|
13
13
|
GAP: 8,
|
|
@@ -15,74 +15,113 @@ const Me = /* @__PURE__ */ Symbol("GDialogManager"), q = {
|
|
|
15
15
|
RIGHT_OFFSET: 18,
|
|
16
16
|
MAX_PER_ROW: 8
|
|
17
17
|
};
|
|
18
|
-
function
|
|
19
|
-
const
|
|
20
|
-
return
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
right:
|
|
24
|
-
bottom:
|
|
18
|
+
function be(l) {
|
|
19
|
+
const h = /* @__PURE__ */ new Map(), { ICON_WIDTH: n, ICON_HEIGHT: s, GAP: y, BOTTOM_OFFSET: a, RIGHT_OFFSET: t, MAX_PER_ROW: c } = x;
|
|
20
|
+
return l.forEach((g, p) => {
|
|
21
|
+
const i = Math.floor(p / c), o = p % c;
|
|
22
|
+
h.set(g, {
|
|
23
|
+
right: t + o * (n + y),
|
|
24
|
+
bottom: a + i * (s + y)
|
|
25
25
|
});
|
|
26
|
-
}),
|
|
26
|
+
}), h;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
return
|
|
32
|
-
|
|
33
|
-
}),
|
|
34
|
-
}),
|
|
35
|
-
function s(
|
|
36
|
-
|
|
28
|
+
function Ye() {
|
|
29
|
+
const l = ee(/* @__PURE__ */ new Map()), h = r(() => {
|
|
30
|
+
const i = [];
|
|
31
|
+
return l.forEach((o) => {
|
|
32
|
+
o.isMinimized && i.push(o.id);
|
|
33
|
+
}), i;
|
|
34
|
+
}), n = r(() => be(h.value));
|
|
35
|
+
function s(i) {
|
|
36
|
+
l.set(i.id, { attentionTick: 0, ...i });
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
|
|
38
|
+
function y(i) {
|
|
39
|
+
l.delete(i);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
44
|
-
if (
|
|
45
|
-
|
|
41
|
+
function a(i) {
|
|
42
|
+
const o = l.get(i);
|
|
43
|
+
if (o) {
|
|
44
|
+
if (o.isMinimized) {
|
|
45
|
+
o.attentionTick = (o.attentionTick ?? 0) + 1;
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
o.isMinimized = !0;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
const
|
|
53
|
-
|
|
51
|
+
function t(i) {
|
|
52
|
+
const o = l.get(i);
|
|
53
|
+
o?.isMinimized && (o.attentionTick = (o.attentionTick ?? 0) + 1);
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
const
|
|
57
|
-
|
|
55
|
+
function c(i) {
|
|
56
|
+
const o = l.get(i);
|
|
57
|
+
o && (o.isMinimized = !1);
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function g(i) {
|
|
60
60
|
return r(
|
|
61
|
-
() =>
|
|
62
|
-
right:
|
|
63
|
-
bottom:
|
|
61
|
+
() => n.value.get(i) ?? {
|
|
62
|
+
right: x.RIGHT_OFFSET,
|
|
63
|
+
bottom: x.BOTTOM_OFFSET
|
|
64
64
|
}
|
|
65
65
|
);
|
|
66
66
|
}
|
|
67
|
-
const
|
|
67
|
+
const p = r(() => h.value.map((i) => l.get(i)).filter(Boolean));
|
|
68
68
|
return {
|
|
69
|
-
dialogs:
|
|
69
|
+
dialogs: l,
|
|
70
70
|
register: s,
|
|
71
|
-
unregister:
|
|
72
|
-
minimize:
|
|
73
|
-
remindMinimized:
|
|
74
|
-
restore:
|
|
75
|
-
getPosition:
|
|
76
|
-
minimizedList:
|
|
71
|
+
unregister: y,
|
|
72
|
+
minimize: a,
|
|
73
|
+
remindMinimized: t,
|
|
74
|
+
restore: c,
|
|
75
|
+
getPosition: g,
|
|
76
|
+
minimizedList: p
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
function Oe() {
|
|
80
|
-
return fe(
|
|
80
|
+
return fe(Ce, null);
|
|
81
81
|
}
|
|
82
|
-
const
|
|
83
|
-
|
|
82
|
+
const R = {
|
|
83
|
+
viewBox: "0 0 1024 1024",
|
|
84
|
+
fill: "currentColor",
|
|
85
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
86
|
+
"aria-hidden": "true",
|
|
87
|
+
// 显式尺寸兜底:脱离 GButton 的 .g-button__icon 使用时(如表格、文案内联)不会塌缩或撑爆
|
|
88
|
+
width: "1em",
|
|
89
|
+
height: "1em"
|
|
90
|
+
}, Ie = () => u("svg", R, [
|
|
91
|
+
u("path", {
|
|
92
|
+
d: "M874.666667 512a362.666667 362.666667 0 1 0-362.666667 362.666667V938.666667C276.352 938.666667 85.333333 747.648 85.333333 512S276.352 85.333333 512 85.333333s426.666667 191.018667 426.666667 426.666667-191.018667 426.666667-426.666667 426.666667v-64a362.666667 362.666667 0 0 0 362.666667-362.666667z"
|
|
93
|
+
}),
|
|
94
|
+
u("path", {
|
|
95
|
+
d: "M318.72 318.72a32 32 0 0 1 45.226667 0l341.333333 341.333333a32 32 0 1 1-45.226667 45.226667l-341.333333-341.333333a32 32 0 0 1 0-45.226667z"
|
|
96
|
+
}),
|
|
97
|
+
u("path", {
|
|
98
|
+
d: "M705.28 318.72a32 32 0 0 0-45.226667 0l-341.333333 341.333333a32 32 0 1 0 45.226667 45.226667l341.333333-341.333333a32 32 0 0 0 0-45.226667z"
|
|
99
|
+
})
|
|
100
|
+
]), Se = () => u("svg", R, [
|
|
101
|
+
u("path", {
|
|
102
|
+
d: "M661.333333 309.333333a266.666667 266.666667 0 1 1 0 533.333334H170.666667a32 32 0 0 1 0-64h490.666666a202.666667 202.666667 0 1 0 0-405.333334H170.666667a32 32 0 0 1 0-64h490.666666z"
|
|
103
|
+
}),
|
|
104
|
+
u("path", {
|
|
105
|
+
d: "M98.133333 348.714667a8.533333 8.533333 0 0 1 0-14.762667l166.4-96.085333a8.533333 8.533333 0 0 1 12.8 7.381333v192.170667a8.533333 8.533333 0 0 1-12.8 7.381333L98.133333 348.714667z"
|
|
106
|
+
})
|
|
107
|
+
]), Ee = () => u("svg", R, [
|
|
108
|
+
u("path", {
|
|
109
|
+
d: "M874.666667 512a362.666667 362.666667 0 1 0-362.666667 362.666667V938.666667C276.352 938.666667 85.333333 747.648 85.333333 512S276.352 85.333333 512 85.333333s426.666667 191.018667 426.666667 426.666667-191.018667 426.666667-426.666667 426.666667v-64a362.666667 362.666667 0 0 0 362.666667-362.666667z"
|
|
110
|
+
}),
|
|
111
|
+
u("path", {
|
|
112
|
+
d: "M685.653333 361.386667a32 32 0 1 1 45.226667 45.226666l-249.472 249.514667a40.533333 40.533333 0 0 1-59.434667-2.304l-122.026666-142.336a32 32 0 0 1 48.64-41.642667l105.472 123.050667L685.653333 361.386667z"
|
|
113
|
+
})
|
|
114
|
+
]), Ae = () => u("svg", R, [
|
|
115
|
+
u("path", {
|
|
116
|
+
d: "M130.133333 746.666667v-469.333334A138.666667 138.666667 0 0 1 268.8 138.666667h362.666667a32 32 0 0 1 0 64H268.8A74.666667 74.666667 0 0 0 194.133333 277.333333v469.333334c0 41.216 33.450667 74.666667 74.666667 74.666666h362.666667a32 32 0 0 1 0 64H268.8a138.666667 138.666667 0 0 1-138.666667-138.666666z"
|
|
117
|
+
}),
|
|
118
|
+
u("path", {
|
|
119
|
+
d: "M635.562667 738.304a32.042667 32.042667 0 0 0 45.312 0l203.605333-203.690667a32 32 0 0 0 0-45.226666l-203.605333-203.690667a32.042667 32.042667 0 0 0-45.312 45.312l149.077333 148.992H477.866667a32 32 0 0 0 0 64h306.773333l-149.077333 148.992a32.042667 32.042667 0 0 0 0 45.312z"
|
|
120
|
+
})
|
|
121
|
+
]), De = {
|
|
122
|
+
class: "g-dialog-pro-minimized-icon__icon",
|
|
84
123
|
"aria-hidden": "true"
|
|
85
|
-
},
|
|
124
|
+
}, Be = { class: "g-dialog-pro-minimized-icon__title" }, Ge = /* @__PURE__ */ te({
|
|
86
125
|
name: "GDialogMinimizedIcon",
|
|
87
126
|
__name: "GDialogMinimizedIcon",
|
|
88
127
|
props: {
|
|
@@ -91,71 +130,66 @@ const Ie = {
|
|
|
91
130
|
attentionTick: { default: 0 }
|
|
92
131
|
},
|
|
93
132
|
emits: ["restore"],
|
|
94
|
-
setup(
|
|
95
|
-
const
|
|
133
|
+
setup(l, { emit: h }) {
|
|
134
|
+
const n = l, s = h, y = r(() => n.title || "弹窗"), a = r(() => `恢复 ${y.value}`), t = { opacity: 0, scale: 0.8, x: -24, y: 12 }, c = { opacity: 1, scale: 1, x: 0, y: 0 }, g = { opacity: 0, scale: 0.8, x: -24, y: 12 }, p = { duration: 0.28, ease: [0.2, 0.8, 0.2, 1] }, i = { scale: 1.04, y: -2 }, o = { scale: 0.98 }, I = r(() => ({
|
|
96
135
|
position: "fixed",
|
|
97
|
-
right: `${
|
|
98
|
-
bottom: `${
|
|
99
|
-
})),
|
|
100
|
-
let
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
136
|
+
right: `${n.position.right}px`,
|
|
137
|
+
bottom: `${n.position.bottom}px`
|
|
138
|
+
})), M = _(!1);
|
|
139
|
+
let S;
|
|
140
|
+
N(() => n.attentionTick, (B, z) => {
|
|
141
|
+
z === void 0 || B === z || (M.value = !1, window.clearTimeout(S), window.requestAnimationFrame(() => {
|
|
142
|
+
M.value = !0, S = window.setTimeout(() => {
|
|
143
|
+
M.value = !1;
|
|
105
144
|
}, 580);
|
|
106
145
|
}));
|
|
107
|
-
}),
|
|
108
|
-
window.clearTimeout(
|
|
146
|
+
}), ie(() => {
|
|
147
|
+
window.clearTimeout(S);
|
|
109
148
|
});
|
|
110
|
-
function
|
|
149
|
+
function D() {
|
|
111
150
|
s("restore");
|
|
112
151
|
}
|
|
113
|
-
return (
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
f("span", Ie, [
|
|
140
|
-
F(G, null, {
|
|
141
|
-
default: g(() => [
|
|
142
|
-
F(C(he))
|
|
143
|
-
]),
|
|
144
|
-
_: 1
|
|
145
|
-
})
|
|
146
|
-
]),
|
|
147
|
-
f("span", Se, M(v.value), 1)
|
|
152
|
+
return (B, z) => (m(), k(oe, { to: "body" }, [
|
|
153
|
+
w(O(we).div, {
|
|
154
|
+
class: pe(["g-dialog-pro-minimized-icon", { "is-attention": M.value }]),
|
|
155
|
+
type: "button",
|
|
156
|
+
style: ge(I.value),
|
|
157
|
+
title: a.value,
|
|
158
|
+
"aria-label": a.value,
|
|
159
|
+
initial: t,
|
|
160
|
+
animate: c,
|
|
161
|
+
exit: g,
|
|
162
|
+
transition: p,
|
|
163
|
+
"while-hover": i,
|
|
164
|
+
"while-press": o,
|
|
165
|
+
onClick: D
|
|
166
|
+
}, {
|
|
167
|
+
default: f(() => [
|
|
168
|
+
z[0] || (z[0] = d("span", {
|
|
169
|
+
class: "g-dialog-pro-minimized-icon__glow",
|
|
170
|
+
"aria-hidden": "true"
|
|
171
|
+
}, null, -1)),
|
|
172
|
+
z[1] || (z[1] = d("span", {
|
|
173
|
+
class: "g-dialog-pro-minimized-icon__wave",
|
|
174
|
+
"aria-hidden": "true"
|
|
175
|
+
}, null, -1)),
|
|
176
|
+
d("span", De, [
|
|
177
|
+
w(O(Ae))
|
|
148
178
|
]),
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
179
|
+
d("span", Be, b(y.value), 1)
|
|
180
|
+
]),
|
|
181
|
+
_: 1,
|
|
182
|
+
__: [0, 1]
|
|
183
|
+
}, 8, ["class", "style", "title", "aria-label"])
|
|
184
|
+
]));
|
|
154
185
|
}
|
|
155
|
-
}),
|
|
156
|
-
class: "g-dialog-operation-container",
|
|
186
|
+
}), W = /* @__PURE__ */ ae(Ge, [["__scopeId", "data-v-e7d8c859"]]), Fe = { class: "g-dialog-pro-header" }, He = { class: "g-dialog-pro-title" }, Le = {
|
|
187
|
+
class: "g-dialog-pro-operation-container",
|
|
157
188
|
"aria-label": "弹窗操作"
|
|
158
|
-
},
|
|
189
|
+
}, Re = ["aria-label", "title"], Ve = { class: "g-dialog-pro-body" }, Pe = {
|
|
190
|
+
key: 0,
|
|
191
|
+
class: "g-dialog-pro-footer"
|
|
192
|
+
}, $e = { class: "g-dialog-pro-actions" }, Q = "关闭", Ne = /* @__PURE__ */ te({
|
|
159
193
|
name: "GDialog",
|
|
160
194
|
inheritAttrs: !1,
|
|
161
195
|
__name: "index",
|
|
@@ -176,233 +210,250 @@ const Ie = {
|
|
|
176
210
|
beforeClose: {}
|
|
177
211
|
},
|
|
178
212
|
emits: ["cancel", "reset", "save", "minimize", "action", "update:modelValue"],
|
|
179
|
-
setup(
|
|
180
|
-
const l = a,
|
|
181
|
-
|
|
182
|
-
s("update:modelValue", e);
|
|
183
|
-
}
|
|
184
|
-
const n = X ? X() : `g-dialog-${Date.now()}-${Math.random().toString(36).slice(2)}`, t = Oe(), c = T(!1), u = T(!0), o = T(0), i = T(!1), b = T(!1), z = T(!1), O = r(() => t ? t.dialogs.get(n)?.isMinimized ?? !1 : c.value), B = r(() => t ? t.dialogs.get(n)?.attentionTick ?? 0 : o.value), S = r(() => t ? !b.value : u.value), _ = r(() => t ? t.getPosition(n).value : { right: 20, bottom: 20 });
|
|
185
|
-
pe(() => {
|
|
213
|
+
setup(l, { emit: h }) {
|
|
214
|
+
const n = l, s = h, y = r(() => n.modelValue), a = Z ? Z() : `g-dialog-pro-${Date.now()}-${Math.random().toString(36).slice(2)}`, t = Oe(), c = _(!1), g = _(!0), p = _(0), i = _(!1), o = _(!1), I = _(!1), M = r(() => t ? t.dialogs.get(a)?.isMinimized ?? !1 : c.value), S = r(() => t ? t.dialogs.get(a)?.attentionTick ?? 0 : p.value), D = r(() => t ? !o.value : g.value), B = r(() => t ? t.getPosition(a).value : { right: 20, bottom: 20 });
|
|
215
|
+
ve(() => {
|
|
186
216
|
t?.register({
|
|
187
|
-
id:
|
|
188
|
-
title:
|
|
217
|
+
id: a,
|
|
218
|
+
title: n.title,
|
|
189
219
|
isMinimized: !1
|
|
190
|
-
});
|
|
191
|
-
}),
|
|
192
|
-
t?.unregister(
|
|
193
|
-
}),
|
|
194
|
-
() =>
|
|
220
|
+
}), document.addEventListener("keydown", j);
|
|
221
|
+
}), ie(() => {
|
|
222
|
+
t?.unregister(a), document.removeEventListener("keydown", j);
|
|
223
|
+
}), N(
|
|
224
|
+
() => n.title,
|
|
195
225
|
(e) => {
|
|
196
226
|
if (t) {
|
|
197
|
-
const
|
|
198
|
-
|
|
227
|
+
const T = t.dialogs.get(a);
|
|
228
|
+
T && (T.title = e);
|
|
199
229
|
}
|
|
200
230
|
}
|
|
201
|
-
),
|
|
202
|
-
() =>
|
|
231
|
+
), N(
|
|
232
|
+
() => n.modelValue,
|
|
203
233
|
(e) => {
|
|
204
234
|
if (e === !1) {
|
|
205
235
|
if (i.value) return;
|
|
206
|
-
t ? (t.restore(
|
|
236
|
+
t ? (t.restore(a), o.value = !1) : (g.value = !0, c.value = !1);
|
|
207
237
|
}
|
|
208
|
-
e === !0 && (t?.dialogs.get(
|
|
238
|
+
e === !0 && (t?.dialogs.get(a)?.isMinimized ? t.remindMinimized(a) : c.value && (p.value += 1));
|
|
209
239
|
}
|
|
210
240
|
);
|
|
211
|
-
const
|
|
212
|
-
async function
|
|
213
|
-
if (!
|
|
241
|
+
const z = r(() => Object.prototype.hasOwnProperty.call(J, n.size) ? J[n.size] : n.size), ne = r(() => A.value ? {} : { width: z.value });
|
|
242
|
+
async function E(e) {
|
|
243
|
+
if (!n.beforeClose) return !0;
|
|
214
244
|
try {
|
|
215
|
-
return await
|
|
245
|
+
return await n.beforeClose(e) !== !1;
|
|
216
246
|
} catch {
|
|
217
247
|
return !1;
|
|
218
248
|
}
|
|
219
249
|
}
|
|
220
|
-
async function
|
|
221
|
-
|
|
222
|
-
e(!y);
|
|
250
|
+
async function G() {
|
|
251
|
+
await E("close") && s("update:modelValue", !1);
|
|
223
252
|
}
|
|
224
|
-
|
|
225
|
-
|
|
253
|
+
function le() {
|
|
254
|
+
G();
|
|
226
255
|
}
|
|
227
|
-
|
|
228
|
-
|
|
256
|
+
function j(e) {
|
|
257
|
+
e.key === "Escape" && (!n.modelValue || !D.value || M.value || (e.stopPropagation(), G()));
|
|
229
258
|
}
|
|
230
|
-
function
|
|
259
|
+
async function K() {
|
|
260
|
+
await E("cancel") && s("cancel");
|
|
261
|
+
}
|
|
262
|
+
function U() {
|
|
231
263
|
s("reset");
|
|
232
264
|
}
|
|
233
|
-
async function
|
|
234
|
-
await
|
|
265
|
+
async function X() {
|
|
266
|
+
await E("save") && s("save");
|
|
235
267
|
}
|
|
236
|
-
const V =
|
|
237
|
-
async function
|
|
238
|
-
if (await
|
|
268
|
+
const V = ee({});
|
|
269
|
+
async function se(e) {
|
|
270
|
+
if (await E("action") && (s("action", e.key), !!e.onClick))
|
|
239
271
|
try {
|
|
240
|
-
const
|
|
241
|
-
|
|
272
|
+
const T = e.onClick();
|
|
273
|
+
T instanceof Promise && (V[e.key] = !0, await T);
|
|
242
274
|
} finally {
|
|
243
275
|
V[e.key] = !1;
|
|
244
276
|
}
|
|
245
277
|
}
|
|
246
|
-
const
|
|
247
|
-
|
|
248
|
-
},
|
|
249
|
-
if (!await
|
|
250
|
-
if (t ? t.dialogs.get(
|
|
251
|
-
t ? t.minimize(
|
|
278
|
+
const A = _(!1), re = () => {
|
|
279
|
+
A.value = !A.value;
|
|
280
|
+
}, Y = r(() => A.value ? "退出全屏" : "全屏"), ce = async () => {
|
|
281
|
+
if (!await E("minimize")) return;
|
|
282
|
+
if (t ? t.dialogs.get(a)?.isMinimized ?? !1 : c.value) {
|
|
283
|
+
t ? t.minimize(a) : p.value += 1, s("minimize", { id: a });
|
|
252
284
|
return;
|
|
253
285
|
}
|
|
254
|
-
i.value = !0, t ? t.minimize(
|
|
255
|
-
},
|
|
256
|
-
|
|
257
|
-
}, ce = () => {
|
|
258
|
-
i.value && (t ? b.value = !0 : u.value = !1, i.value = !1);
|
|
286
|
+
i.value = !0, t ? t.minimize(a) : c.value = !0, s("update:modelValue", !1), s("minimize", { id: a });
|
|
287
|
+
}, de = () => {
|
|
288
|
+
I.value = !0, i.value = !1, t ? (o.value = !1, t.restore(a)) : (g.value = !0, c.value = !1), s("update:modelValue", !0);
|
|
259
289
|
}, ue = () => {
|
|
260
|
-
|
|
290
|
+
i.value && (t ? o.value = !0 : g.value = !1, i.value = !1);
|
|
291
|
+
}, me = () => {
|
|
292
|
+
I.value = !1;
|
|
261
293
|
};
|
|
262
|
-
return (e,
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
"
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
key:
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
size: "small",
|
|
329
|
-
onClick: (Re) => le(d)
|
|
330
|
-
}, {
|
|
331
|
-
default: g(() => [
|
|
332
|
-
A(M(d.label), 1)
|
|
333
|
-
]),
|
|
334
|
-
_: 2
|
|
335
|
-
}, 1032, ["type", "icon", "loading", "disabled", "plain", "onClick"]))), 128)) : (m(), Y(Z, { key: 1 }, [
|
|
336
|
-
e.showCancel ? (m(), k(E, {
|
|
337
|
-
key: 0,
|
|
338
|
-
icon: C(ze),
|
|
339
|
-
size: "small",
|
|
340
|
-
onClick: W
|
|
341
|
-
}, {
|
|
342
|
-
default: g(() => [
|
|
343
|
-
A(M(e.cancelText), 1)
|
|
344
|
-
]),
|
|
345
|
-
_: 1
|
|
346
|
-
}, 8, ["icon"])) : I("", !0),
|
|
347
|
-
e.showReset ? (m(), k(E, {
|
|
348
|
-
key: 1,
|
|
349
|
-
icon: C(Te),
|
|
350
|
-
size: "small",
|
|
351
|
-
onClick: x
|
|
352
|
-
}, {
|
|
353
|
-
default: g(() => [
|
|
354
|
-
A(M(e.resetText), 1)
|
|
355
|
-
]),
|
|
356
|
-
_: 1
|
|
357
|
-
}, 8, ["icon"])) : I("", !0),
|
|
358
|
-
e.showSave ? (m(), k(E, {
|
|
359
|
-
key: 2,
|
|
360
|
-
type: "primary",
|
|
361
|
-
icon: C(ke),
|
|
362
|
-
loading: e.saveLoading,
|
|
363
|
-
disabled: e.saveDisabled,
|
|
294
|
+
return (e, T) => (m(), k(oe, { to: "body" }, [
|
|
295
|
+
w(he, {
|
|
296
|
+
name: "g-dialog-pro-fade",
|
|
297
|
+
onAfterEnter: me,
|
|
298
|
+
onAfterLeave: ue
|
|
299
|
+
}, {
|
|
300
|
+
default: f(() => [
|
|
301
|
+
D.value && y.value ? (m(), F("div", {
|
|
302
|
+
key: 0,
|
|
303
|
+
class: "g-dialog-pro-overlay",
|
|
304
|
+
onClick: ye(le, ["self"])
|
|
305
|
+
}, [
|
|
306
|
+
d("div", ze(e.$attrs, {
|
|
307
|
+
class: ["g-dialog-pro", {
|
|
308
|
+
"is-fullscreen": A.value,
|
|
309
|
+
"is-leave-to-minimize": i.value,
|
|
310
|
+
"is-enter-from-minimize": I.value
|
|
311
|
+
}],
|
|
312
|
+
style: ne.value,
|
|
313
|
+
role: "dialog",
|
|
314
|
+
"aria-modal": "true"
|
|
315
|
+
}), [
|
|
316
|
+
d("header", Fe, [
|
|
317
|
+
d("p", He, b(e.title), 1),
|
|
318
|
+
d("div", Le, [
|
|
319
|
+
d("button", {
|
|
320
|
+
type: "button",
|
|
321
|
+
class: "g-dialog-pro-control g-dialog-pro-control--minimize",
|
|
322
|
+
"aria-label": "最小化",
|
|
323
|
+
title: "最小化",
|
|
324
|
+
onClick: ce
|
|
325
|
+
}),
|
|
326
|
+
d("button", {
|
|
327
|
+
type: "button",
|
|
328
|
+
class: "g-dialog-pro-control g-dialog-pro-control--fullscreen",
|
|
329
|
+
"aria-label": Y.value,
|
|
330
|
+
title: Y.value,
|
|
331
|
+
onClick: re
|
|
332
|
+
}, null, 8, Re),
|
|
333
|
+
d("button", {
|
|
334
|
+
type: "button",
|
|
335
|
+
class: "g-dialog-pro-control g-dialog-pro-control--close",
|
|
336
|
+
"aria-label": Q,
|
|
337
|
+
title: Q,
|
|
338
|
+
onClick: G
|
|
339
|
+
})
|
|
340
|
+
])
|
|
341
|
+
]),
|
|
342
|
+
d("div", Ve, [
|
|
343
|
+
P(e.$slots, "default", {}, void 0, !0)
|
|
344
|
+
]),
|
|
345
|
+
e.hideFooter ? C("", !0) : (m(), F("footer", Pe, [
|
|
346
|
+
P(e.$slots, "footer", {
|
|
347
|
+
cancel: K,
|
|
348
|
+
reset: U,
|
|
349
|
+
save: X,
|
|
350
|
+
close: G,
|
|
351
|
+
loading: e.saveLoading
|
|
352
|
+
}, () => [
|
|
353
|
+
d("div", $e, [
|
|
354
|
+
e.actions && e.actions.length ? (m(!0), F(q, { key: 0 }, _e(e.actions, (v) => (m(), k(L, {
|
|
355
|
+
key: v.key,
|
|
356
|
+
type: v.type,
|
|
357
|
+
danger: v.danger,
|
|
358
|
+
loading: v.loading || V[v.key],
|
|
359
|
+
disabled: v.disabled,
|
|
364
360
|
size: "small",
|
|
365
|
-
onClick:
|
|
366
|
-
}, {
|
|
367
|
-
default:
|
|
368
|
-
|
|
361
|
+
onClick: (xe) => se(v)
|
|
362
|
+
}, ke({
|
|
363
|
+
default: f(() => [
|
|
364
|
+
H(" " + b(v.label), 1)
|
|
369
365
|
]),
|
|
370
|
-
_:
|
|
371
|
-
},
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
366
|
+
_: 2
|
|
367
|
+
}, [
|
|
368
|
+
v.icon ? {
|
|
369
|
+
name: "icon",
|
|
370
|
+
fn: f(() => [
|
|
371
|
+
(m(), k(Me(v.icon)))
|
|
372
|
+
]),
|
|
373
|
+
key: "0"
|
|
374
|
+
} : void 0
|
|
375
|
+
]), 1032, ["type", "danger", "loading", "disabled", "onClick"]))), 128)) : (m(), F(q, { key: 1 }, [
|
|
376
|
+
e.showCancel ? (m(), k(L, {
|
|
377
|
+
key: 0,
|
|
378
|
+
size: "small",
|
|
379
|
+
onClick: K
|
|
380
|
+
}, {
|
|
381
|
+
icon: f(() => [
|
|
382
|
+
w(O(Ie))
|
|
383
|
+
]),
|
|
384
|
+
default: f(() => [
|
|
385
|
+
H(" " + b(e.cancelText), 1)
|
|
386
|
+
]),
|
|
387
|
+
_: 1
|
|
388
|
+
})) : C("", !0),
|
|
389
|
+
e.showReset ? (m(), k(L, {
|
|
390
|
+
key: 1,
|
|
391
|
+
size: "small",
|
|
392
|
+
onClick: U
|
|
393
|
+
}, {
|
|
394
|
+
icon: f(() => [
|
|
395
|
+
w(O(Se))
|
|
396
|
+
]),
|
|
397
|
+
default: f(() => [
|
|
398
|
+
H(" " + b(e.resetText), 1)
|
|
399
|
+
]),
|
|
400
|
+
_: 1
|
|
401
|
+
})) : C("", !0),
|
|
402
|
+
e.showSave ? (m(), k(L, {
|
|
403
|
+
key: 2,
|
|
404
|
+
type: "primary",
|
|
405
|
+
loading: e.saveLoading,
|
|
406
|
+
disabled: e.saveDisabled,
|
|
407
|
+
size: "small",
|
|
408
|
+
onClick: X
|
|
409
|
+
}, {
|
|
410
|
+
icon: f(() => [
|
|
411
|
+
w(O(Ee))
|
|
412
|
+
]),
|
|
413
|
+
default: f(() => [
|
|
414
|
+
H(" " + b(e.saveText), 1)
|
|
415
|
+
]),
|
|
416
|
+
_: 1
|
|
417
|
+
}, 8, ["loading", "disabled"])) : C("", !0)
|
|
418
|
+
], 64)),
|
|
419
|
+
P(e.$slots, "moreOperations", {}, void 0, !0)
|
|
420
|
+
])
|
|
421
|
+
], !0)
|
|
422
|
+
]))
|
|
423
|
+
], 16)
|
|
424
|
+
])) : C("", !0)
|
|
425
|
+
]),
|
|
426
|
+
_: 3
|
|
427
|
+
}),
|
|
428
|
+
w(O(Te), null, {
|
|
429
|
+
default: f(() => [
|
|
430
|
+
M.value ? (m(), k(W, {
|
|
431
|
+
key: 0,
|
|
432
|
+
title: e.title,
|
|
433
|
+
position: B.value,
|
|
434
|
+
"attention-tick": S.value,
|
|
435
|
+
onRestore: de
|
|
436
|
+
}, null, 8, ["title", "position", "attention-tick"])) : C("", !0)
|
|
437
|
+
]),
|
|
438
|
+
_: 1
|
|
439
|
+
})
|
|
440
|
+
]));
|
|
394
441
|
}
|
|
395
|
-
}),
|
|
396
|
-
|
|
397
|
-
|
|
442
|
+
}), $ = /* @__PURE__ */ ae(Ne, [["__scopeId", "data-v-5e0eed3b"]]);
|
|
443
|
+
$.install = (l) => {
|
|
444
|
+
l.component($.name, $), l.component(W.name, W);
|
|
398
445
|
};
|
|
399
446
|
export {
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
447
|
+
Ae as ChatDotRound,
|
|
448
|
+
Ee as CircleCheck,
|
|
449
|
+
Ce as DIALOG_MANAGER_KEY,
|
|
450
|
+
J as DIALOG_SIZES,
|
|
451
|
+
$ as GDialog,
|
|
452
|
+
W as GDialogMinimizedIcon,
|
|
453
|
+
x as MINIMIZED_LAYOUT,
|
|
454
|
+
Se as Refresh,
|
|
455
|
+
Ie as Remove,
|
|
456
|
+
Ye as createDialogManager,
|
|
457
|
+
$ as default,
|
|
407
458
|
Oe as useDialogManager
|
|
408
459
|
};
|