@me-framework/me-ui-antdv-next 0.0.24 → 0.0.26
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/README.md +41 -0
- package/dist/base/index.js +0 -0
- package/dist/base.css +1 -0
- package/dist/base.d.ts +1 -0
- package/dist/body/index.js +153 -0
- package/dist/{components/body → body}/index.vue.d.ts +3 -3
- package/dist/body.css +1 -0
- package/dist/box/index.js +170 -0
- package/dist/box.css +1 -0
- package/dist/breadcrumb/index.js +99 -0
- package/dist/breadcrumb.css +1 -0
- package/dist/card/index.js +154 -0
- package/dist/card.css +1 -0
- package/dist/chunks/icon-DdoH0MfT.js +156 -0
- package/dist/chunks/input-icon-selector-D5c45QL8.js +227 -0
- package/dist/chunks/message-CPHX2tAR.js +290 -0
- package/dist/chunks/modal-Dke8ng3P.js +178 -0
- package/dist/chunks/rolldown-runtime-DtPi1Y-2.js +13 -0
- package/dist/icon/index.js +27 -0
- package/dist/icon.css +1 -0
- package/dist/index.d.ts +34 -34
- package/dist/input-gps/index.js +451 -0
- package/dist/input-gps.css +1 -0
- package/dist/input-icon-selector/index.js +2 -0
- package/dist/input-icon-selector.css +1 -0
- package/dist/input-radio/index.js +96 -0
- package/dist/{components/input-radio → input-radio}/index.vue.d.ts +3 -3
- package/dist/input-radio.css +1 -0
- package/dist/load-json/index.js +24405 -0
- package/dist/load-json.css +1 -0
- package/dist/login-page/index.js +272 -0
- package/dist/login-page.css +1 -0
- package/dist/me-ui-antdv-next.js +2 -2
- package/dist/me-ui-antdv-next.umd.cjs +2 -2
- package/dist/menu/index.js +465 -0
- package/dist/menu.css +1 -0
- package/dist/message/index.js +2 -0
- package/dist/message.css +1 -0
- package/dist/modal/index.js +2 -0
- package/dist/modal.css +1 -0
- package/dist/nav/index.js +560 -0
- package/dist/nav.css +1 -0
- package/dist/resolver/index.d.ts +7 -0
- package/dist/resolver/index.js +36 -0
- package/dist/resolver/resolver-map.d.ts +6 -0
- package/dist/resolver/resolver-type.d.ts +19 -0
- package/dist/resolver.d.ts +2 -0
- package/dist/shims-vue.d.ts +3 -0
- package/dist/skeleton/index.js +141 -0
- package/dist/skeleton.css +1 -0
- package/dist/{me-ui-antdv-next.css → style.css} +1 -1
- package/dist/styles/base.d.ts +0 -0
- package/dist/tree-menu/index.js +890 -0
- package/dist/tree-menu.css +1 -0
- package/package.json +15 -6
- package/dist/{components/body → body}/index.d.ts +0 -0
- package/dist/{components/body → body}/types.d.ts +0 -0
- package/dist/{components/box → box}/index.d.ts +0 -0
- package/dist/{components/box → box}/index.vue.d.ts +2 -2
- package/dist/{components/box → box}/types.d.ts +0 -0
- package/dist/{components/breadcrumb → breadcrumb}/index.d.ts +0 -0
- package/dist/{components/breadcrumb → breadcrumb}/index.vue.d.ts +0 -0
- package/dist/{components/breadcrumb → breadcrumb}/types.d.ts +0 -0
- package/dist/{components/card → card}/index.d.ts +0 -0
- package/dist/{components/card → card}/index.vue.d.ts +4 -4
- package/dist/{components/card → card}/types.d.ts +0 -0
- package/dist/{components/icon → icon}/index.d.ts +0 -0
- package/dist/{components/icon → icon}/index.vue.d.ts +2 -2
- package/dist/{components/icon → icon}/types.d.ts +0 -0
- package/dist/{components/input-gps → input-gps}/index.d.ts +0 -0
- package/dist/{components/input-gps → input-gps}/index.vue.d.ts +0 -0
- package/dist/{components/input-gps → input-gps}/map.vue.d.ts +0 -0
- package/dist/{components/input-gps → input-gps}/types.d.ts +0 -0
- package/dist/{components/input-icon-selector → input-icon-selector}/index.d.ts +0 -0
- package/dist/{components/input-icon-selector → input-icon-selector}/index.vue.d.ts +5 -5
- package/dist/{components/input-icon-selector → input-icon-selector}/types.d.ts +0 -0
- package/dist/{components/input-radio → input-radio}/index.d.ts +0 -0
- package/dist/{components/input-radio → input-radio}/types.d.ts +0 -0
- package/dist/{components/load-json → load-json}/index.d.ts +0 -0
- package/dist/{components/load-json → load-json}/index.vue.d.ts +1 -1
- package/dist/{components/load-json → load-json}/types.d.ts +0 -0
- package/dist/{components/login-page → login-page}/index.d.ts +0 -0
- package/dist/{components/login-page → login-page}/index.vue.d.ts +0 -0
- package/dist/{components/login-page → login-page}/types.d.ts +0 -0
- package/dist/{components/menu → menu}/MenuTreeItem.vue.d.ts +0 -0
- package/dist/{components/menu → menu}/index.d.ts +0 -0
- package/dist/{components/menu → menu}/index.vue.d.ts +2 -2
- package/dist/{components/menu → menu}/types.d.ts +0 -0
- package/dist/{components/message → message}/index.d.ts +0 -0
- package/dist/{components/message → message}/index.vue.d.ts +4 -4
- package/dist/{components/message → message}/types.d.ts +0 -0
- package/dist/{components/modal → modal}/index.d.ts +0 -0
- package/dist/{components/modal → modal}/index.vue.d.ts +5 -5
- package/dist/{components/modal → modal}/types.d.ts +0 -0
- package/dist/{components/nav → nav}/composables/useNavDrag.d.ts +0 -0
- package/dist/{components/nav → nav}/composables/useNavScroll.d.ts +0 -0
- package/dist/{components/nav → nav}/index.d.ts +0 -0
- package/dist/{components/nav → nav}/index.vue.d.ts +5 -5
- package/dist/{components/nav → nav}/types.d.ts +0 -0
- package/dist/{components/skeleton → skeleton}/index.d.ts +0 -0
- package/dist/{components/skeleton → skeleton}/index.vue.d.ts +0 -0
- package/dist/{components/skeleton → skeleton}/types.d.ts +0 -0
- package/dist/{components/tree-menu → tree-menu}/TreeMenuActions.vue.d.ts +0 -0
- package/dist/{components/tree-menu → tree-menu}/TreeMenuCard.vue.d.ts +1 -1
- package/dist/{components/tree-menu → tree-menu}/TreeMenuEdit.vue.d.ts +2 -2
- package/dist/{components/tree-menu → tree-menu}/TreeMenuNode.vue.d.ts +0 -0
- package/dist/{components/tree-menu → tree-menu}/index.d.ts +0 -0
- package/dist/{components/tree-menu → tree-menu}/index.vue.d.ts +3 -3
- /package/dist/{components/tree-menu → tree-menu}/types.d.ts +0 -0
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import { computed as e, createBlock as t, createCommentVNode as n, createElementVNode as r, createTextVNode as i, createVNode as a, defineComponent as o, inject as s, nextTick as c, normalizeClass as l, onBeforeUnmount as u, onMounted as d, onUnmounted as f, openBlock as p, ref as m, render as h, renderSlot as g, resolveComponent as _, toDisplayString as v, watch as y, withCtx as b } from "vue";
|
|
2
|
+
import { theme as ee } from "antdv-next";
|
|
3
|
+
//#region src/components/message/index.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var x = { class: "me-message__footer" }, S = { class: "me-message__actions" }, C = { class: "me-message__header" }, w = ["innerHTML"], T = /* @__PURE__ */ o({
|
|
5
|
+
name: "MeMessage",
|
|
6
|
+
__name: "index",
|
|
7
|
+
props: {
|
|
8
|
+
modelValue: {
|
|
9
|
+
type: Boolean,
|
|
10
|
+
default: void 0
|
|
11
|
+
},
|
|
12
|
+
request: {
|
|
13
|
+
type: Function,
|
|
14
|
+
default: void 0
|
|
15
|
+
},
|
|
16
|
+
data: { default: () => ({}) },
|
|
17
|
+
handler: { default: () => ({}) },
|
|
18
|
+
closeOnRouteChange: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !0
|
|
21
|
+
},
|
|
22
|
+
centered: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !0
|
|
25
|
+
},
|
|
26
|
+
top: { default: void 0 },
|
|
27
|
+
width: { default: 380 },
|
|
28
|
+
onClosed: {},
|
|
29
|
+
onDestroy: {
|
|
30
|
+
type: Function,
|
|
31
|
+
default: void 0
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
emits: ["update:modelValue", "closed"],
|
|
35
|
+
setup(o, { expose: h, emit: T }) {
|
|
36
|
+
let { defaultAlgorithm: E, darkAlgorithm: D } = ee, O = o, k = T;
|
|
37
|
+
h({
|
|
38
|
+
close: () => {
|
|
39
|
+
j.value = !1;
|
|
40
|
+
},
|
|
41
|
+
hide: () => {
|
|
42
|
+
P = !0, j.value = !1;
|
|
43
|
+
},
|
|
44
|
+
show: () => {
|
|
45
|
+
P = !1, N = !1, j.value = !0;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
let A = m(!0), j = e({
|
|
49
|
+
get: () => O.modelValue ?? A.value,
|
|
50
|
+
set: (e) => {
|
|
51
|
+
O.modelValue === void 0 ? A.value = e : k("update:modelValue", e), !e && !P && !R && (k("closed"), O.onClosed?.());
|
|
52
|
+
}
|
|
53
|
+
}), M = m("normal"), N = !1, P = !1, F = null, I = s("router", null), L = m(null), R = !1, z = () => {
|
|
54
|
+
if (!(!I || !O.closeOnRouteChange)) return I.afterEach((e) => {
|
|
55
|
+
let t = e.fullPath;
|
|
56
|
+
if (R && L.value === t) {
|
|
57
|
+
R = !1, P = !1, j.value = !0;
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
j.value && !R && L.value && L.value !== t && (R = !0, P = !0, j.value = !1);
|
|
61
|
+
});
|
|
62
|
+
}, B;
|
|
63
|
+
I && (B = z()), u(() => {
|
|
64
|
+
B?.();
|
|
65
|
+
});
|
|
66
|
+
let V = m(!1), H = () => {
|
|
67
|
+
typeof document < "u" && (V.value = document.documentElement.classList.contains("dark"));
|
|
68
|
+
}, U = null;
|
|
69
|
+
d(() => {
|
|
70
|
+
H(), typeof document < "u" && (U = new MutationObserver(() => {
|
|
71
|
+
H();
|
|
72
|
+
}), U.observe(document.documentElement, {
|
|
73
|
+
attributes: !0,
|
|
74
|
+
attributeFilter: ["class"]
|
|
75
|
+
}));
|
|
76
|
+
}), f(() => {
|
|
77
|
+
U?.disconnect(), U = null;
|
|
78
|
+
});
|
|
79
|
+
let W = e(() => ({
|
|
80
|
+
algorithm: V.value ? D : E,
|
|
81
|
+
token: { borderRadius: 6 },
|
|
82
|
+
components: { Modal: { titleFontSize: 18 } }
|
|
83
|
+
})), G = e(() => M.value === "process" ? O.data.process?.title ?? O.data.normal?.title : O.data.normal?.title), K = e(() => M.value === "process" ? O.data.process?.message ?? O.data.normal?.message : O.data.normal?.message), q = e(() => M.value === "process" ? O.data.process?.loading ?? !1 : O.data.normal?.loading ?? !1), J = e(() => M.value === "process" ? O.data.process?.type ?? O.data.normal?.type ?? "default" : O.data.normal?.type ?? "default"), Y = e(() => !!O.handler?.cancel), X = e(() => J.value === "default" ? "default" : "primary"), Z = e(() => J.value === "danger");
|
|
84
|
+
y(j, async (e) => {
|
|
85
|
+
if (e ? (I && O.closeOnRouteChange && (L.value = I.currentRoute.value.fullPath), R || (P = !1)) : !P && !R && (L.value = null), e && !O.centered && O.top !== void 0) {
|
|
86
|
+
await c();
|
|
87
|
+
let e = typeof O.top == "number" ? `${O.top}px` : O.top, t = document.querySelectorAll(".me-message-modal .ant-modal"), n = t[t.length - 1];
|
|
88
|
+
n && (n.style.marginTop = e);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
let Q = (e, ...t) => new Promise((n) => {
|
|
92
|
+
if (!e) {
|
|
93
|
+
n(!0);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
let r = e(...t);
|
|
97
|
+
r instanceof Promise ? r.then((e) => n(e !== !1)).catch(() => n(!1)) : n(r !== !1);
|
|
98
|
+
}), te = () => {
|
|
99
|
+
F = null;
|
|
100
|
+
let e = O.data.request;
|
|
101
|
+
return !e || new Promise((t) => {
|
|
102
|
+
e.api ? e.api(e.data).then((e) => {
|
|
103
|
+
F = e, t(!0);
|
|
104
|
+
}).catch(() => {
|
|
105
|
+
t(!0);
|
|
106
|
+
}) : O.request ? O.request(e).then((e) => {
|
|
107
|
+
F = e, t(!0);
|
|
108
|
+
}).catch(() => {
|
|
109
|
+
t(!0);
|
|
110
|
+
}) : t(!0);
|
|
111
|
+
});
|
|
112
|
+
}, $ = async () => {
|
|
113
|
+
if (P) {
|
|
114
|
+
P = !1, N = !1;
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
N || (N = !0, await Q(O.handler?.cancel) ? j.value = !1 : (M.value = "normal", N = !1));
|
|
118
|
+
}, ne = async () => {
|
|
119
|
+
if (N) return;
|
|
120
|
+
N = !0, M.value = "process";
|
|
121
|
+
let e = !0;
|
|
122
|
+
O.data.request && (e = await te()), e && O.handler?.confirm ? await Q(O.handler.confirm, F) ? j.value = !1 : (M.value = "normal", N = !1) : j.value = !1;
|
|
123
|
+
};
|
|
124
|
+
return (e, s) => {
|
|
125
|
+
let c = _("a-button"), u = _("a-modal"), d = _("a-config-provider");
|
|
126
|
+
return p(), t(d, { theme: W.value }, {
|
|
127
|
+
default: b(() => [a(u, {
|
|
128
|
+
open: j.value,
|
|
129
|
+
"onUpdate:open": s[0] ||= (e) => j.value = e,
|
|
130
|
+
width: o.width,
|
|
131
|
+
centered: o.centered,
|
|
132
|
+
top: o.top,
|
|
133
|
+
closable: !1,
|
|
134
|
+
"mask-closable": !1,
|
|
135
|
+
keyboard: !1,
|
|
136
|
+
"wrap-class-name": "me-message-modal",
|
|
137
|
+
onCancel: $
|
|
138
|
+
}, {
|
|
139
|
+
footer: b(() => [r("div", x, [g(e.$slots, "me-message-footer", {}, () => [s[3] ||= r("div", null, null, -1), r("div", S, [Y.value ? (p(), t(c, {
|
|
140
|
+
key: 0,
|
|
141
|
+
type: "link",
|
|
142
|
+
class: "me-message__cancel",
|
|
143
|
+
autoInsertSpace: !1,
|
|
144
|
+
onClick: $
|
|
145
|
+
}, {
|
|
146
|
+
default: b(() => [...s[1] ||= [i("取消 ", -1)]]),
|
|
147
|
+
_: 1
|
|
148
|
+
})) : n("", !0), a(c, {
|
|
149
|
+
type: X.value,
|
|
150
|
+
danger: Z.value,
|
|
151
|
+
loading: q.value,
|
|
152
|
+
autoInsertSpace: !1,
|
|
153
|
+
class: l(["me-message__confirm", `me-message__confirm--${J.value}`]),
|
|
154
|
+
onClick: ne
|
|
155
|
+
}, {
|
|
156
|
+
default: b(() => [...s[2] ||= [i(" 确定 ", -1)]]),
|
|
157
|
+
_: 1
|
|
158
|
+
}, 8, [
|
|
159
|
+
"type",
|
|
160
|
+
"danger",
|
|
161
|
+
"loading",
|
|
162
|
+
"class"
|
|
163
|
+
])])])])]),
|
|
164
|
+
default: b(() => [r("div", C, [g(e.$slots, "title", {}, () => [i(v(G.value), 1)])]), r("div", {
|
|
165
|
+
class: "me-message__body",
|
|
166
|
+
innerHTML: K.value
|
|
167
|
+
}, null, 8, w)]),
|
|
168
|
+
_: 3
|
|
169
|
+
}, 8, [
|
|
170
|
+
"open",
|
|
171
|
+
"width",
|
|
172
|
+
"centered",
|
|
173
|
+
"top"
|
|
174
|
+
])]),
|
|
175
|
+
_: 3
|
|
176
|
+
}, 8, ["theme"]);
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
}), E = null, D = 1, O = /* @__PURE__ */ new Map(), k = null, A = !1, j = (e) => {
|
|
180
|
+
let t = parseInt(e.id.replace("message_", ""));
|
|
181
|
+
O.delete(t);
|
|
182
|
+
}, M = (e) => {
|
|
183
|
+
try {
|
|
184
|
+
h(null, e), e.parentNode && e.parentNode.removeChild(e);
|
|
185
|
+
} catch (e) {
|
|
186
|
+
console.warn("[MeMessage] Failed to destroy instance:", e);
|
|
187
|
+
}
|
|
188
|
+
}, N = (e) => {
|
|
189
|
+
let t = `message_${D++}`, n = e.onClose, r = document.createElement("div");
|
|
190
|
+
document.body.appendChild(r);
|
|
191
|
+
let i = {
|
|
192
|
+
data: e.data,
|
|
193
|
+
request: e.request,
|
|
194
|
+
handler: e.handler,
|
|
195
|
+
closeOnRouteChange: e.closeOnRouteChange ?? !0,
|
|
196
|
+
centered: e.centered ?? !0,
|
|
197
|
+
top: e.top,
|
|
198
|
+
width: e.width,
|
|
199
|
+
onClosed: () => {
|
|
200
|
+
n?.(), j(c), setTimeout(() => {
|
|
201
|
+
M(r);
|
|
202
|
+
}, 300);
|
|
203
|
+
},
|
|
204
|
+
onDestroy: () => {
|
|
205
|
+
M(r);
|
|
206
|
+
}
|
|
207
|
+
}, o = a(T, i);
|
|
208
|
+
o.appContext = E, h(o, r);
|
|
209
|
+
let s = o.component;
|
|
210
|
+
if (!s) throw M(r), Error("[MeMessage] Failed to create component instance");
|
|
211
|
+
let c = {
|
|
212
|
+
id: t,
|
|
213
|
+
vnode: o,
|
|
214
|
+
vm: s,
|
|
215
|
+
handler: {
|
|
216
|
+
close: () => {
|
|
217
|
+
try {
|
|
218
|
+
s.exposed?.close?.();
|
|
219
|
+
} catch (e) {
|
|
220
|
+
console.warn("[MeMessage] Failed to close:", e);
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
hide: () => {
|
|
224
|
+
try {
|
|
225
|
+
s.exposed?.hide?.();
|
|
226
|
+
} catch (e) {
|
|
227
|
+
console.warn("[MeMessage] Failed to hide:", e);
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
show: () => {
|
|
231
|
+
try {
|
|
232
|
+
s.exposed?.show?.();
|
|
233
|
+
} catch (e) {
|
|
234
|
+
console.warn("[MeMessage] Failed to show:", e);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
props: s.props,
|
|
239
|
+
routePath: k?.currentRoute.value?.fullPath,
|
|
240
|
+
container: r
|
|
241
|
+
};
|
|
242
|
+
return O.set(parseInt(t.replace("message_", "")), c), c;
|
|
243
|
+
}, P = (e = {}) => {
|
|
244
|
+
try {
|
|
245
|
+
return N(e).handler;
|
|
246
|
+
} catch (e) {
|
|
247
|
+
return console.error("[MeMessage] Failed to create:", e), { close: () => {} };
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
P.closeAll = () => {
|
|
251
|
+
O.forEach((e) => {
|
|
252
|
+
try {
|
|
253
|
+
e.handler.close();
|
|
254
|
+
} catch (e) {
|
|
255
|
+
console.warn("[MeMessage] Failed to close instance:", e);
|
|
256
|
+
}
|
|
257
|
+
}), O.clear();
|
|
258
|
+
}, P.setupRouter = (e) => {
|
|
259
|
+
if (k = e, A) return;
|
|
260
|
+
A = !0;
|
|
261
|
+
let t = /* @__PURE__ */ new Map();
|
|
262
|
+
e.afterEach((e) => {
|
|
263
|
+
let n = e.fullPath;
|
|
264
|
+
t.forEach((e, r) => {
|
|
265
|
+
if (e.routePath === n) {
|
|
266
|
+
try {
|
|
267
|
+
e.handler.show?.();
|
|
268
|
+
} catch (e) {
|
|
269
|
+
console.warn("[MeMessage] Failed to show on route back:", e);
|
|
270
|
+
}
|
|
271
|
+
t.delete(r), O.set(r, e);
|
|
272
|
+
}
|
|
273
|
+
}), O.forEach((e, r) => {
|
|
274
|
+
if ((e.props.closeOnRouteChange ?? !0) && e.routePath !== n) {
|
|
275
|
+
try {
|
|
276
|
+
e.handler.hide?.();
|
|
277
|
+
} catch (e) {
|
|
278
|
+
console.warn("[MeMessage] Failed to hide on route change:", e);
|
|
279
|
+
}
|
|
280
|
+
O.delete(r), t.set(r, e);
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
});
|
|
284
|
+
}, T.install = (e) => {
|
|
285
|
+
E = e._context, e.component("MeMessage", T), e.config.globalProperties.$meMessage = P;
|
|
286
|
+
let t = e.config.globalProperties.$router;
|
|
287
|
+
t && !A && P.setupRouter(t);
|
|
288
|
+
};
|
|
289
|
+
//#endregion
|
|
290
|
+
export { T as n, P as t };
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { computed as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, createVNode as o, defineComponent as s, mergeProps as c, onMounted as l, onUnmounted as u, openBlock as d, ref as f, renderSlot as p, resolveComponent as m, resolveDynamicComponent as h, toDisplayString as g, unref as _, useAttrs as v, withCtx as y, withModifiers as b } from "vue";
|
|
2
|
+
import { Maximize as x, Minimize as S } from "@lucide/vue";
|
|
3
|
+
import { theme as C } from "antdv-next";
|
|
4
|
+
//#region src/components/modal/index.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var w = { class: "me-modal__title-row" }, T = { class: "me-modal__title-text" }, E = ["title"], D = /* @__PURE__ */ s({
|
|
6
|
+
name: "MeModal",
|
|
7
|
+
__name: "index",
|
|
8
|
+
props: {
|
|
9
|
+
open: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: !1
|
|
12
|
+
},
|
|
13
|
+
fullscreen: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: !0
|
|
16
|
+
},
|
|
17
|
+
defaultFullscreen: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: !1
|
|
20
|
+
},
|
|
21
|
+
width: { default: 520 },
|
|
22
|
+
_semanticOmit: {},
|
|
23
|
+
_renderSemanticContent: {},
|
|
24
|
+
confirmLoading: { type: Boolean },
|
|
25
|
+
title: {},
|
|
26
|
+
afterClose: {},
|
|
27
|
+
afterOpenChange: {},
|
|
28
|
+
centered: { type: Boolean },
|
|
29
|
+
okText: {},
|
|
30
|
+
okType: {},
|
|
31
|
+
cancelText: {},
|
|
32
|
+
forceRender: { type: Boolean },
|
|
33
|
+
okButtonProps: {},
|
|
34
|
+
cancelButtonProps: {},
|
|
35
|
+
destroyOnClose: { type: Boolean },
|
|
36
|
+
destroyOnHidden: { type: Boolean },
|
|
37
|
+
wrapClassName: {},
|
|
38
|
+
maskTransitionName: {},
|
|
39
|
+
transitionName: {},
|
|
40
|
+
rootClass: {},
|
|
41
|
+
rootStyle: {},
|
|
42
|
+
getContainer: { type: [
|
|
43
|
+
String,
|
|
44
|
+
Function,
|
|
45
|
+
Boolean
|
|
46
|
+
] },
|
|
47
|
+
zIndex: {},
|
|
48
|
+
bodyStyle: {},
|
|
49
|
+
maskStyle: {},
|
|
50
|
+
mask: { type: [Object, Boolean] },
|
|
51
|
+
maskClosable: { type: Boolean },
|
|
52
|
+
keyboard: { type: Boolean },
|
|
53
|
+
scrollLock: { type: Boolean },
|
|
54
|
+
wrapProps: {},
|
|
55
|
+
prefixCls: {},
|
|
56
|
+
closeIcon: {},
|
|
57
|
+
modalRender: {},
|
|
58
|
+
focusTriggerAfterClose: { type: Boolean },
|
|
59
|
+
mousePosition: {},
|
|
60
|
+
loading: { type: Boolean },
|
|
61
|
+
focusable: {},
|
|
62
|
+
footer: {},
|
|
63
|
+
closable: { type: [Boolean, Object] },
|
|
64
|
+
classes: {},
|
|
65
|
+
styles: {},
|
|
66
|
+
className: {},
|
|
67
|
+
children: { type: [
|
|
68
|
+
Object,
|
|
69
|
+
String,
|
|
70
|
+
Number,
|
|
71
|
+
null,
|
|
72
|
+
Boolean,
|
|
73
|
+
Array
|
|
74
|
+
] },
|
|
75
|
+
visible: { type: Boolean },
|
|
76
|
+
wrapStyle: {},
|
|
77
|
+
height: {},
|
|
78
|
+
bodyProps: {},
|
|
79
|
+
maskProps: {},
|
|
80
|
+
rootClassName: {},
|
|
81
|
+
panelRef: {},
|
|
82
|
+
onOk: {},
|
|
83
|
+
onCancel: {},
|
|
84
|
+
"onUpdate:open": {}
|
|
85
|
+
},
|
|
86
|
+
emits: [
|
|
87
|
+
"update:open",
|
|
88
|
+
"fullscreen-change",
|
|
89
|
+
"ok",
|
|
90
|
+
"cancel"
|
|
91
|
+
],
|
|
92
|
+
setup(s, { expose: D, emit: O }) {
|
|
93
|
+
let { defaultAlgorithm: k, darkAlgorithm: A } = C, j = s, M = O, N = v(), P = x, F = S, I = e(() => !!j.loading), L = e(() => j.title ?? ""), R = e(() => {
|
|
94
|
+
let { open: e, fullscreen: t, defaultFullscreen: n, width: r, loading: i, "onUpdate:open": a, "onFullscreen-change": o, onOk: s, onCancel: c, ...l } = N;
|
|
95
|
+
return l;
|
|
96
|
+
}), z = e(() => j.fullscreen), B = e({
|
|
97
|
+
get: () => j.open,
|
|
98
|
+
set: (e) => {
|
|
99
|
+
M("update:open", e);
|
|
100
|
+
}
|
|
101
|
+
}), V = f(j.defaultFullscreen), H = () => {
|
|
102
|
+
V.value = !V.value, M("fullscreen-change", V.value);
|
|
103
|
+
}, U = (e) => {
|
|
104
|
+
M("cancel", e);
|
|
105
|
+
}, W = (e) => {
|
|
106
|
+
M("ok", e);
|
|
107
|
+
}, G = e(() => V.value ? "100%" : j.width), K = e(() => {
|
|
108
|
+
let e = ["me-modal-wrap"];
|
|
109
|
+
return V.value && e.push("me-modal-wrap--fullscreen"), e.join(" ");
|
|
110
|
+
}), q = f(!1), J = () => {
|
|
111
|
+
typeof document < "u" && (q.value = document.documentElement.classList.contains("dark"));
|
|
112
|
+
}, Y = null;
|
|
113
|
+
l(() => {
|
|
114
|
+
J(), typeof document < "u" && (Y = new MutationObserver(() => {
|
|
115
|
+
J();
|
|
116
|
+
}), Y.observe(document.documentElement, {
|
|
117
|
+
attributes: !0,
|
|
118
|
+
attributeFilter: ["class"]
|
|
119
|
+
}));
|
|
120
|
+
}), u(() => {
|
|
121
|
+
Y?.disconnect(), Y = null;
|
|
122
|
+
});
|
|
123
|
+
let X = e(() => ({
|
|
124
|
+
algorithm: q.value ? A : k,
|
|
125
|
+
token: { borderRadius: 6 }
|
|
126
|
+
}));
|
|
127
|
+
return D({
|
|
128
|
+
toggleFullscreen: H,
|
|
129
|
+
isFullscreen: V
|
|
130
|
+
}), (e, s) => {
|
|
131
|
+
let l = m("a-skeleton"), u = m("a-modal"), f = m("a-config-provider");
|
|
132
|
+
return d(), t(f, { theme: X.value }, {
|
|
133
|
+
default: y(() => [o(u, c({
|
|
134
|
+
open: B.value,
|
|
135
|
+
"onUpdate:open": s[0] ||= (e) => B.value = e,
|
|
136
|
+
width: G.value,
|
|
137
|
+
"wrap-class-name": K.value,
|
|
138
|
+
class: ["me-modal", {
|
|
139
|
+
"me-modal--fullscreen": V.value,
|
|
140
|
+
"me-modal--has-fullscreen": z.value
|
|
141
|
+
}]
|
|
142
|
+
}, R.value, {
|
|
143
|
+
onCancel: U,
|
|
144
|
+
onOk: W
|
|
145
|
+
}), {
|
|
146
|
+
title: y(() => [i("div", w, [i("span", T, [p(e.$slots, "title", {}, () => [a(g(L.value), 1)])]), z.value ? (d(), r("span", {
|
|
147
|
+
key: 0,
|
|
148
|
+
class: "me-modal__fullscreen-btn",
|
|
149
|
+
role: "button",
|
|
150
|
+
title: V.value ? "退出全屏" : "全屏",
|
|
151
|
+
onClick: b(H, ["stop"])
|
|
152
|
+
}, [(d(), t(h(V.value ? _(F) : _(P)), { size: 16 }))], 8, E)) : n("", !0)])]),
|
|
153
|
+
default: y(() => [I.value ? (d(), t(l, {
|
|
154
|
+
key: 0,
|
|
155
|
+
active: "",
|
|
156
|
+
paragraph: { rows: 4 },
|
|
157
|
+
class: "me-modal__skeleton"
|
|
158
|
+
})) : p(e.$slots, "default", {}, void 0, void 0, 1)]),
|
|
159
|
+
_: 3
|
|
160
|
+
}, 16, [
|
|
161
|
+
"open",
|
|
162
|
+
"width",
|
|
163
|
+
"wrap-class-name",
|
|
164
|
+
"class"
|
|
165
|
+
])]),
|
|
166
|
+
_: 3
|
|
167
|
+
}, 8, ["theme"]);
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
//#endregion
|
|
172
|
+
//#region src/components/modal/index.ts
|
|
173
|
+
D.install = (e) => {
|
|
174
|
+
e.component("MeModal", D);
|
|
175
|
+
};
|
|
176
|
+
var O = D;
|
|
177
|
+
//#endregion
|
|
178
|
+
export { D as n, O as t };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = (e, i, o, s) => {
|
|
3
|
+
if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
|
|
4
|
+
get: ((e) => i[e]).bind(null, d),
|
|
5
|
+
enumerable: !(s = n(i, d)) || s.enumerable
|
|
6
|
+
});
|
|
7
|
+
return e;
|
|
8
|
+
}, c = (n, r, o) => (o = n == null ? {} : e(i(n)), s(r || !n || !n.__esModule || !a.call(n, "default") ? t(o, "default", {
|
|
9
|
+
value: n,
|
|
10
|
+
enumerable: !0
|
|
11
|
+
}) : o, n));
|
|
12
|
+
//#endregion
|
|
13
|
+
export { c as n, o as t };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { t as e } from "../chunks/icon-DdoH0MfT.js";
|
|
2
|
+
//#region src/components/icon/index.ts
|
|
3
|
+
e.install = (t) => {
|
|
4
|
+
t.component("MeIcon", e);
|
|
5
|
+
};
|
|
6
|
+
var t = /* @__PURE__ */ new Set();
|
|
7
|
+
function n(e) {
|
|
8
|
+
return new Promise((n, r) => {
|
|
9
|
+
if (typeof document > "u") {
|
|
10
|
+
n();
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
if (t.has(e)) {
|
|
14
|
+
n();
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
let i = document.createElement("script");
|
|
18
|
+
i.src = e.startsWith("//") ? `https:${e}` : e, i.async = !0, i.onload = () => {
|
|
19
|
+
t.add(e), n();
|
|
20
|
+
}, i.onerror = () => {
|
|
21
|
+
r(/* @__PURE__ */ Error(`[MeIcon] Failed to load iconfont: ${e}`));
|
|
22
|
+
}, document.head.appendChild(i);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
var r = e;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { e as MeIcon, r as default, n as loadIconfont };
|
package/dist/icon.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.me-icon{vertical-align:middle;box-sizing:border-box;flex-shrink:0;justify-content:center;align-items:center;line-height:1;display:inline-flex}.me-icon--remixicon,.me-icon--iconfont-class{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-style:normal}.me-icon--iconfont-symbol{vertical-align:-.15em;fill:currentColor;width:1em;height:1em;overflow:hidden}.me-icon--lucide,.me-icon--svg{vertical-align:middle;display:inline-block}.me-icon--svg-file{vertical-align:middle;object-fit:contain;display:inline-block}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import { App } from 'vue';
|
|
2
|
-
import { default as MeMessage, MeMessageComponent } from './
|
|
3
|
-
import { default as MeIcon } from './
|
|
4
|
-
import { default as MeBox } from './
|
|
5
|
-
import { default as MeBreadcrumb } from './
|
|
6
|
-
import { default as MeBody } from './
|
|
7
|
-
import { default as MeMenu } from './
|
|
8
|
-
import { default as MeNav } from './
|
|
9
|
-
import { default as MeModal } from './
|
|
10
|
-
import { default as MeTreeMenu } from './
|
|
11
|
-
import { default as MeInputGps } from './
|
|
12
|
-
import { default as MeInputIconSelector } from './
|
|
13
|
-
import { default as MeInputRadio } from './
|
|
14
|
-
import { default as MeLoadJson } from './
|
|
15
|
-
import { default as MeLoginPage } from './
|
|
16
|
-
import { default as MeCard } from './
|
|
17
|
-
import { default as MeSkeleton } from './
|
|
2
|
+
import { default as MeMessage, MeMessageComponent } from './message';
|
|
3
|
+
import { default as MeIcon } from './icon';
|
|
4
|
+
import { default as MeBox } from './box';
|
|
5
|
+
import { default as MeBreadcrumb } from './breadcrumb';
|
|
6
|
+
import { default as MeBody } from './body';
|
|
7
|
+
import { default as MeMenu } from './menu';
|
|
8
|
+
import { default as MeNav } from './nav';
|
|
9
|
+
import { default as MeModal } from './modal';
|
|
10
|
+
import { default as MeTreeMenu } from './tree-menu';
|
|
11
|
+
import { default as MeInputGps } from './input-gps';
|
|
12
|
+
import { default as MeInputIconSelector } from './input-icon-selector';
|
|
13
|
+
import { default as MeInputRadio } from './input-radio';
|
|
14
|
+
import { default as MeLoadJson } from './load-json';
|
|
15
|
+
import { default as MeLoginPage } from './login-page';
|
|
16
|
+
import { default as MeCard } from './card';
|
|
17
|
+
import { default as MeSkeleton } from './skeleton';
|
|
18
18
|
declare const install: (app: App) => void;
|
|
19
19
|
export { MeMessage, MeMessageComponent, MeIcon, MeBox, MeBreadcrumb, MeBody, MeMenu, MeNav, MeModal, MeTreeMenu, MeInputGps, MeInputIconSelector, MeInputRadio, MeLoadJson, MeLoginPage, MeCard, MeSkeleton, install };
|
|
20
|
-
export { MeMessage as $message } from './
|
|
21
|
-
export { loadIconfont } from './
|
|
20
|
+
export { MeMessage as $message } from './message';
|
|
21
|
+
export { loadIconfont } from './icon';
|
|
22
22
|
declare const _default: {
|
|
23
23
|
install: (app: App) => void;
|
|
24
24
|
version: string;
|
|
25
25
|
};
|
|
26
26
|
export default _default;
|
|
27
27
|
export * from './types';
|
|
28
|
-
export * from './
|
|
29
|
-
export * from './
|
|
30
|
-
export * from './
|
|
31
|
-
export * from './
|
|
32
|
-
export * from './
|
|
33
|
-
export * from './
|
|
34
|
-
export * from './
|
|
35
|
-
export * from './
|
|
36
|
-
export * from './
|
|
37
|
-
export * from './
|
|
38
|
-
export * from './
|
|
39
|
-
export * from './
|
|
40
|
-
export * from './
|
|
41
|
-
export * from './
|
|
42
|
-
export * from './
|
|
43
|
-
export * from './
|
|
28
|
+
export * from './message';
|
|
29
|
+
export * from './icon';
|
|
30
|
+
export * from './box';
|
|
31
|
+
export * from './breadcrumb';
|
|
32
|
+
export * from './body';
|
|
33
|
+
export * from './menu';
|
|
34
|
+
export * from './nav';
|
|
35
|
+
export * from './modal';
|
|
36
|
+
export * from './tree-menu';
|
|
37
|
+
export * from './input-gps';
|
|
38
|
+
export * from './input-icon-selector';
|
|
39
|
+
export * from './input-radio';
|
|
40
|
+
export * from './load-json';
|
|
41
|
+
export * from './login-page';
|
|
42
|
+
export * from './card';
|
|
43
|
+
export * from './skeleton';
|