x-essential-lib 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/composables/hotkey.d.ts +1 -1
- package/dist/index.js +293 -278
- package/dist/utils/index.d.ts +7 -8
- package/dist/utils/router.d.ts +8 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function useHotkey(): {};
|
|
1
|
+
export declare function useHotkey(prod: boolean): {};
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('.inner-left-enter-active,.inner-right-enter-active{transition:transform .35s ease}.inner-left-enter-from{transform:translate(-100%)}.inner-right-enter-from{transform:translate(100%)}.inner-left-enter-to,.inner-right-enter-to{transform:translate(0)}.x-cont[data-v-a8f3d91f]{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;align-items:center;justify-content:center}.lds-spinner[data-v-a8f3d91f]{color:official;display:inline-block;position:relative;width:40px;height:40px}.lds-spinner div[data-v-a8f3d91f]{transform-origin:20px 20px;animation:lds-spinner-a8f3d91f 1.2s linear infinite}.lds-spinner div[data-v-a8f3d91f]:after{content:" ";display:block;position:absolute;top:3px;left:18px;width:2px;height:6px;border-radius:5%;background:#9e9e9e}.lds-spinner div[data-v-a8f3d91f]:nth-child(1){transform:rotate(0);animation-delay:-1.1s}.lds-spinner div[data-v-a8f3d91f]:nth-child(2){transform:rotate(30deg);animation-delay:-1s}.lds-spinner div[data-v-a8f3d91f]:nth-child(3){transform:rotate(60deg);animation-delay:-.9s}.lds-spinner div[data-v-a8f3d91f]:nth-child(4){transform:rotate(90deg);animation-delay:-.8s}.lds-spinner div[data-v-a8f3d91f]:nth-child(5){transform:rotate(120deg);animation-delay:-.7s}.lds-spinner div[data-v-a8f3d91f]:nth-child(6){transform:rotate(150deg);animation-delay:-.6s}.lds-spinner div[data-v-a8f3d91f]:nth-child(7){transform:rotate(180deg);animation-delay:-.5s}.lds-spinner div[data-v-a8f3d91f]:nth-child(8){transform:rotate(210deg);animation-delay:-.4s}.lds-spinner div[data-v-a8f3d91f]:nth-child(9){transform:rotate(240deg);animation-delay:-.3s}.lds-spinner div[data-v-a8f3d91f]:nth-child(10){transform:rotate(270deg);animation-delay:-.2s}.lds-spinner div[data-v-a8f3d91f]:nth-child(11){transform:rotate(300deg);animation-delay:-.1s}.lds-spinner div[data-v-a8f3d91f]:nth-child(12){transform:rotate(330deg);animation-delay:0s}@keyframes lds-spinner-a8f3d91f{0%{opacity:1}to{opacity:0}}.x-cont[data-v-70ed4b89]{position:absolute;left:50%;bottom:20px;transform:translate(-50%);z-index:9999}')),document.head.appendChild(t)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
|
-
import { VAlert as
|
|
3
|
-
import { ref as
|
|
4
|
-
import { useLocale as F, useTheme as
|
|
5
|
-
import { defineStore as
|
|
6
|
-
import { useI18n as
|
|
7
|
-
import
|
|
8
|
-
const
|
|
9
|
-
const e =
|
|
2
|
+
import { VAlert as ye, VBtn as ke, VCard as be, VCardActions as Ce, VCardText as Ve, VCardTitle as De, VDialog as Se, VForm as qe, VTextField as Oe } from "vuetify/lib/components/index.mjs";
|
|
3
|
+
import { ref as m, computed as f, onMounted as q, onBeforeUnmount as O, defineComponent as R, watch as T, resolveComponent as v, openBlock as V, createBlock as A, unref as U, isRef as X, withKeys as W, withModifiers as $, withCtx as g, createVNode as h, createTextVNode as C, toDisplayString as b, createElementBlock as N, normalizeStyle as Re, pushScopeId as Ee, popScopeId as je, createElementVNode as _, reactive as Ie, Fragment as Pe, renderList as Te, inject as ae } from "vue";
|
|
4
|
+
import { useLocale as F, useTheme as H, useDisplay as $e } from "vuetify/lib/framework.mjs";
|
|
5
|
+
import { defineStore as se } from "pinia";
|
|
6
|
+
import { useI18n as Ae } from "vue-i18n";
|
|
7
|
+
import Me from "axios";
|
|
8
|
+
const ce = se("viewMgr", () => {
|
|
9
|
+
const e = m([]);
|
|
10
10
|
function n() {
|
|
11
11
|
return e.value.length <= 0;
|
|
12
12
|
}
|
|
@@ -25,7 +25,7 @@ const se = ae("viewMgr", () => {
|
|
|
25
25
|
}
|
|
26
26
|
return { isEmpty: n, hasView: t, addView: o, delView: r, popView: a };
|
|
27
27
|
});
|
|
28
|
-
function
|
|
28
|
+
function Be(e) {
|
|
29
29
|
return { all: e = e || /* @__PURE__ */ new Map(), on: function(n, t) {
|
|
30
30
|
var o = e.get(n);
|
|
31
31
|
o ? o.push(t) : e.set(n, [t]);
|
|
@@ -41,7 +41,7 @@ function Ae(e) {
|
|
|
41
41
|
});
|
|
42
42
|
} };
|
|
43
43
|
}
|
|
44
|
-
const
|
|
44
|
+
const i = Be();
|
|
45
45
|
async function xt(e) {
|
|
46
46
|
return new Promise((n) => {
|
|
47
47
|
setTimeout(n, e);
|
|
@@ -57,7 +57,7 @@ async function G(e, n, t) {
|
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
function J(e, n) {
|
|
60
|
-
const t =
|
|
60
|
+
const t = ce(), o = f({
|
|
61
61
|
get() {
|
|
62
62
|
return t.hasView(e);
|
|
63
63
|
},
|
|
@@ -68,49 +68,49 @@ function J(e, n) {
|
|
|
68
68
|
n == null || n(a), o.value = !0;
|
|
69
69
|
};
|
|
70
70
|
return q(() => {
|
|
71
|
-
|
|
72
|
-
}),
|
|
73
|
-
|
|
71
|
+
i.on(e, r);
|
|
72
|
+
}), O(() => {
|
|
73
|
+
i.off(e, r);
|
|
74
74
|
}), { open: o };
|
|
75
75
|
}
|
|
76
|
-
const
|
|
76
|
+
const Le = /* @__PURE__ */ R({
|
|
77
77
|
__name: "index",
|
|
78
78
|
setup(e) {
|
|
79
|
-
const n = F(), { open: t } = J("confirmDlg"), o =
|
|
80
|
-
var
|
|
81
|
-
return ((
|
|
82
|
-
}), p =
|
|
83
|
-
var
|
|
84
|
-
return ((
|
|
85
|
-
}),
|
|
86
|
-
var
|
|
87
|
-
return ((
|
|
88
|
-
}),
|
|
89
|
-
var
|
|
90
|
-
return ((
|
|
79
|
+
const n = F(), { open: t } = J("confirmDlg"), o = m(""), r = m(""), a = m(), l = m(), s = f(() => {
|
|
80
|
+
var d;
|
|
81
|
+
return ((d = a.value) == null ? void 0 : d.color) ?? "primary";
|
|
82
|
+
}), p = f(() => {
|
|
83
|
+
var d;
|
|
84
|
+
return ((d = a.value) == null ? void 0 : d.text) ?? n.t("cancel");
|
|
85
|
+
}), c = f(() => {
|
|
86
|
+
var d;
|
|
87
|
+
return ((d = l.value) == null ? void 0 : d.color) ?? "primary";
|
|
88
|
+
}), w = f(() => {
|
|
89
|
+
var d;
|
|
90
|
+
return ((d = l.value) == null ? void 0 : d.text) ?? n.t("confirm");
|
|
91
91
|
});
|
|
92
92
|
let E = 0, D = !1;
|
|
93
|
-
const
|
|
94
|
-
o.value =
|
|
93
|
+
const M = (d) => {
|
|
94
|
+
o.value = d.title, r.value = d.text, a.value = d.cancel, l.value = d.confirm, E = d.seq, D = !1, t.value = !0;
|
|
95
95
|
};
|
|
96
96
|
q(() => {
|
|
97
|
-
|
|
98
|
-
}),
|
|
99
|
-
|
|
97
|
+
i.on("confirmDlg", M);
|
|
98
|
+
}), O(() => {
|
|
99
|
+
i.off("confirmDlg", M);
|
|
100
100
|
});
|
|
101
101
|
const B = () => {
|
|
102
|
-
t.value = !1, D || (
|
|
102
|
+
t.value = !1, D || (i.emit("confirmDlgResult" + E, !0), D = !0);
|
|
103
103
|
};
|
|
104
|
-
return
|
|
105
|
-
!
|
|
106
|
-
}), (
|
|
107
|
-
const S = v("v-card-title"),
|
|
108
|
-
return
|
|
109
|
-
modelValue:
|
|
110
|
-
"onUpdate:modelValue":
|
|
104
|
+
return T(t, (d) => {
|
|
105
|
+
!d && !D && (i.emit("confirmDlgResult" + E, !1), D = !0);
|
|
106
|
+
}), (d, y) => {
|
|
107
|
+
const S = v("v-card-title"), L = v("v-card-text"), j = v("v-btn"), u = v("v-card-actions"), x = v("v-card"), z = v("v-dialog");
|
|
108
|
+
return V(), A(z, {
|
|
109
|
+
modelValue: U(t),
|
|
110
|
+
"onUpdate:modelValue": y[1] || (y[1] = (I) => X(t) ? t.value = I : null),
|
|
111
111
|
onKeydown: [
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
y[2] || (y[2] = W($((I) => t.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
113
|
+
W($(B, ["stop", "prevent"]), ["enter"])
|
|
114
114
|
],
|
|
115
115
|
transition: "dialog-top-transition",
|
|
116
116
|
"max-width": "600px"
|
|
@@ -120,35 +120,35 @@ const Be = /* @__PURE__ */ O({
|
|
|
120
120
|
default: g(() => [
|
|
121
121
|
h(S, null, {
|
|
122
122
|
default: g(() => [
|
|
123
|
-
b(
|
|
123
|
+
C(b(o.value), 1)
|
|
124
124
|
]),
|
|
125
125
|
_: 1
|
|
126
126
|
}),
|
|
127
|
-
h(
|
|
127
|
+
h(L, null, {
|
|
128
128
|
default: g(() => [
|
|
129
|
-
b(
|
|
129
|
+
C(b(r.value), 1)
|
|
130
130
|
]),
|
|
131
131
|
_: 1
|
|
132
132
|
}),
|
|
133
|
-
h(
|
|
133
|
+
h(u, { class: "d-flex justify-end" }, {
|
|
134
134
|
default: g(() => [
|
|
135
|
-
h(
|
|
136
|
-
onClick:
|
|
135
|
+
h(j, {
|
|
136
|
+
onClick: y[0] || (y[0] = (I) => t.value = !1),
|
|
137
137
|
color: s.value,
|
|
138
138
|
variant: "text"
|
|
139
139
|
}, {
|
|
140
140
|
default: g(() => [
|
|
141
|
-
b(
|
|
141
|
+
C(b(p.value), 1)
|
|
142
142
|
]),
|
|
143
143
|
_: 1
|
|
144
144
|
}, 8, ["color"]),
|
|
145
|
-
h(
|
|
145
|
+
h(j, {
|
|
146
146
|
onClick: B,
|
|
147
|
-
color:
|
|
147
|
+
color: c.value,
|
|
148
148
|
variant: "text"
|
|
149
149
|
}, {
|
|
150
150
|
default: g(() => [
|
|
151
|
-
b(
|
|
151
|
+
C(b(w.value), 1)
|
|
152
152
|
]),
|
|
153
153
|
_: 1
|
|
154
154
|
}, 8, ["color"])
|
|
@@ -163,7 +163,7 @@ const Be = /* @__PURE__ */ O({
|
|
|
163
163
|
}, 8, ["modelValue", "onKeydown"]);
|
|
164
164
|
};
|
|
165
165
|
}
|
|
166
|
-
}),
|
|
166
|
+
}), Ke = (e) => (Ee("data-v-a8f3d91f"), e = e(), je(), e), Ue = /* @__PURE__ */ Ke(() => /* @__PURE__ */ _("div", { class: "lds-spinner" }, [
|
|
167
167
|
/* @__PURE__ */ _("div"),
|
|
168
168
|
/* @__PURE__ */ _("div"),
|
|
169
169
|
/* @__PURE__ */ _("div"),
|
|
@@ -176,9 +176,9 @@ const Be = /* @__PURE__ */ O({
|
|
|
176
176
|
/* @__PURE__ */ _("div"),
|
|
177
177
|
/* @__PURE__ */ _("div"),
|
|
178
178
|
/* @__PURE__ */ _("div")
|
|
179
|
-
], -1)),
|
|
180
|
-
|
|
181
|
-
],
|
|
179
|
+
], -1)), We = [
|
|
180
|
+
Ue
|
|
181
|
+
], He = /* @__PURE__ */ R({
|
|
182
182
|
__name: "index",
|
|
183
183
|
props: {
|
|
184
184
|
zIndex: {
|
|
@@ -187,21 +187,21 @@ const Be = /* @__PURE__ */ O({
|
|
|
187
187
|
}
|
|
188
188
|
},
|
|
189
189
|
setup(e) {
|
|
190
|
-
const n =
|
|
190
|
+
const n = H(), t = e, o = f(() => ({
|
|
191
191
|
background: n.current.value.dark ? "#1e1e1e" : "#ffffff",
|
|
192
192
|
zIndex: t.zIndex
|
|
193
193
|
}));
|
|
194
|
-
return (r, a) => (
|
|
194
|
+
return (r, a) => (V(), N("div", {
|
|
195
195
|
class: "x-cont",
|
|
196
196
|
style: Re(o.value)
|
|
197
|
-
},
|
|
197
|
+
}, We, 4));
|
|
198
198
|
}
|
|
199
|
-
}),
|
|
199
|
+
}), ie = (e, n) => {
|
|
200
200
|
const t = e.__vccOpts || e;
|
|
201
201
|
for (const [o, r] of n)
|
|
202
202
|
t[o] = r;
|
|
203
203
|
return t;
|
|
204
|
-
},
|
|
204
|
+
}, ze = /* @__PURE__ */ ie(He, [["__scopeId", "data-v-a8f3d91f"]]), Ne = /* @__PURE__ */ R({
|
|
205
205
|
__name: "item",
|
|
206
206
|
props: {
|
|
207
207
|
id: {
|
|
@@ -223,7 +223,7 @@ const Be = /* @__PURE__ */ O({
|
|
|
223
223
|
},
|
|
224
224
|
emits: ["timeout"],
|
|
225
225
|
setup(e, { emit: n }) {
|
|
226
|
-
const t = e, o =
|
|
226
|
+
const t = e, o = m(!0), r = n, a = f(() => {
|
|
227
227
|
let l = "";
|
|
228
228
|
switch (t.type) {
|
|
229
229
|
case "error":
|
|
@@ -245,13 +245,13 @@ const Be = /* @__PURE__ */ O({
|
|
|
245
245
|
setTimeout(() => {
|
|
246
246
|
r("timeout", t.id);
|
|
247
247
|
}, t.timeout);
|
|
248
|
-
}),
|
|
248
|
+
}), T(o, (l) => {
|
|
249
249
|
l || r("timeout", t.id);
|
|
250
250
|
}), (l, s) => {
|
|
251
251
|
const p = v("v-alert");
|
|
252
|
-
return
|
|
252
|
+
return V(), A(p, {
|
|
253
253
|
modelValue: o.value,
|
|
254
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
254
|
+
"onUpdate:modelValue": s[0] || (s[0] = (c) => o.value = c),
|
|
255
255
|
class: "mt-2",
|
|
256
256
|
type: e.type,
|
|
257
257
|
icon: a.value,
|
|
@@ -264,14 +264,14 @@ const Be = /* @__PURE__ */ O({
|
|
|
264
264
|
}, null, 8, ["modelValue", "type", "icon", "text"]);
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
|
-
}),
|
|
267
|
+
}), Xe = /* @__PURE__ */ R({
|
|
268
268
|
__name: "index",
|
|
269
269
|
setup(e) {
|
|
270
270
|
const n = Ie({ items: [] });
|
|
271
271
|
q(() => {
|
|
272
|
-
|
|
273
|
-
}),
|
|
274
|
-
|
|
272
|
+
i.on("message", t);
|
|
273
|
+
}), O(() => {
|
|
274
|
+
i.off("message", t);
|
|
275
275
|
});
|
|
276
276
|
const t = (s) => {
|
|
277
277
|
a(s.type, s.text, s.timeout);
|
|
@@ -279,119 +279,119 @@ const Be = /* @__PURE__ */ O({
|
|
|
279
279
|
l(s);
|
|
280
280
|
};
|
|
281
281
|
let r = 0;
|
|
282
|
-
const a = (s, p,
|
|
283
|
-
const
|
|
284
|
-
n.items.push({ id:
|
|
282
|
+
const a = (s, p, c) => {
|
|
283
|
+
const w = r++;
|
|
284
|
+
n.items.push({ id: w, type: s, text: p, timeout: c });
|
|
285
285
|
}, l = (s) => {
|
|
286
|
-
const p = n.items.findIndex((
|
|
286
|
+
const p = n.items.findIndex((c) => c.id === s);
|
|
287
287
|
p >= 0 && n.items.splice(p, 1);
|
|
288
288
|
};
|
|
289
|
-
return (s, p) => (
|
|
290
|
-
onClick: p[0] || (p[0] =
|
|
289
|
+
return (s, p) => (V(), N("div", {
|
|
290
|
+
onClick: p[0] || (p[0] = $(() => {
|
|
291
291
|
}, ["stop"])),
|
|
292
292
|
class: "x-cont d-flex flex-column-reverse align-center"
|
|
293
293
|
}, [
|
|
294
|
-
(
|
|
294
|
+
(V(!0), N(Pe, null, Te(n.items, (c) => (V(), A(Ne, {
|
|
295
295
|
onTimeout: o,
|
|
296
|
-
id:
|
|
297
|
-
type:
|
|
298
|
-
text:
|
|
299
|
-
timeout:
|
|
300
|
-
key:
|
|
296
|
+
id: c.id,
|
|
297
|
+
type: c.type,
|
|
298
|
+
text: c.text,
|
|
299
|
+
timeout: c.timeout,
|
|
300
|
+
key: c.id
|
|
301
301
|
}, null, 8, ["id", "type", "text", "timeout"]))), 128))
|
|
302
302
|
]));
|
|
303
303
|
}
|
|
304
|
-
}),
|
|
304
|
+
}), Fe = /* @__PURE__ */ ie(Xe, [["__scopeId", "data-v-70ed4b89"]]), Ge = /* @__PURE__ */ R({
|
|
305
305
|
__name: "index",
|
|
306
306
|
setup(e) {
|
|
307
|
-
const n = F(), { open: t } = J("promptDlg"), o =
|
|
308
|
-
var
|
|
309
|
-
return ((
|
|
310
|
-
}), D =
|
|
311
|
-
var
|
|
312
|
-
return ((
|
|
313
|
-
}),
|
|
314
|
-
var
|
|
315
|
-
return ((
|
|
316
|
-
}), B =
|
|
317
|
-
var
|
|
318
|
-
return ((
|
|
319
|
-
}),
|
|
320
|
-
let
|
|
321
|
-
const
|
|
307
|
+
const n = F(), { open: t } = J("promptDlg"), o = m(""), r = m(""), a = m(), l = m(), s = m(), p = m(""), c = m(), w = m(), E = f(() => {
|
|
308
|
+
var u;
|
|
309
|
+
return ((u = c.value) == null ? void 0 : u.color) ?? "primary";
|
|
310
|
+
}), D = f(() => {
|
|
311
|
+
var u;
|
|
312
|
+
return ((u = c.value) == null ? void 0 : u.text) ?? n.t("cancel");
|
|
313
|
+
}), M = f(() => {
|
|
314
|
+
var u;
|
|
315
|
+
return ((u = w.value) == null ? void 0 : u.color) ?? "primary";
|
|
316
|
+
}), B = f(() => {
|
|
317
|
+
var u;
|
|
318
|
+
return ((u = w.value) == null ? void 0 : u.text) ?? n.t("confirm");
|
|
319
|
+
}), d = m();
|
|
320
|
+
let y = 0, S = !1;
|
|
321
|
+
const L = async (u) => {
|
|
322
322
|
var x;
|
|
323
|
-
o.value =
|
|
323
|
+
o.value = u.title, r.value = u.text, a.value = u.label, l.value = u.placeholder, s.value = u.rules, p.value = u.value, c.value = u.cancel, w.value = u.confirm, y = u.seq, S = !1, t.value = !0, await G(() => d.value !== void 0, 1e3), (x = d.value) == null || x.focus();
|
|
324
324
|
};
|
|
325
325
|
q(() => {
|
|
326
|
-
|
|
327
|
-
}),
|
|
328
|
-
|
|
326
|
+
i.on("promptDlg", L);
|
|
327
|
+
}), O(() => {
|
|
328
|
+
i.off("promptDlg", L);
|
|
329
329
|
});
|
|
330
|
-
const
|
|
331
|
-
t.value = !1, S || (
|
|
330
|
+
const j = () => {
|
|
331
|
+
t.value = !1, S || (i.emit("promptDlgResult" + y, p.value ?? ""), S = !0);
|
|
332
332
|
};
|
|
333
|
-
return
|
|
334
|
-
!
|
|
335
|
-
}), (
|
|
336
|
-
const z = v("v-card-title"),
|
|
337
|
-
return
|
|
338
|
-
modelValue:
|
|
339
|
-
"onUpdate:modelValue": x[2] || (x[2] = (
|
|
333
|
+
return T(t, (u) => {
|
|
334
|
+
!u && !S && (i.emit("promptDlgResult" + y, void 0), S = !0);
|
|
335
|
+
}), (u, x) => {
|
|
336
|
+
const z = v("v-card-title"), I = v("v-card-text"), ge = v("v-text-field"), _e = v("v-form"), Y = v("v-btn"), he = v("v-card-actions"), xe = v("v-card"), we = v("v-dialog");
|
|
337
|
+
return V(), A(we, {
|
|
338
|
+
modelValue: U(t),
|
|
339
|
+
"onUpdate:modelValue": x[2] || (x[2] = (P) => X(t) ? t.value = P : null),
|
|
340
340
|
onKeydown: [
|
|
341
|
-
x[3] || (x[3] =
|
|
342
|
-
|
|
341
|
+
x[3] || (x[3] = W($((P) => t.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
342
|
+
W($(j, ["stop", "prevent"]), ["enter"])
|
|
343
343
|
],
|
|
344
344
|
transition: "dialog-top-transition",
|
|
345
345
|
"max-width": "600px"
|
|
346
346
|
}, {
|
|
347
347
|
default: g(() => [
|
|
348
|
-
h(
|
|
348
|
+
h(xe, null, {
|
|
349
349
|
default: g(() => [
|
|
350
350
|
h(z, null, {
|
|
351
351
|
default: g(() => [
|
|
352
|
-
b(
|
|
352
|
+
C(b(o.value), 1)
|
|
353
353
|
]),
|
|
354
354
|
_: 1
|
|
355
355
|
}),
|
|
356
|
-
h(
|
|
356
|
+
h(I, null, {
|
|
357
357
|
default: g(() => [
|
|
358
|
-
b(
|
|
358
|
+
C(b(r.value), 1)
|
|
359
359
|
]),
|
|
360
360
|
_: 1
|
|
361
361
|
}),
|
|
362
|
-
h(
|
|
362
|
+
h(_e, { class: "mx-3" }, {
|
|
363
363
|
default: g(() => [
|
|
364
|
-
h(
|
|
364
|
+
h(ge, {
|
|
365
365
|
modelValue: p.value,
|
|
366
|
-
"onUpdate:modelValue": x[0] || (x[0] = (
|
|
366
|
+
"onUpdate:modelValue": x[0] || (x[0] = (P) => p.value = P),
|
|
367
367
|
label: a.value,
|
|
368
368
|
placeholder: l.value,
|
|
369
369
|
rules: s.value,
|
|
370
370
|
ref_key: "target",
|
|
371
|
-
ref:
|
|
371
|
+
ref: d
|
|
372
372
|
}, null, 8, ["modelValue", "label", "placeholder", "rules"])
|
|
373
373
|
]),
|
|
374
374
|
_: 1
|
|
375
375
|
}),
|
|
376
|
-
h(
|
|
376
|
+
h(he, { class: "d-flex justify-end" }, {
|
|
377
377
|
default: g(() => [
|
|
378
|
-
h(
|
|
379
|
-
onClick: x[1] || (x[1] = (
|
|
378
|
+
h(Y, {
|
|
379
|
+
onClick: x[1] || (x[1] = (P) => t.value = !1),
|
|
380
380
|
color: E.value,
|
|
381
381
|
variant: "text"
|
|
382
382
|
}, {
|
|
383
383
|
default: g(() => [
|
|
384
|
-
b(
|
|
384
|
+
C(b(D.value), 1)
|
|
385
385
|
]),
|
|
386
386
|
_: 1
|
|
387
387
|
}, 8, ["color"]),
|
|
388
|
-
h(
|
|
389
|
-
onClick:
|
|
390
|
-
color:
|
|
388
|
+
h(Y, {
|
|
389
|
+
onClick: j,
|
|
390
|
+
color: M.value,
|
|
391
391
|
variant: "text"
|
|
392
392
|
}, {
|
|
393
393
|
default: g(() => [
|
|
394
|
-
b(
|
|
394
|
+
C(b(B.value), 1)
|
|
395
395
|
]),
|
|
396
396
|
_: 1
|
|
397
397
|
}, 8, ["color"])
|
|
@@ -406,7 +406,7 @@ const Be = /* @__PURE__ */ O({
|
|
|
406
406
|
}, 8, ["modelValue", "onKeydown"]);
|
|
407
407
|
};
|
|
408
408
|
}
|
|
409
|
-
}),
|
|
409
|
+
}), Je = { class: "mx-auto my-auto" }, Qe = { class: "d-flex align-center justify-center w-100 h-100" }, Ye = /* @__PURE__ */ R({
|
|
410
410
|
__name: "index",
|
|
411
411
|
setup(e) {
|
|
412
412
|
const n = F(), { open: t } = J("waitDlg"), o = () => {
|
|
@@ -415,28 +415,28 @@ const Be = /* @__PURE__ */ O({
|
|
|
415
415
|
t.value = !1;
|
|
416
416
|
};
|
|
417
417
|
return q(() => {
|
|
418
|
-
|
|
419
|
-
}),
|
|
420
|
-
|
|
418
|
+
i.on("openWaitDlg", o), i.on("closeWaitDlg", r);
|
|
419
|
+
}), O(() => {
|
|
420
|
+
i.off("openWaitDlg", o), i.off("closeWaitDlg", r);
|
|
421
421
|
}), (a, l) => {
|
|
422
422
|
const s = v("v-card"), p = v("v-dialog");
|
|
423
|
-
return
|
|
424
|
-
modelValue:
|
|
425
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
423
|
+
return V(), A(p, {
|
|
424
|
+
modelValue: U(t),
|
|
425
|
+
"onUpdate:modelValue": l[0] || (l[0] = (c) => X(t) ? t.value = c : null),
|
|
426
426
|
persistent: "",
|
|
427
427
|
"no-click-animation": "",
|
|
428
428
|
fullscreen: ""
|
|
429
429
|
}, {
|
|
430
430
|
default: g(() => [
|
|
431
|
-
_("div",
|
|
431
|
+
_("div", Je, [
|
|
432
432
|
h(s, {
|
|
433
433
|
width: "300px",
|
|
434
434
|
height: "80px",
|
|
435
435
|
loading: ""
|
|
436
436
|
}, {
|
|
437
437
|
default: g(() => [
|
|
438
|
-
_("div",
|
|
439
|
-
_("span", null,
|
|
438
|
+
_("div", Qe, [
|
|
439
|
+
_("span", null, b(U(n).t("waitingResponse")), 1)
|
|
440
440
|
])
|
|
441
441
|
]),
|
|
442
442
|
_: 1
|
|
@@ -447,11 +447,11 @@ const Be = /* @__PURE__ */ O({
|
|
|
447
447
|
}, 8, ["modelValue"]);
|
|
448
448
|
};
|
|
449
449
|
}
|
|
450
|
-
}),
|
|
451
|
-
e.component("v-alert",
|
|
450
|
+
}), Ze = (e) => {
|
|
451
|
+
e.component("v-alert", ye), e.component("v-btn", ke), e.component("v-card", be), e.component("v-card-actions", Ce), e.component("v-card-text", Ve), e.component("v-card-title", De), e.component("v-dialog", Se), e.component("v-form", qe), e.component("v-text-field", Oe), e.component("x-confirm-dlg", Le), e.component("x-loading", ze), e.component("x-message", Fe), e.component("x-prompt-dlg", Ge), e.component("x-wait-dlg", Ye);
|
|
452
452
|
};
|
|
453
453
|
function wt() {
|
|
454
|
-
const e =
|
|
454
|
+
const e = H(), n = f(() => e.global.current.value.colors.primary), t = f(() => e.global.current.value.colors.secondary), o = f(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), r = f(() => e.current.value.dark ? "#272727" : "#eeeeee"), a = f(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), l = f(() => e.current.value.dark ? "#303030" : "#f6f6f6"), s = f(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
|
|
455
455
|
return {
|
|
456
456
|
primaryColor: n,
|
|
457
457
|
secondaryColor: t,
|
|
@@ -462,30 +462,30 @@ function wt() {
|
|
|
462
462
|
borderColor: s
|
|
463
463
|
};
|
|
464
464
|
}
|
|
465
|
-
var
|
|
465
|
+
var ue = {}, Z;
|
|
466
466
|
(function(e) {
|
|
467
467
|
e.pop = "pop", e.push = "push";
|
|
468
|
-
})(Y || (Y = {}));
|
|
469
|
-
var Z;
|
|
470
|
-
(function(e) {
|
|
471
|
-
e.back = "back", e.forward = "forward", e.unknown = "";
|
|
472
468
|
})(Z || (Z = {}));
|
|
473
469
|
var ee;
|
|
474
470
|
(function(e) {
|
|
475
|
-
e
|
|
471
|
+
e.back = "back", e.forward = "forward", e.unknown = "";
|
|
476
472
|
})(ee || (ee = {}));
|
|
477
|
-
|
|
478
|
-
function
|
|
479
|
-
|
|
473
|
+
var te;
|
|
474
|
+
(function(e) {
|
|
475
|
+
e[e.aborted = 4] = "aborted", e[e.cancelled = 8] = "cancelled", e[e.duplicated = 16] = "duplicated";
|
|
476
|
+
})(te || (te = {}));
|
|
477
|
+
const et = Symbol(ue.NODE_ENV !== "production" ? "router" : ""), tt = Symbol(ue.NODE_ENV !== "production" ? "route location" : "");
|
|
478
|
+
function de() {
|
|
479
|
+
return ae(et);
|
|
480
480
|
}
|
|
481
|
-
function
|
|
482
|
-
return
|
|
481
|
+
function nt() {
|
|
482
|
+
return ae(tt);
|
|
483
483
|
}
|
|
484
|
-
const
|
|
484
|
+
const ot = se(
|
|
485
485
|
"global",
|
|
486
486
|
() => {
|
|
487
|
-
const e =
|
|
488
|
-
|
|
487
|
+
const e = H(), n = Ae(), t = m(!1);
|
|
488
|
+
T(
|
|
489
489
|
t,
|
|
490
490
|
(l) => {
|
|
491
491
|
e.global.name.value = l ? "dark" : "light";
|
|
@@ -494,8 +494,8 @@ const nt = ae(
|
|
|
494
494
|
immediate: !0
|
|
495
495
|
}
|
|
496
496
|
);
|
|
497
|
-
const o =
|
|
498
|
-
|
|
497
|
+
const o = m("en");
|
|
498
|
+
T(
|
|
499
499
|
o,
|
|
500
500
|
(l) => {
|
|
501
501
|
n.locale.value = l;
|
|
@@ -504,7 +504,7 @@ const nt = ae(
|
|
|
504
504
|
immediate: !0
|
|
505
505
|
}
|
|
506
506
|
);
|
|
507
|
-
const r =
|
|
507
|
+
const r = m({}), a = m("");
|
|
508
508
|
return { dark: t, locale: o, permissionObjects: r, permissionChecksum: a };
|
|
509
509
|
},
|
|
510
510
|
{
|
|
@@ -515,124 +515,92 @@ const nt = ae(
|
|
|
515
515
|
}
|
|
516
516
|
]
|
|
517
517
|
}
|
|
518
|
-
);
|
|
519
|
-
function yt() {
|
|
520
|
-
const
|
|
521
|
-
nt();
|
|
522
|
-
const t = se(), o = (a) => {
|
|
523
|
-
if (console.log("onKeydown", a), a.key === "Escape") {
|
|
524
|
-
r();
|
|
525
|
-
return;
|
|
526
|
-
}
|
|
527
|
-
}, r = () => {
|
|
528
|
-
var a;
|
|
529
|
-
if (!t.isEmpty()) {
|
|
530
|
-
t.hasView("waitDlg") || t.popView();
|
|
531
|
-
return;
|
|
532
|
-
}
|
|
533
|
-
e.meta.level === 0 ? (a = navigator == null ? void 0 : navigator.Backbutton) == null || a.goHome(
|
|
534
|
-
() => {
|
|
535
|
-
},
|
|
536
|
-
() => {
|
|
537
|
-
}
|
|
538
|
-
) : n.back();
|
|
539
|
-
};
|
|
540
|
-
return q(() => {
|
|
541
|
-
window.addEventListener("keydown", o, !1), console.log("onMounted");
|
|
542
|
-
}), R(() => {
|
|
543
|
-
window.removeEventListener("keydown", o, !1), console.log("onBeforeUnmount");
|
|
544
|
-
}), {};
|
|
545
|
-
}
|
|
546
|
-
function kt() {
|
|
547
|
-
const e = N(), { width: n } = Pe(), t = d(() => e.global.name.value), o = d(() => !!window.cordova), r = d(() => n.value <= 1280 ? n.value + "px" : n.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
|
|
548
|
-
return { dark: t, sysBarAvail: o, compactWidth: r };
|
|
549
|
-
}
|
|
550
|
-
const W = require("js-cookie");
|
|
551
|
-
function bt(e) {
|
|
552
|
-
const n = $e.create({
|
|
518
|
+
), K = require("js-cookie");
|
|
519
|
+
function yt(e) {
|
|
520
|
+
const n = Me.create({
|
|
553
521
|
timeout: 6e3
|
|
554
522
|
});
|
|
555
523
|
return n.defaults.baseURL = e.baseUrl, n.interceptors.request.use(
|
|
556
|
-
(t) =>
|
|
524
|
+
(t) => rt(t),
|
|
557
525
|
(t) => {
|
|
558
|
-
|
|
526
|
+
lt(t, e.onError);
|
|
559
527
|
}
|
|
560
528
|
), n.interceptors.response.use(
|
|
561
|
-
(t) =>
|
|
562
|
-
(t) =>
|
|
529
|
+
(t) => at(t),
|
|
530
|
+
(t) => st(t, e.onError)
|
|
563
531
|
), n;
|
|
564
532
|
}
|
|
565
|
-
function
|
|
566
|
-
const n =
|
|
533
|
+
function rt(e) {
|
|
534
|
+
const n = K.get("accessToken") ?? "";
|
|
567
535
|
return e.headers.Authorization = "Basic " + n, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
|
|
568
536
|
}
|
|
569
|
-
function
|
|
537
|
+
function lt(e, n) {
|
|
570
538
|
console.error(e), n("request timeout");
|
|
571
539
|
}
|
|
572
|
-
function
|
|
540
|
+
function at(e) {
|
|
573
541
|
return e.data;
|
|
574
542
|
}
|
|
575
|
-
function
|
|
543
|
+
function st(e, n) {
|
|
576
544
|
var r;
|
|
577
545
|
const t = e.response;
|
|
578
546
|
if (!t)
|
|
579
547
|
return Promise.reject(e);
|
|
580
|
-
t.status === 401 &&
|
|
548
|
+
t.status === 401 && ct();
|
|
581
549
|
let o = (r = t.data) == null ? void 0 : r.message;
|
|
582
550
|
return o || (o = {
|
|
583
551
|
code: t.status,
|
|
584
552
|
message: t.statusText
|
|
585
553
|
}), n(o), Promise.reject(e);
|
|
586
554
|
}
|
|
587
|
-
function
|
|
588
|
-
|
|
555
|
+
function ct() {
|
|
556
|
+
K.remove("accessToken"), K.remove("refreshToken"), K.remove("activeOrg"), de().replace({ path: "/passport/login" });
|
|
589
557
|
}
|
|
590
|
-
let
|
|
591
|
-
function
|
|
558
|
+
let ne = Date.now();
|
|
559
|
+
function pe() {
|
|
592
560
|
const e = Date.now();
|
|
593
|
-
return e -
|
|
561
|
+
return e - ne > 500 ? (ne = e, !0) : !1;
|
|
594
562
|
}
|
|
595
|
-
let
|
|
596
|
-
function
|
|
597
|
-
return ++
|
|
563
|
+
let it = 0;
|
|
564
|
+
function fe() {
|
|
565
|
+
return ++it;
|
|
598
566
|
}
|
|
599
|
-
async function
|
|
600
|
-
if (!
|
|
567
|
+
async function kt(e) {
|
|
568
|
+
if (!pe())
|
|
601
569
|
return;
|
|
602
570
|
let n = !1, t;
|
|
603
571
|
const o = (a) => {
|
|
604
572
|
t = a, n = !0;
|
|
605
|
-
}, r =
|
|
606
|
-
return
|
|
573
|
+
}, r = fe();
|
|
574
|
+
return i.on("confirmDlgResult" + r, o), i.emit("confirmDlg", { ...e, seq: r }), await G(() => n), i.off("confirmDlgResult" + r, o), t;
|
|
607
575
|
}
|
|
608
|
-
async function
|
|
609
|
-
if (!
|
|
576
|
+
async function bt(e) {
|
|
577
|
+
if (!pe())
|
|
610
578
|
return;
|
|
611
579
|
let n = !1, t;
|
|
612
580
|
const o = (a) => {
|
|
613
581
|
t = a, n = !0;
|
|
614
|
-
}, r =
|
|
615
|
-
return
|
|
582
|
+
}, r = fe();
|
|
583
|
+
return i.on("promptDlgResult" + r, o), i.emit("promptDlg", { ...e, seq: r }), await G(() => n), i.off("promptDlgResult" + r, o), t;
|
|
616
584
|
}
|
|
617
|
-
function
|
|
618
|
-
|
|
585
|
+
function Ct() {
|
|
586
|
+
i.emit("openWaitDlg");
|
|
619
587
|
}
|
|
620
|
-
function
|
|
621
|
-
|
|
588
|
+
function Vt() {
|
|
589
|
+
i.emit("closeWaitDlg");
|
|
622
590
|
}
|
|
623
|
-
function
|
|
624
|
-
|
|
591
|
+
function Dt(e, n) {
|
|
592
|
+
i.emit("message", { type: "error", text: e, timeout: n });
|
|
625
593
|
}
|
|
626
|
-
function
|
|
627
|
-
|
|
594
|
+
function St(e, n) {
|
|
595
|
+
i.emit("message", { type: "info", text: e, timeout: n });
|
|
628
596
|
}
|
|
629
|
-
function
|
|
630
|
-
|
|
597
|
+
function qt(e, n) {
|
|
598
|
+
i.emit("message", { type: "success", text: e, timeout: n });
|
|
631
599
|
}
|
|
632
|
-
function
|
|
633
|
-
|
|
600
|
+
function Ot(e, n) {
|
|
601
|
+
i.emit("message", { type: "warning", text: e, timeout: n });
|
|
634
602
|
}
|
|
635
|
-
function
|
|
603
|
+
function Rt(e) {
|
|
636
604
|
var o, r;
|
|
637
605
|
if (!window.appAppear) {
|
|
638
606
|
window.appAppear = !0;
|
|
@@ -643,8 +611,11 @@ function It(e) {
|
|
|
643
611
|
t.add("app-reset");
|
|
644
612
|
}, 0));
|
|
645
613
|
}
|
|
646
|
-
let
|
|
647
|
-
function
|
|
614
|
+
let me = {};
|
|
615
|
+
function Et(e) {
|
|
616
|
+
me = e;
|
|
617
|
+
}
|
|
618
|
+
function oe(e, n) {
|
|
648
619
|
if (!e)
|
|
649
620
|
return !1;
|
|
650
621
|
let t = e;
|
|
@@ -657,11 +628,11 @@ function ne(e, n) {
|
|
|
657
628
|
return !1;
|
|
658
629
|
}), Object.keys(t).length <= 0);
|
|
659
630
|
}
|
|
660
|
-
function
|
|
661
|
-
const t =
|
|
662
|
-
return t ? n ? (!
|
|
631
|
+
function jt(e, n) {
|
|
632
|
+
const t = me[e];
|
|
633
|
+
return t ? n ? (!oe(t.includes, n) || oe(t.excludes, n), !1) : !0 : !1;
|
|
663
634
|
}
|
|
664
|
-
const
|
|
635
|
+
const ve = require("js-cookie"), ut = [
|
|
665
636
|
{ path: "/passport/login", level: 0 },
|
|
666
637
|
{ path: "/passport/loginAccount", level: 1 },
|
|
667
638
|
{ path: "/passport/register", level: 1 },
|
|
@@ -681,7 +652,7 @@ const fe = require("js-cookie"), ut = [
|
|
|
681
652
|
{ path: "/calc", level: 1, requiredState: "org" },
|
|
682
653
|
{ path: "/data", level: 1, requiredState: "org" }
|
|
683
654
|
];
|
|
684
|
-
function
|
|
655
|
+
function Q(e) {
|
|
685
656
|
let n, t = 0;
|
|
686
657
|
const o = e.split("/");
|
|
687
658
|
return ut.forEach((r) => {
|
|
@@ -692,30 +663,30 @@ function me(e) {
|
|
|
692
663
|
l >= t && (n = r, t = l);
|
|
693
664
|
}), n;
|
|
694
665
|
}
|
|
695
|
-
function
|
|
666
|
+
function re(e) {
|
|
696
667
|
if (e === "/")
|
|
697
668
|
return { app: "", path: "/", level: -1 };
|
|
698
|
-
const n =
|
|
669
|
+
const n = Q(e);
|
|
699
670
|
if (!n)
|
|
700
671
|
return { app: "invalidApp", path: "/invalidApp/invalidRoute", level: -1 };
|
|
701
672
|
const t = e.split("/");
|
|
702
673
|
return console.assert(t.length >= 2), { app: t[1], path: n.path, level: n.level };
|
|
703
674
|
}
|
|
704
|
-
const
|
|
705
|
-
function
|
|
706
|
-
const t =
|
|
675
|
+
const le = m("");
|
|
676
|
+
function k(e, n) {
|
|
677
|
+
const t = re(e), o = re(n), r = t.app === o.app, a = t.path === o.path, l = t.level >= o.level;
|
|
707
678
|
console.info(
|
|
708
679
|
`~~~~before route change~~~~ ${o.path} -> ${t.path} inner=${r} forward=${l}`
|
|
709
|
-
), r ? a ?
|
|
680
|
+
), r ? a ? le.value = "" : le.value = l ? "inner-left" : "inner-right" : window.routeExtras = { forward: l };
|
|
710
681
|
}
|
|
711
682
|
function dt() {
|
|
712
|
-
return !!
|
|
683
|
+
return !!ve.get("accessToken");
|
|
713
684
|
}
|
|
714
685
|
function pt() {
|
|
715
|
-
return !!
|
|
686
|
+
return !!ve.get("activeOrg");
|
|
716
687
|
}
|
|
717
|
-
function
|
|
718
|
-
const o = dt(), r = pt(), a =
|
|
688
|
+
function It(e, n, t) {
|
|
689
|
+
const o = dt(), r = pt(), a = Q(e.path);
|
|
719
690
|
if (!a) {
|
|
720
691
|
t();
|
|
721
692
|
return;
|
|
@@ -724,59 +695,103 @@ function jt(e, n, t) {
|
|
|
724
695
|
if (o)
|
|
725
696
|
if (r) {
|
|
726
697
|
const l = "/main";
|
|
727
|
-
|
|
698
|
+
k(l, n.path), t({ path: l });
|
|
728
699
|
} else
|
|
729
|
-
|
|
700
|
+
k(e.path, n.path), t();
|
|
730
701
|
else {
|
|
731
702
|
const l = "/passport/login";
|
|
732
|
-
|
|
703
|
+
k(l, n.path), t({ path: l });
|
|
733
704
|
}
|
|
734
705
|
else if (a.requiredState === "org")
|
|
735
706
|
if (o)
|
|
736
707
|
if (r)
|
|
737
|
-
|
|
708
|
+
k(e.path, n.path), t();
|
|
738
709
|
else {
|
|
739
710
|
const l = "/org/joinOrCreate";
|
|
740
|
-
|
|
711
|
+
k(l, n.path), t({ path: l });
|
|
741
712
|
}
|
|
742
713
|
else {
|
|
743
714
|
const l = "/passport/login";
|
|
744
|
-
|
|
715
|
+
k(l, n.path), t({ path: l });
|
|
745
716
|
}
|
|
746
717
|
else if (o)
|
|
747
718
|
if (r) {
|
|
748
719
|
const l = "/main";
|
|
749
|
-
|
|
720
|
+
k(l, n.path), t({ path: l });
|
|
750
721
|
} else {
|
|
751
722
|
const l = "/org/joinOrCreate";
|
|
752
|
-
|
|
723
|
+
k(l, n.path), t({ path: l });
|
|
753
724
|
}
|
|
754
725
|
else
|
|
755
|
-
|
|
726
|
+
k(e.path, n.path), t();
|
|
727
|
+
}
|
|
728
|
+
function Pt(e) {
|
|
729
|
+
const n = nt(), t = de(), o = ot(), r = ce(), a = (c) => {
|
|
730
|
+
if (c.key === "Escape") {
|
|
731
|
+
l();
|
|
732
|
+
return;
|
|
733
|
+
}
|
|
734
|
+
if (!e && c.ctrlKey && c.key.toLowerCase() === "d") {
|
|
735
|
+
s();
|
|
736
|
+
return;
|
|
737
|
+
}
|
|
738
|
+
if (!e && c.ctrlKey && c.key.toLowerCase() === "l") {
|
|
739
|
+
p();
|
|
740
|
+
return;
|
|
741
|
+
}
|
|
742
|
+
}, l = () => {
|
|
743
|
+
var w;
|
|
744
|
+
if (!r.isEmpty()) {
|
|
745
|
+
r.hasView("waitDlg") || r.popView();
|
|
746
|
+
return;
|
|
747
|
+
}
|
|
748
|
+
const c = Q(n.path);
|
|
749
|
+
(c == null ? void 0 : c.level) === 0 ? (w = navigator == null ? void 0 : navigator.Backbutton) == null || w.goHome(
|
|
750
|
+
() => {
|
|
751
|
+
},
|
|
752
|
+
() => {
|
|
753
|
+
}
|
|
754
|
+
) : t.back();
|
|
755
|
+
}, s = () => {
|
|
756
|
+
o.dark = !o.dark;
|
|
757
|
+
}, p = () => {
|
|
758
|
+
o.locale === "en" ? o.locale = "zhHans" : o.locale = "en";
|
|
759
|
+
};
|
|
760
|
+
return q(() => {
|
|
761
|
+
window.addEventListener("keydown", a, !1);
|
|
762
|
+
}), O(() => {
|
|
763
|
+
window.removeEventListener("keydown", a, !1);
|
|
764
|
+
}), {};
|
|
765
|
+
}
|
|
766
|
+
function Tt() {
|
|
767
|
+
const e = H(), { width: n } = $e(), t = f(() => e.global.name.value), o = f(() => !!window.cordova), r = f(() => n.value <= 1280 ? n.value + "px" : n.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
|
|
768
|
+
return { dark: t, sysBarAvail: o, compactWidth: r };
|
|
756
769
|
}
|
|
757
|
-
const
|
|
770
|
+
const $t = { install: Ze };
|
|
758
771
|
export {
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
772
|
+
Rt as appAppear,
|
|
773
|
+
Vt as closeWaitDlg,
|
|
774
|
+
yt as createAxios,
|
|
775
|
+
$t as default,
|
|
776
|
+
i as eventBus,
|
|
777
|
+
Q as matchRouteMeta,
|
|
778
|
+
Dt as messageError,
|
|
779
|
+
St as messageInfo,
|
|
780
|
+
qt as messageSuccess,
|
|
781
|
+
Ot as messageWarning,
|
|
782
|
+
It as onBeforeEach,
|
|
783
|
+
kt as openConfirmDlg,
|
|
784
|
+
bt as openPromptDlg,
|
|
785
|
+
Ct as openWaitDlg,
|
|
786
|
+
le as routeTransName,
|
|
787
|
+
Et as setPermissionObject,
|
|
773
788
|
wt as useColor,
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
789
|
+
ot as useGlobalStore,
|
|
790
|
+
Pt as useHotkey,
|
|
791
|
+
Tt as useSystem,
|
|
792
|
+
ce as useViewMgrStore,
|
|
778
793
|
J as useViewStack,
|
|
779
|
-
|
|
794
|
+
jt as verifyPermission,
|
|
780
795
|
xt as waitMs,
|
|
781
796
|
G as waitUtil
|
|
782
797
|
};
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export { createAxios, eventBus, waitMs, waitUtil, openConfirmDlg, openPromptDlg, openWaitDlg, closeWaitDlg, messageError, messageInfo, messageSuccess, messageWarning, appAppear, verifyPermission, routeTransName, onBeforeEach };
|
|
1
|
+
export * from './axios';
|
|
2
|
+
export * from './core';
|
|
3
|
+
export * from './dialog';
|
|
4
|
+
export * from './message';
|
|
5
|
+
export * from './misc';
|
|
6
|
+
export * from './permission';
|
|
7
|
+
export * from './router';
|
package/dist/utils/router.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
import { RouteLocationNormalized, NavigationGuardNext } from 'vue-router';
|
|
2
|
+
type RequiredState = 'auth' | 'org';
|
|
3
|
+
interface RouteMeta {
|
|
4
|
+
path: string;
|
|
5
|
+
level: number;
|
|
6
|
+
requiredState?: RequiredState;
|
|
7
|
+
}
|
|
8
|
+
export declare function matchRouteMeta(path: string): RouteMeta | undefined;
|
|
2
9
|
export declare const routeTransName: import("vue").Ref<string>;
|
|
3
10
|
export declare function onBeforeEach(to: RouteLocationNormalized, from: RouteLocationNormalized, next: NavigationGuardNext): void;
|
|
11
|
+
export {};
|