@das-fed/utils 1.0.0 → 1.0.2
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/api-services/index.js +6840 -19720
- package/api-services/modules/app-manage.js +6966 -6
- package/api-services/modules/authentication.js +6966 -6
- package/api-services/modules/bems.js +6970 -11
- package/api-services/modules/contract.js +6966 -6
- package/api-services/modules/duty-manage.js +6970 -10
- package/api-services/modules/enterpriseright.js +6966 -6
- package/api-services/modules/file.js +7108 -353
- package/api-services/modules/gateway-edge.js +6966 -6
- package/api-services/modules/index.js +7163 -437
- package/api-services/modules/iot.js +6979 -19
- package/api-services/modules/justauth.js +6967 -7
- package/api-services/modules/knowledge.js +6966 -6
- package/api-services/modules/link.js +6966 -6
- package/api-services/modules/permission.js +6966 -6
- package/api-services/modules/platformManage.js +6974 -14
- package/api-services/modules/portal.js +6966 -6
- package/api-services/modules/space-manage.js +6966 -6
- package/api-services/modules/super-admin.js +6969 -9
- package/api-services/modules/supplier.js +6968 -8
- package/api-services/modules/supplychain-manage.js +6966 -6
- package/api-services/modules/systemConfiguration.js +6966 -6
- package/api-services/modules/tool.js +6966 -6
- package/api-services/src/create-service.js +6840 -19720
- package/api-services/src/sso.js +1711 -157
- package/api-services/src/util.js +1466 -19
- package/atob/index.js +9 -10
- package/common-info/getIframeUrl.js +14 -11
- package/common-info/index.js +194 -269
- package/common-info/setInfoFromUrl.js +60 -128
- package/common-tools/arr-tools.js +6 -13
- package/common-tools/date-format.js +18 -21
- package/common-tools/get-url-params.js +47 -88
- package/common-tools/handle-data.js +3 -4
- package/common-tools/index.js +108 -204
- package/common-tools/nest-tree-format.js +22 -49
- package/common-tools/obj-tools.js +17 -18
- package/common-tools/setHtmlMinWH.js +6 -10
- package/common-tools/throttled.js +7 -16
- package/config/index.js +8 -25
- package/curring-http/index.js +5150 -17289
- package/directive/auth.js +205 -97
- package/directive/clickOutside.js +25 -49
- package/directive/hoverInside.js +18 -35
- package/directive/index.js +238 -159
- package/directive/utils.js +6 -11
- package/dom-check-in/index.js +7 -15
- package/dom-watcher/index.js +7 -8
- package/hooks/popup-manager/use-zindex.js +17 -36
- package/index.js +242 -191
- package/load-js/index.js +14 -20
- package/oss/index.js +15 -15
- package/package.json +7 -11
- package/pinyin-first-character/index.js +25011 -12217
- package/process-engine-info/index.js +8 -10
- package/pure-image-src/index.js +3 -29
- package/set-personal-info/index.js +1566 -16
- package/size-watcher/index.js +17 -24
- package/style/index.js +62 -103
- package/style/math.js +16 -31
- package/style/style.js +49 -72
- package/token-tools/index.js +1594 -152
- package/vue/hooks/use-model-value.js +9 -10
- package/vue/index.js +9 -10
- package/webSocket-service/index.js +162 -135
- package/with-install/index.js +5 -7
package/directive/index.js
CHANGED
|
@@ -1,183 +1,262 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { ref as w } from "vue";
|
|
2
|
+
const p = (e, t) => {
|
|
3
|
+
let n = window.location.search || "";
|
|
4
|
+
if (e && e !== location.href) {
|
|
5
|
+
const r = e.indexOf("?");
|
|
6
|
+
r !== -1 ? n = e.slice(r) : n = "";
|
|
7
|
+
}
|
|
8
|
+
const s = new URLSearchParams(n);
|
|
9
|
+
if (t)
|
|
10
|
+
return s.get(t);
|
|
11
|
+
{
|
|
12
|
+
let r = {};
|
|
13
|
+
for (let [o, c] of s.entries())
|
|
14
|
+
r[o] = c;
|
|
15
|
+
return r;
|
|
16
|
+
}
|
|
17
|
+
}, y = (e, t = "children", n = !0) => Array.isArray(e) && e.length ? e.reduce((s, r) => {
|
|
18
|
+
let o = r[t], c = { ...r };
|
|
19
|
+
return n && delete c[t], o && o.length ? s.concat(c, y(o, t, n)) : s.concat(c);
|
|
20
|
+
}, []) : [];
|
|
21
|
+
/*! js-cookie v3.0.5 | MIT */
|
|
22
|
+
function g(e) {
|
|
23
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
24
|
+
var n = arguments[t];
|
|
25
|
+
for (var s in n)
|
|
26
|
+
e[s] = n[s];
|
|
27
|
+
}
|
|
28
|
+
return e;
|
|
29
|
+
}
|
|
30
|
+
var C = {
|
|
31
|
+
read: function(e) {
|
|
32
|
+
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
33
|
+
},
|
|
34
|
+
write: function(e) {
|
|
35
|
+
return encodeURIComponent(e).replace(
|
|
36
|
+
/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
|
|
37
|
+
decodeURIComponent
|
|
38
|
+
);
|
|
11
39
|
}
|
|
12
|
-
return res;
|
|
13
40
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
let flag = false;
|
|
23
|
-
for (let value of code) {
|
|
24
|
-
const currentItem = btnList.find((item) => item.code === value);
|
|
25
|
-
if (currentItem) {
|
|
26
|
-
flag = true;
|
|
27
|
-
break;
|
|
28
|
-
}
|
|
41
|
+
function _(e, t) {
|
|
42
|
+
function n(r, o, c) {
|
|
43
|
+
if (!(typeof document > "u")) {
|
|
44
|
+
c = g({}, t, c), typeof c.expires == "number" && (c.expires = new Date(Date.now() + c.expires * 864e5)), c.expires && (c.expires = c.expires.toUTCString()), r = encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
45
|
+
var a = "";
|
|
46
|
+
for (var i in c)
|
|
47
|
+
c[i] && (a += "; " + i, c[i] !== !0 && (a += "=" + c[i].split(";")[0]));
|
|
48
|
+
return document.cookie = r + "=" + e.write(o, r) + a;
|
|
29
49
|
}
|
|
30
|
-
return flag;
|
|
31
50
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
51
|
+
function s(r) {
|
|
52
|
+
if (!(typeof document > "u" || arguments.length && !r)) {
|
|
53
|
+
for (var o = document.cookie ? document.cookie.split("; ") : [], c = {}, a = 0; a < o.length; a++) {
|
|
54
|
+
var i = o[a].split("="), u = i.slice(1).join("=");
|
|
55
|
+
try {
|
|
56
|
+
var f = decodeURIComponent(i[0]);
|
|
57
|
+
if (c[f] = e.read(u, f), r === f)
|
|
58
|
+
break;
|
|
59
|
+
} catch {
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return r ? c[r] : c;
|
|
63
|
+
}
|
|
42
64
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
65
|
+
return Object.create(
|
|
66
|
+
{
|
|
67
|
+
set: n,
|
|
68
|
+
get: s,
|
|
69
|
+
remove: function(r, o) {
|
|
70
|
+
n(
|
|
71
|
+
r,
|
|
72
|
+
"",
|
|
73
|
+
g({}, o, {
|
|
74
|
+
expires: -1
|
|
75
|
+
})
|
|
76
|
+
);
|
|
77
|
+
},
|
|
78
|
+
withAttributes: function(r) {
|
|
79
|
+
return _(this.converter, g({}, this.attributes, r));
|
|
80
|
+
},
|
|
81
|
+
withConverter: function(r) {
|
|
82
|
+
return _(g({}, this.converter, r), this.attributes);
|
|
57
83
|
}
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
attributes: { value: Object.freeze(t) },
|
|
87
|
+
converter: { value: Object.freeze(e) }
|
|
58
88
|
}
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
var m = _(C, { path: "/" });
|
|
92
|
+
const k = (e) => {
|
|
93
|
+
var t = encodeURIComponent(e);
|
|
94
|
+
return t = btoa(t), t;
|
|
95
|
+
}, v = () => {
|
|
96
|
+
let t = { ...(window == null ? void 0 : window.config) || {} };
|
|
97
|
+
t.rootContainer || (t.rootContainer = "#app"), t.baseURL || (t.baseURL = location.origin), t.ossBaseURL || (t.ossBaseURL = "/oss"), t.ossBaseURL.startsWith("/") && (t.ossBaseURL = `${t.baseURL}/oss`), t.ssoBaseURL || (t.ssoBaseURL = t.baseURL);
|
|
98
|
+
let { microAppName: n, publicPath: s, mainAppName: r } = t;
|
|
99
|
+
return n && !0 && !s && (s = `/${n}/`.replace(/\/\//g, "/")), s || (s = "/"), t.publicPath = s, t.autoOssBucket || (t.autoOssBucket = r || n), t;
|
|
100
|
+
};
|
|
101
|
+
w(!1);
|
|
102
|
+
v();
|
|
103
|
+
k("das123"), +/* @__PURE__ */ new Date();
|
|
104
|
+
const S = () => {
|
|
105
|
+
const e = new URL(location.href).searchParams, t = e.get("token") || e.get("accessToken") || e.get("accesstoken") || "";
|
|
106
|
+
if (t) {
|
|
107
|
+
const n = JSON.stringify({ access_token: t });
|
|
108
|
+
sessionStorage.setItem("accessToken", t), sessionStorage.setItem("tokenInfo", n), m.set("accessToken", t), m.set("accessTokenInfo", n);
|
|
59
109
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
110
|
+
}, L = () => {
|
|
111
|
+
const e = JSON.parse(sessionStorage.getItem("projectInfo") || "{}"), t = new URL(location.href).searchParams, n = t.get("project") || t.get("projectId") || "";
|
|
112
|
+
if (!n)
|
|
113
|
+
return;
|
|
114
|
+
const s = t.get("projectParent") || t.get("projectParentId") || (e == null ? void 0 : e.parentId) || "", r = t.get("projectName") || (e == null ? void 0 : e.name) || "";
|
|
115
|
+
sessionStorage.setItem("project", n), sessionStorage.setItem("projectInfo", JSON.stringify({ ...e, id: n, name: r, parentId: s }));
|
|
116
|
+
}, P = () => m.get("accessToken") ?? "", h = (e, t) => {
|
|
117
|
+
const n = "permission-btn", s = v(), r = A(), o = p(location.href, "app") || "", c = t || o || (window.__IN_MICRO_APP__ ? r.currentSubAppCode : s.title);
|
|
118
|
+
if (!c)
|
|
119
|
+
return;
|
|
120
|
+
const a = p(location.href, "menu") || "", i = e || a || (window.__IN_MICRO_APP__ ? r.currentSubApp.currentMenuCode : JSON.parse(sessionStorage.getItem(`${s.title}-tabs`) || "{}").currentTab.code), u = JSON.parse(sessionStorage.getItem(n) || "{}");
|
|
121
|
+
if (!u || JSON.stringify(u) === "{}")
|
|
122
|
+
return;
|
|
123
|
+
const f = u[c][i];
|
|
124
|
+
return f && f.length ? f : u[c]["origin-auth"] ? u[c]["origin-auth"][i] ?? [] : [];
|
|
125
|
+
}, A = () => {
|
|
126
|
+
var s;
|
|
127
|
+
if (!window.__IN_MICRO_APP__)
|
|
128
|
+
return {};
|
|
129
|
+
const e = JSON.parse(sessionStorage.getItem("subApps") || "{}"), t = ((s = e.appcategorys) == null ? void 0 : s.map((r) => r.apps).flat()) ?? [];
|
|
130
|
+
return {
|
|
131
|
+
appcategorys: e.appcategorys ?? [],
|
|
132
|
+
currentSubApp: e.currentSubApp ?? {},
|
|
133
|
+
currentSubAppCode: e.currentSubAppCode ?? "",
|
|
134
|
+
flatSubAppList: t,
|
|
135
|
+
subAppList: e.subAppList ?? []
|
|
136
|
+
};
|
|
137
|
+
}, R = () => {
|
|
138
|
+
const e = v();
|
|
139
|
+
let t = {};
|
|
140
|
+
if (window.__IN_MICRO_APP__) {
|
|
141
|
+
const n = JSON.parse(sessionStorage.getItem("tabs") || "{}");
|
|
142
|
+
t = {
|
|
143
|
+
activeKey: n.activeKey ?? "",
|
|
144
|
+
currentTab: n.currentTab ?? {},
|
|
145
|
+
tabMap: n.tabMap ?? {}
|
|
146
|
+
};
|
|
64
147
|
} else {
|
|
65
|
-
|
|
148
|
+
const n = JSON.parse(sessionStorage.getItem(`${e.title}-tabs`) || "{}");
|
|
149
|
+
t = {
|
|
150
|
+
activeKey: n.activeKey ?? "",
|
|
151
|
+
currentTab: n.currentTab ?? {},
|
|
152
|
+
tabList: n.tabList ?? []
|
|
153
|
+
};
|
|
66
154
|
}
|
|
67
|
-
return
|
|
155
|
+
return t;
|
|
68
156
|
};
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
157
|
+
P() || S();
|
|
158
|
+
L();
|
|
159
|
+
const d = async (e, t) => {
|
|
160
|
+
let n = e;
|
|
161
|
+
return t != null && t.target && (typeof t.target == "string" && (n = t.target), typeof t.target == "function" && (n = await t.target(e))), n;
|
|
162
|
+
}, U = (e, t) => {
|
|
163
|
+
if (!e || !t)
|
|
164
|
+
return !1;
|
|
165
|
+
if (typeof t == "string")
|
|
166
|
+
return !!e.find((s) => s.code === t);
|
|
167
|
+
{
|
|
168
|
+
let n = !1;
|
|
169
|
+
for (let s of t)
|
|
170
|
+
if (e.find((o) => o.code === s)) {
|
|
171
|
+
n = !0;
|
|
172
|
+
break;
|
|
173
|
+
}
|
|
174
|
+
return n;
|
|
75
175
|
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
176
|
+
}, I = (e) => {
|
|
177
|
+
var c, a;
|
|
178
|
+
const t = (e == null ? void 0 : e.code) ?? "", n = (e == null ? void 0 : e.path) ?? location.pathname, s = (e == null ? void 0 : e.applicationCode) ?? "";
|
|
179
|
+
let r = "";
|
|
180
|
+
if (window.__IN_MICRO_APP__ ? r = e != null && e.menuCode ? e.menuCode : p(location.href, "menu") : r = e != null && e.menuCode ? e.menuCode : (c = R().currentTab) == null ? void 0 : c.code, !r) {
|
|
181
|
+
const i = ((a = A().currentSubApp) == null ? void 0 : a.menus) ?? [];
|
|
182
|
+
if (i && i.length) {
|
|
183
|
+
const u = y(i).filter((f) => f == null ? void 0 : f.routeUrl);
|
|
184
|
+
if (u && u.length) {
|
|
185
|
+
const f = u.find((l) => l != null && l.applicationPath ? n == null ? void 0 : n.includes("/" + l.applicationPath + l.routeUrl) : n == null ? void 0 : n.includes(l.routeUrl));
|
|
186
|
+
f && (r = (f == null ? void 0 : f.code) ?? "");
|
|
187
|
+
}
|
|
188
|
+
}
|
|
83
189
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
190
|
+
let o = !1;
|
|
191
|
+
if (t) {
|
|
192
|
+
const i = h(r, s) ?? [];
|
|
193
|
+
o = U(i, t);
|
|
194
|
+
} else
|
|
195
|
+
o = !!h(r, s);
|
|
196
|
+
return o;
|
|
197
|
+
}, b = (e, t) => {
|
|
198
|
+
t === "hide" ? e.classList.add("is-hide") : (e.setAttribute("disabled", ""), e.classList.add("is-disabled"));
|
|
199
|
+
}, O = (e, t) => {
|
|
200
|
+
t === "hide" ? e.classList.remove("is-hide") : (e.removeAttribute("disabled"), e.classList.remove("is-disabled"));
|
|
201
|
+
}, T = (e, t) => {
|
|
202
|
+
let n = (e ? t.value : t) || {};
|
|
203
|
+
typeof n == "string" && (n = { code: n });
|
|
204
|
+
const s = (n == null ? void 0 : n.type) ?? "hide", r = I(n);
|
|
205
|
+
if (e)
|
|
206
|
+
if (!t.oldValue)
|
|
207
|
+
r || d(e, n).then((o) => {
|
|
208
|
+
b(o, s);
|
|
209
|
+
});
|
|
210
|
+
else {
|
|
211
|
+
const o = I(t.oldValue), c = r;
|
|
212
|
+
if (o === c)
|
|
101
213
|
return;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
addEl(element, type);
|
|
105
|
-
} else {
|
|
106
|
-
removeEl(element, type);
|
|
107
|
-
}
|
|
214
|
+
d(e, n).then((a) => {
|
|
215
|
+
c ? O(a, s) : b(a, s);
|
|
108
216
|
});
|
|
109
217
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
dom.__click_outside__ = eventHandler;
|
|
123
|
-
if (dom.contains(e.target))
|
|
124
|
-
flag = false;
|
|
125
|
-
}
|
|
126
|
-
} else {
|
|
127
|
-
if (targetEl.contains(e.target)) {
|
|
128
|
-
flag = false;
|
|
129
|
-
}
|
|
130
|
-
targetEl.__click_outside__ = eventHandler;
|
|
131
|
-
}
|
|
132
|
-
if (flag) {
|
|
133
|
-
if (options?.fn && typeof options?.fn === "function") {
|
|
134
|
-
options?.fn(e);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
218
|
+
return r;
|
|
219
|
+
}, N = {
|
|
220
|
+
mounted: async (e, t) => {
|
|
221
|
+
const n = t.value, s = await d(e, n);
|
|
222
|
+
function r(o) {
|
|
223
|
+
let c = !0;
|
|
224
|
+
if (Array.isArray(s))
|
|
225
|
+
for (let a of s)
|
|
226
|
+
a.__click_outside__ = r, a.contains(o.target) && (c = !1);
|
|
227
|
+
else
|
|
228
|
+
s.contains(o.target) && (c = !1), s.__click_outside__ = r;
|
|
229
|
+
c && n != null && n.fn && typeof (n == null ? void 0 : n.fn) == "function" && (n == null || n.fn(o));
|
|
137
230
|
}
|
|
138
|
-
document.addEventListener("click",
|
|
231
|
+
document.addEventListener("click", r);
|
|
139
232
|
},
|
|
140
|
-
beforeUnmount: async (
|
|
141
|
-
const
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}
|
|
148
|
-
} else {
|
|
149
|
-
document.removeEventListener("click", targetEl.__click_outside__);
|
|
150
|
-
delete targetEl.__click_outside__;
|
|
151
|
-
}
|
|
233
|
+
beforeUnmount: async (e, t) => {
|
|
234
|
+
const n = t.value, s = await d(e, n);
|
|
235
|
+
if (Array.isArray(s))
|
|
236
|
+
for (let r of s)
|
|
237
|
+
document.removeEventListener("click", r.__click_outside__), delete r.__click_outside__;
|
|
238
|
+
else
|
|
239
|
+
document.removeEventListener("click", s.__click_outside__), delete s.__click_outside__;
|
|
152
240
|
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
const targetEl = await getEl(el, options);
|
|
159
|
-
function eventHandler(flag, e) {
|
|
160
|
-
targetEl._inside_event = eventHandler;
|
|
161
|
-
if (typeof options === "function") {
|
|
162
|
-
options(flag, e);
|
|
163
|
-
} else if (options?.fn && typeof options?.fn === "function") {
|
|
164
|
-
options?.fn(flag, e);
|
|
165
|
-
}
|
|
241
|
+
}, B = {
|
|
242
|
+
mounted: async (e, t) => {
|
|
243
|
+
const n = t.value, s = await d(e, n);
|
|
244
|
+
function r(o, c) {
|
|
245
|
+
s._inside_event = r, typeof n == "function" ? n(o, c) : n != null && n.fn && typeof (n == null ? void 0 : n.fn) == "function" && (n == null || n.fn(o, c));
|
|
166
246
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
})
|
|
170
|
-
|
|
171
|
-
eventHandler(false, e);
|
|
247
|
+
s.addEventListener("mouseenter", (o) => {
|
|
248
|
+
r(!0, o);
|
|
249
|
+
}), s.addEventListener("mouseleave", (o) => {
|
|
250
|
+
r(!1, o);
|
|
172
251
|
});
|
|
173
252
|
},
|
|
174
|
-
beforeUnmount: async (
|
|
175
|
-
const
|
|
176
|
-
|
|
177
|
-
targetEl.addEventListener("mouseenter", targetEl._inside_event);
|
|
178
|
-
targetEl.addEventListener("mouseleave", targetEl._inside_event);
|
|
179
|
-
delete targetEl._inside_event;
|
|
253
|
+
beforeUnmount: async (e, t) => {
|
|
254
|
+
const n = t.value, s = await d(e, n);
|
|
255
|
+
s.addEventListener("mouseenter", s._inside_event), s.addEventListener("mouseleave", s._inside_event), delete s._inside_event;
|
|
180
256
|
}
|
|
181
257
|
};
|
|
182
|
-
|
|
183
|
-
|
|
258
|
+
export {
|
|
259
|
+
T as vAuth,
|
|
260
|
+
N as vClickOutside,
|
|
261
|
+
B as vHoverInside
|
|
262
|
+
};
|
package/directive/utils.js
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
const
|
|
2
|
-
let
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
res = await options.target(el);
|
|
8
|
-
}
|
|
9
|
-
return res;
|
|
1
|
+
const a = async (r, t) => {
|
|
2
|
+
let e = r;
|
|
3
|
+
return t != null && t.target && (typeof t.target == "string" && (e = t.target), typeof t.target == "function" && (e = await t.target(r))), e;
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
a as getEl
|
|
10
7
|
};
|
|
11
|
-
|
|
12
|
-
export { getEl };
|
package/dom-check-in/index.js
CHANGED
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
3
|
-
let
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
let div_y_height = Number(dom.getBoundingClientRect().top + dom.clientHeight);
|
|
9
|
-
if (x > div_x && x < div_x_width && y > div_y && y < div_y_height) {
|
|
10
|
-
return true;
|
|
11
|
-
} else {
|
|
12
|
-
return false;
|
|
13
|
-
}
|
|
1
|
+
const g = (e) => {
|
|
2
|
+
const t = window.event;
|
|
3
|
+
let n = Number(t.clientX), i = Number(t.clientY), l = Number(e.getBoundingClientRect().left), u = Number(e.getBoundingClientRect().left + e.clientWidth), r = Number(e.getBoundingClientRect().top), c = Number(e.getBoundingClientRect().top + e.clientHeight);
|
|
4
|
+
return n > l && n < u && i > r && i < c;
|
|
5
|
+
};
|
|
6
|
+
export {
|
|
7
|
+
g as domCheckIn
|
|
14
8
|
};
|
|
15
|
-
|
|
16
|
-
export { domCheckIn };
|
package/dom-watcher/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
cb(mutationsList);
|
|
1
|
+
const c = (e, r, o = { attributes: !0, childList: !0, subtree: !0 }) => {
|
|
2
|
+
const s = r || document.body, t = new MutationObserver((u) => {
|
|
3
|
+
e(u);
|
|
5
4
|
});
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
return t.observe(s, o), t;
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
c as DomWatcher
|
|
8
9
|
};
|
|
9
|
-
|
|
10
|
-
export { DomWatcher };
|
|
@@ -1,41 +1,22 @@
|
|
|
1
|
-
import { ref, getCurrentInstance, inject, computed, unref } from
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const zIndexContextKey = Symbol("zIndexContextKey");
|
|
8
|
-
const useZIndex$1 = (zIndexOverrides) => {
|
|
9
|
-
const zIndexInjection = zIndexOverrides || (getCurrentInstance() ? inject(zIndexContextKey, void 0) : void 0);
|
|
10
|
-
const initialZIndex = computed(() => {
|
|
11
|
-
const zIndexFromInjection = unref(zIndexInjection);
|
|
12
|
-
return isNumber(zIndexFromInjection) ? zIndexFromInjection : defaultInitialZIndex;
|
|
13
|
-
});
|
|
14
|
-
const currentZIndex = computed(() => initialZIndex.value + zIndex.value);
|
|
15
|
-
const nextZIndex = () => {
|
|
16
|
-
zIndex.value++;
|
|
17
|
-
return currentZIndex.value;
|
|
18
|
-
};
|
|
1
|
+
import { ref as I, getCurrentInstance as u, inject as s, computed as e, unref as i } from "vue";
|
|
2
|
+
const Z = (n) => typeof n == "number", d = I(0), l = 2e3, a = Symbol("zIndexContextKey"), m = (n) => {
|
|
3
|
+
const t = n || (u() ? s(a, void 0) : void 0), r = e(() => {
|
|
4
|
+
const c = i(t);
|
|
5
|
+
return Z(c) ? c : l;
|
|
6
|
+
}), x = e(() => r.value + d.value);
|
|
19
7
|
return {
|
|
20
|
-
initialZIndex,
|
|
21
|
-
currentZIndex,
|
|
22
|
-
nextZIndex
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const elementZindex = useZIndex$1();
|
|
27
|
-
const useZIndex = () => {
|
|
28
|
-
const initialZIndex = computed(() => elementZindex.initialZIndex.value);
|
|
29
|
-
const currentZIndex = computed(() => elementZindex.currentZIndex.value);
|
|
30
|
-
const nextZIndex = () => {
|
|
31
|
-
const currentZIndex2 = elementZindex.nextZIndex();
|
|
32
|
-
return currentZIndex2;
|
|
8
|
+
initialZIndex: r,
|
|
9
|
+
currentZIndex: x,
|
|
10
|
+
nextZIndex: () => (d.value++, x.value)
|
|
33
11
|
};
|
|
12
|
+
}, o = m(), z = () => {
|
|
13
|
+
const n = e(() => o.initialZIndex.value), t = e(() => o.currentZIndex.value);
|
|
34
14
|
return {
|
|
35
|
-
initialZIndex,
|
|
36
|
-
currentZIndex,
|
|
37
|
-
nextZIndex
|
|
15
|
+
initialZIndex: n,
|
|
16
|
+
currentZIndex: t,
|
|
17
|
+
nextZIndex: () => o.nextZIndex()
|
|
38
18
|
};
|
|
39
19
|
};
|
|
40
|
-
|
|
41
|
-
|
|
20
|
+
export {
|
|
21
|
+
z as useZIndex
|
|
22
|
+
};
|