@gx-design-vue/pro-utils 0.2.0-beta.37 → 0.2.0-beta.38
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/pro-utils.js +102 -98
- package/dist/pro-utils.umd.cjs +2 -2
- package/dist/slots/index.d.ts +9 -2
- package/dist/typings/index.d.ts +16 -7
- package/dist/utils/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/pro-utils.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Comment as
|
|
1
|
+
import { Comment as z, Fragment as j, isVNode as m } from "vue";
|
|
2
2
|
const w = typeof window > "u";
|
|
3
3
|
/**
|
|
4
4
|
* @vue/shared v3.5.11
|
|
@@ -7,16 +7,16 @@ const w = typeof window > "u";
|
|
|
7
7
|
**/
|
|
8
8
|
process.env.NODE_ENV !== "production" && Object.freeze({});
|
|
9
9
|
process.env.NODE_ENV !== "production" && Object.freeze([]);
|
|
10
|
-
const
|
|
10
|
+
const H = (e) => {
|
|
11
11
|
const t = /* @__PURE__ */ Object.create(null);
|
|
12
12
|
return (r) => t[r] || (t[r] = e(r));
|
|
13
|
-
},
|
|
14
|
-
(e) => e.replace(
|
|
13
|
+
}, W = /-(\w)/g, _ = H(
|
|
14
|
+
(e) => e.replace(W, (t, r) => r ? r.toUpperCase() : "")
|
|
15
15
|
), y = function(e, t) {
|
|
16
16
|
var r;
|
|
17
17
|
if (w || !e || !t)
|
|
18
18
|
return "";
|
|
19
|
-
t =
|
|
19
|
+
t = _(t), t === "float" && (t = "cssFloat");
|
|
20
20
|
try {
|
|
21
21
|
const n = e.style[t];
|
|
22
22
|
if (n)
|
|
@@ -26,19 +26,19 @@ const z = (e) => {
|
|
|
26
26
|
} catch {
|
|
27
27
|
return e.style[t];
|
|
28
28
|
}
|
|
29
|
-
},
|
|
29
|
+
}, q = (e, t) => w ? void 0 : (t == null ? y(e, "overflow") : t ? y(e, "overflow-y") : y(e, "overflow-x")).match(/(scroll|auto|overlay)/), ue = (e, t) => {
|
|
30
30
|
if (w)
|
|
31
31
|
return;
|
|
32
32
|
let r = e;
|
|
33
33
|
for (; r; ) {
|
|
34
34
|
if ([window, document, document.documentElement].includes(r))
|
|
35
35
|
return window;
|
|
36
|
-
if (
|
|
36
|
+
if (q(r, t))
|
|
37
37
|
return r;
|
|
38
38
|
r = r.parentNode;
|
|
39
39
|
}
|
|
40
40
|
return r;
|
|
41
|
-
},
|
|
41
|
+
}, ce = (e, t) => {
|
|
42
42
|
if (w || !e || !t)
|
|
43
43
|
return !1;
|
|
44
44
|
const r = e.getBoundingClientRect();
|
|
@@ -50,10 +50,10 @@ const z = (e) => {
|
|
|
50
50
|
left: 0
|
|
51
51
|
} : n = t.getBoundingClientRect(), r.top < n.bottom && r.bottom > n.top && r.right > n.left && r.left < n.right;
|
|
52
52
|
};
|
|
53
|
-
function
|
|
53
|
+
function fe(e) {
|
|
54
54
|
return /\w.(png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(e);
|
|
55
55
|
}
|
|
56
|
-
const
|
|
56
|
+
const ae = (e) => e == null, se = (e) => {
|
|
57
57
|
if (!e || !e.startsWith("http"))
|
|
58
58
|
return !1;
|
|
59
59
|
try {
|
|
@@ -61,7 +61,7 @@ const fe = (e) => e == null, se = (e) => {
|
|
|
61
61
|
} catch {
|
|
62
62
|
return !1;
|
|
63
63
|
}
|
|
64
|
-
},
|
|
64
|
+
}, le = (...e) => {
|
|
65
65
|
const t = {}, r = e.length;
|
|
66
66
|
let n, i = 0;
|
|
67
67
|
for (; i < r; i += 1)
|
|
@@ -83,7 +83,7 @@ const b = (e = 21) => {
|
|
|
83
83
|
t += n < 36 ? n.toString(36) : n < 62 ? (n - 26).toString(36).toUpperCase() : n < 63 ? "_" : "-";
|
|
84
84
|
}
|
|
85
85
|
return t;
|
|
86
|
-
},
|
|
86
|
+
}, de = () => typeof window > "u" ? b() : window.crypto && window.crypto.randomUUID && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : b();
|
|
87
87
|
function F(e, t) {
|
|
88
88
|
if (typeof t != "string" && !Array.isArray(t))
|
|
89
89
|
return;
|
|
@@ -96,17 +96,17 @@ function F(e, t) {
|
|
|
96
96
|
return;
|
|
97
97
|
return n;
|
|
98
98
|
}
|
|
99
|
-
const
|
|
99
|
+
const J = Object.prototype.toString;
|
|
100
100
|
function L(e, t) {
|
|
101
|
-
return
|
|
101
|
+
return J.call(e) === `[object ${t}]`;
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function D(e) {
|
|
104
104
|
return L(e, "Boolean");
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function pe(e) {
|
|
107
107
|
return typeof e == "number";
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function B(e) {
|
|
110
110
|
return typeof Array.isArray > "u" ? Object.prototype.toString.call(e) === "[object Array]" : Array.isArray(e);
|
|
111
111
|
}
|
|
112
112
|
function d(e) {
|
|
@@ -115,7 +115,7 @@ function d(e) {
|
|
|
115
115
|
function X(e) {
|
|
116
116
|
return typeof e == "string" || e instanceof String;
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function ge(e) {
|
|
119
119
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Function]";
|
|
120
120
|
}
|
|
121
121
|
function Y(...e) {
|
|
@@ -125,7 +125,7 @@ function Y(...e) {
|
|
|
125
125
|
if (n) {
|
|
126
126
|
if (X(n))
|
|
127
127
|
t.push(n);
|
|
128
|
-
else if (
|
|
128
|
+
else if (B(n))
|
|
129
129
|
for (let i = 0; i < n.length; i++) {
|
|
130
130
|
const o = Y(n[i]);
|
|
131
131
|
o && t.push(o);
|
|
@@ -137,11 +137,11 @@ function Y(...e) {
|
|
|
137
137
|
}
|
|
138
138
|
return t.filter((r) => r).join(" ");
|
|
139
139
|
}
|
|
140
|
-
let C = (e) => setTimeout(e, 16),
|
|
141
|
-
typeof window < "u" && "requestAnimationFrame" in window && (C = (e) => window.requestAnimationFrame(e),
|
|
140
|
+
let C = (e) => setTimeout(e, 16), P = (e) => clearTimeout(e);
|
|
141
|
+
typeof window < "u" && "requestAnimationFrame" in window && (C = (e) => window.requestAnimationFrame(e), P = (e) => window.cancelAnimationFrame(e));
|
|
142
142
|
let I = 0;
|
|
143
143
|
const S = /* @__PURE__ */ new Map();
|
|
144
|
-
function
|
|
144
|
+
function N(e) {
|
|
145
145
|
S.delete(e);
|
|
146
146
|
}
|
|
147
147
|
function x(e, t = 1) {
|
|
@@ -149,7 +149,7 @@ function x(e, t = 1) {
|
|
|
149
149
|
const r = I;
|
|
150
150
|
function n(i) {
|
|
151
151
|
if (i === 0)
|
|
152
|
-
|
|
152
|
+
N(r), e();
|
|
153
153
|
else {
|
|
154
154
|
const o = C(() => {
|
|
155
155
|
n(i - 1);
|
|
@@ -161,7 +161,7 @@ function x(e, t = 1) {
|
|
|
161
161
|
}
|
|
162
162
|
x.cancel = (e) => {
|
|
163
163
|
const t = S.get(e);
|
|
164
|
-
return
|
|
164
|
+
return N(t), P(t);
|
|
165
165
|
};
|
|
166
166
|
function v(e) {
|
|
167
167
|
return e != null && e === e.window;
|
|
@@ -178,14 +178,14 @@ function Q(e, t, r, n) {
|
|
|
178
178
|
const i = r - t;
|
|
179
179
|
return e /= n / 2, e < 1 ? i / 2 * e * e * e + t : i / 2 * ((e -= 2) * e * e + 2) + t;
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function me(e, t = {}) {
|
|
182
182
|
const { getContainer: r = () => window, callback: n, duration: i = 450 } = t, o = r(), u = G(o, !0), c = Date.now(), f = () => {
|
|
183
|
-
const
|
|
184
|
-
v(o) ? o.scrollTo(window.pageXOffset, l) : o instanceof HTMLDocument || o.constructor.name === "HTMLDocument" ? o.documentElement.scrollTop = l : o.scrollTop = l,
|
|
183
|
+
const s = Date.now() - c, l = Q(s > i ? i : s, u, e, i);
|
|
184
|
+
v(o) ? o.scrollTo(window.pageXOffset, l) : o instanceof HTMLDocument || o.constructor.name === "HTMLDocument" ? o.documentElement.scrollTop = l : o.scrollTop = l, s < i ? x(f) : typeof n == "function" && n();
|
|
185
185
|
};
|
|
186
186
|
x(f);
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function we(e) {
|
|
189
189
|
let t;
|
|
190
190
|
const r = (i) => () => {
|
|
191
191
|
t = null, e(...i);
|
|
@@ -285,16 +285,16 @@ function h(e, t, r, n) {
|
|
|
285
285
|
}
|
|
286
286
|
return e !== e && t !== t;
|
|
287
287
|
}
|
|
288
|
-
const Z = typeof process < "u" && process.versions != null && process.versions.node != null,
|
|
288
|
+
const Z = typeof process < "u" && process.versions != null && process.versions.node != null, ye = () => process.env.NODE_ENV === "TEST" ? !0 : typeof window < "u" && typeof window.document < "u" && typeof window.matchMedia < "u" && !Z, he = (e) => {
|
|
289
289
|
if (e && e !== !0)
|
|
290
290
|
return e;
|
|
291
|
-
},
|
|
291
|
+
}, xe = (e) => {
|
|
292
292
|
const t = {};
|
|
293
293
|
if (Object.keys(e || {}).forEach((r) => {
|
|
294
294
|
e[r] !== void 0 && (t[r] = e[r]);
|
|
295
295
|
}), !(Object.keys(t).length < 1))
|
|
296
296
|
return t;
|
|
297
|
-
},
|
|
297
|
+
}, ve = (e) => {
|
|
298
298
|
const t = {};
|
|
299
299
|
return Object.keys(e || {}).forEach((r) => {
|
|
300
300
|
var n;
|
|
@@ -307,47 +307,47 @@ function O(e) {
|
|
|
307
307
|
return Array.isArray(e) ? e[e.length - 1] : (t = e.split(":")) == null ? void 0 : t.slice(-1)[0];
|
|
308
308
|
}
|
|
309
309
|
function k(e) {
|
|
310
|
-
return e && (e.type ===
|
|
310
|
+
return e && (e.type === z || e.type === j && e.children.length === 0 || e.type === Text && e.children.trim() === "");
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function Ae(e, t) {
|
|
313
313
|
var r;
|
|
314
|
-
return
|
|
314
|
+
return M((r = e[t]) == null ? void 0 : r.call(e));
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function M(e = []) {
|
|
317
317
|
const t = [];
|
|
318
318
|
return e.forEach((r) => {
|
|
319
|
-
Array.isArray(r) ? t.push(...r) : (r == null ? void 0 : r.type) === j ? t.push(...
|
|
319
|
+
Array.isArray(r) ? t.push(...r) : (r == null ? void 0 : r.type) === j ? t.push(...M(r.children)) : t.push(r);
|
|
320
320
|
}), t.filter((r) => !k(r));
|
|
321
321
|
}
|
|
322
|
-
function
|
|
322
|
+
function V(e, ...t) {
|
|
323
323
|
return typeof e == "function" ? e == null ? void 0 : e(...t) : e;
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function K(e, t, r = "default", n) {
|
|
326
326
|
const i = O(r);
|
|
327
327
|
if (i) {
|
|
328
328
|
let o;
|
|
329
329
|
const u = F(t, r);
|
|
330
|
-
return u === !1 ? o = !1 : u === !0 ? o = e == null ? void 0 : e[i] : d(u) ? m(u) ? o = u : o = e == null ? void 0 : e[i] : o = u || (e == null ? void 0 : e[i]), m(o) ? o : n ?
|
|
330
|
+
return u === !1 ? o = !1 : u === !0 ? o = e == null ? void 0 : e[i] : d(u) ? m(u) ? o = u : o = e == null ? void 0 : e[i] : o = u || (e == null ? void 0 : e[i]), m(o) ? o : n ? V(o) : o;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
|
-
function
|
|
333
|
+
function ee(e, t, r = "default", n) {
|
|
334
334
|
var o, u, c;
|
|
335
335
|
const i = O(r);
|
|
336
336
|
if (i) {
|
|
337
337
|
let f;
|
|
338
|
-
const
|
|
339
|
-
return
|
|
338
|
+
const a = F(t, r);
|
|
339
|
+
return a === !1 ? f = !1 : a === !0 ? f = (o = e == null ? void 0 : e[i]) == null ? void 0 : o.call(e, n) : d(a) ? m(a) ? f = a : f = (u = e == null ? void 0 : e[i]) == null ? void 0 : u.call(e, n) : f = a || ((c = e == null ? void 0 : e[i]) == null ? void 0 : c.call(e, n)), m(f) ? f : V(f, n);
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
|
-
function Se(e, t, r) {
|
|
343
|
-
const
|
|
344
|
-
return e.forEach((
|
|
345
|
-
const
|
|
346
|
-
if (
|
|
347
|
-
const
|
|
348
|
-
(
|
|
342
|
+
function Se(e, t, r, n) {
|
|
343
|
+
const i = {};
|
|
344
|
+
return e.forEach((o) => {
|
|
345
|
+
const u = O(o);
|
|
346
|
+
if (u) {
|
|
347
|
+
const c = n != null && n.render ? ee(t, r, o, n == null ? void 0 : n.params) : K(t, r, o);
|
|
348
|
+
(D(c) || c) && (i[u] = c);
|
|
349
349
|
}
|
|
350
|
-
}),
|
|
350
|
+
}), i;
|
|
351
351
|
}
|
|
352
352
|
const Oe = ({ suffixCls: e, customizePrefixCls: t, isPor: r, className: n }) => {
|
|
353
353
|
const i = n || (r ? "gx-pro" : "gx");
|
|
@@ -362,7 +362,7 @@ function Ee(e, { align: t, showIndex: r }) {
|
|
|
362
362
|
align: t,
|
|
363
363
|
fixed: i.fixed,
|
|
364
364
|
width: 60,
|
|
365
|
-
uuid:
|
|
365
|
+
uuid: te().uuid(15),
|
|
366
366
|
dataIndex: "sortIndex",
|
|
367
367
|
key: "sortIndex"
|
|
368
368
|
});
|
|
@@ -426,7 +426,7 @@ function Le(e) {
|
|
|
426
426
|
}
|
|
427
427
|
return t.split(":")[0] === "00" ? `${t.split(":")[1]}:${t.split(":")[2]}` : t;
|
|
428
428
|
}
|
|
429
|
-
function
|
|
429
|
+
function te() {
|
|
430
430
|
const e = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
|
|
431
431
|
return {
|
|
432
432
|
uuid(t, r) {
|
|
@@ -467,13 +467,13 @@ function De(e = []) {
|
|
|
467
467
|
}
|
|
468
468
|
return r(e, 1), t;
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function ne(e, t = "children") {
|
|
471
471
|
let r = [];
|
|
472
472
|
return e.forEach((n) => {
|
|
473
|
-
r.push(n),
|
|
473
|
+
r.push(n), B(n[t]) && n[t].length > 0 && (r = r.concat(ne(n[t])));
|
|
474
474
|
}), r;
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function Be(e, t, r, n, i) {
|
|
477
477
|
t = t || "id", r = r || "parentId", n = n || "children", i = i || 0;
|
|
478
478
|
const o = JSON.parse(JSON.stringify(e));
|
|
479
479
|
return o.filter((u) => {
|
|
@@ -481,7 +481,7 @@ function Ce(e, t, r, n, i) {
|
|
|
481
481
|
return c.length > 0 ? u[n || "children"] = c : delete u[n || "children"], u[r || "parentId"] === i;
|
|
482
482
|
});
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function Ce(e) {
|
|
485
485
|
return URL.createObjectURL(e);
|
|
486
486
|
}
|
|
487
487
|
function Pe(e) {
|
|
@@ -506,15 +506,15 @@ function Me(e, t) {
|
|
|
506
506
|
u[o] = i.charCodeAt(o);
|
|
507
507
|
return new File([u], t, { type: n });
|
|
508
508
|
}
|
|
509
|
-
function
|
|
509
|
+
function Ve(e, t, r) {
|
|
510
510
|
return new window.File([e], t, { type: r });
|
|
511
511
|
}
|
|
512
|
-
function
|
|
512
|
+
function re(e = "") {
|
|
513
513
|
const t = e.indexOf("?");
|
|
514
514
|
return t > 0 ? `${e.substring(0, t)}` : e;
|
|
515
515
|
}
|
|
516
516
|
function A(e = "") {
|
|
517
|
-
e =
|
|
517
|
+
e = re(e);
|
|
518
518
|
const t = e.lastIndexOf(".");
|
|
519
519
|
return t > 0 ? `${e.substring(t).split("?")[0]}`.split(".")[1] : "";
|
|
520
520
|
}
|
|
@@ -526,7 +526,7 @@ function p(e, t) {
|
|
|
526
526
|
let r = "4";
|
|
527
527
|
return E(e) ? e.includes("data:image/") ? r = "png" : e.includes("data:video/") ? r = "mp4" : e.includes("data:audio/") && (r = "mp3") : e instanceof Blob ? (e = String(e), e.includes("image") ? r = "png" : e.includes("video") ? r = "mp4" : e.includes("audio") && (r = "mp3")) : r = A(e).toLowerCase(), g.imageType.includes(r) ? "1" : g.videoType.includes(r) ? "3" : g.audioType.includes(r) ? "2" : "4";
|
|
528
528
|
}
|
|
529
|
-
function
|
|
529
|
+
function ie(e) {
|
|
530
530
|
const { url: t = "", fileType: r = "1" } = e;
|
|
531
531
|
let n = "";
|
|
532
532
|
return t instanceof File ? n = URL.createObjectURL(t) : E(t) ? n = t : t instanceof Blob ? n = URL.createObjectURL(t) : (t.includes("https") || t.includes("http")) && (n = t), new Promise((i) => {
|
|
@@ -551,16 +551,16 @@ function re(e) {
|
|
|
551
551
|
};
|
|
552
552
|
});
|
|
553
553
|
}
|
|
554
|
-
async function
|
|
554
|
+
async function $e(e) {
|
|
555
555
|
const { url: t = "", currentTime: r, videoSuffix: n = "", vidoeAllowPlay: i = !1 } = e;
|
|
556
556
|
let o = "", u = n, c = "1", f;
|
|
557
|
-
return t instanceof File ? (o = URL.createObjectURL(t), u = A(t.name), c = p(t.name)) : t instanceof Blob ? (o = URL.createObjectURL(t), c = p(t)) : E(t) ? (o = t, c = p(t)) : (t.includes("https") || t.includes("http")) && (o = t, u = A(t), c = p(t)), (u ? g.videoAllowType.includes(u.toLowerCase()) : !1) ? i ? T(o, r) : (f = await
|
|
557
|
+
return t instanceof File ? (o = URL.createObjectURL(t), u = A(t.name), c = p(t.name)) : t instanceof Blob ? (o = URL.createObjectURL(t), c = p(t)) : E(t) ? (o = t, c = p(t)) : (t.includes("https") || t.includes("http")) && (o = t, u = A(t), c = p(t)), (u ? g.videoAllowType.includes(u.toLowerCase()) : !1) ? i ? T(o, r) : (f = await ie({
|
|
558
558
|
url: o,
|
|
559
559
|
fileType: c
|
|
560
|
-
}), f.play ? T(o, r) : new Promise((
|
|
561
|
-
|
|
562
|
-
})) : new Promise((
|
|
563
|
-
|
|
560
|
+
}), f.play ? T(o, r) : new Promise((s) => {
|
|
561
|
+
s("");
|
|
562
|
+
})) : new Promise((s) => {
|
|
563
|
+
s("");
|
|
564
564
|
});
|
|
565
565
|
}
|
|
566
566
|
async function T(e, t = 0) {
|
|
@@ -574,8 +574,8 @@ async function T(e, t = 0) {
|
|
|
574
574
|
const o = (n == null ? void 0 : n.duration) || 0;
|
|
575
575
|
for (; t < o; ) {
|
|
576
576
|
n && (n.currentTime = t), await new Promise(($) => i = $);
|
|
577
|
-
const u = document.createElement("canvas"), c = 0.8, f = u.getContext("2d"),
|
|
578
|
-
u.width = (n == null ? void 0 : n.videoWidth) || 0 * c, u.height = (n == null ? void 0 : n.videoHeight) || 0 * c, f.drawImage(n, 0, 0,
|
|
577
|
+
const u = document.createElement("canvas"), c = 0.8, f = u.getContext("2d"), a = (n == null ? void 0 : n.videoWidth) || 0 * c, s = (n == null ? void 0 : n.videoHeight) || 0 * c, l = 0;
|
|
578
|
+
u.width = (n == null ? void 0 : n.videoWidth) || 0 * c, u.height = (n == null ? void 0 : n.videoHeight) || 0 * c, f.drawImage(n, 0, 0, a + l, s + l), n = null, r(a === 0 || s === 0 ? "" : u.toDataURL("image/png", 1));
|
|
579
579
|
}
|
|
580
580
|
});
|
|
581
581
|
});
|
|
@@ -596,69 +596,73 @@ function He(e, t, r, n = !1) {
|
|
|
596
596
|
function We() {
|
|
597
597
|
return /windows|win32/i.test(navigator.userAgent);
|
|
598
598
|
}
|
|
599
|
+
function _e(e) {
|
|
600
|
+
return D(e) ? e : !!e;
|
|
601
|
+
}
|
|
599
602
|
export {
|
|
600
603
|
je as arrayRepeat,
|
|
601
|
-
|
|
604
|
+
Ve as blobToDataURL,
|
|
602
605
|
p as checkFileType,
|
|
603
606
|
Y as classNames,
|
|
604
607
|
Te as compareArray,
|
|
608
|
+
_e as convertValueBoolean,
|
|
605
609
|
Ne as dataURLtoBlob,
|
|
606
610
|
Me as dataURLtoFile,
|
|
607
611
|
U as deepCopy,
|
|
608
|
-
|
|
612
|
+
M as filterEmpty,
|
|
609
613
|
Le as formatDuraton,
|
|
610
614
|
Ue as genColumnKey,
|
|
611
615
|
T as generateVidoePicture,
|
|
612
616
|
Pe as getBase64,
|
|
613
|
-
|
|
617
|
+
Ce as getBlobUrl,
|
|
614
618
|
A as getFileSuffix,
|
|
615
|
-
|
|
619
|
+
ne as getLevelData,
|
|
616
620
|
De as getMaxFloor,
|
|
617
|
-
|
|
621
|
+
ie as getMediaInfos,
|
|
618
622
|
Oe as getPrefixCls,
|
|
619
|
-
|
|
623
|
+
te as getRandomNumber,
|
|
620
624
|
G as getScroll,
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
+
ue as getScrollContainer,
|
|
626
|
+
K as getSlot,
|
|
627
|
+
ee as getSlotVNode,
|
|
628
|
+
Ae as getSlotsChildren,
|
|
625
629
|
Se as getSlotsProps,
|
|
626
630
|
Ie as getSortIndex,
|
|
627
631
|
F as getValueFromObjectByKey,
|
|
628
|
-
|
|
629
|
-
|
|
632
|
+
$e as getVideoCoverPicture,
|
|
633
|
+
re as getVideoFileUrl,
|
|
630
634
|
g as globalConfig,
|
|
631
635
|
be as handleCurrentPage,
|
|
632
636
|
Ee as handleShowIndex,
|
|
633
637
|
Fe as hanndleField,
|
|
634
638
|
L as is,
|
|
635
|
-
|
|
639
|
+
B as isArray,
|
|
636
640
|
E as isBase64,
|
|
637
|
-
|
|
638
|
-
|
|
641
|
+
D as isBoolean,
|
|
642
|
+
ye as isBrowser,
|
|
639
643
|
h as isDeepEqualReact,
|
|
640
644
|
k as isEmptyElement,
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
645
|
+
ge as isFunction,
|
|
646
|
+
fe as isImg,
|
|
647
|
+
ce as isInContainer,
|
|
648
|
+
ae as isNil,
|
|
649
|
+
pe as isNumber,
|
|
646
650
|
d as isObject,
|
|
647
|
-
|
|
651
|
+
q as isScroll,
|
|
648
652
|
w as isServer,
|
|
649
653
|
X as isString,
|
|
650
654
|
se as isUrl,
|
|
651
655
|
We as isWindowsOs,
|
|
652
|
-
|
|
653
|
-
|
|
656
|
+
le as merge,
|
|
657
|
+
de as nanoid,
|
|
654
658
|
He as off,
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
659
|
+
he as omitBoolean,
|
|
660
|
+
xe as omitUndefined,
|
|
661
|
+
ve as omitUndefinedAndEmptyArr,
|
|
658
662
|
ze as on,
|
|
659
663
|
Re as runFunction,
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
+
me as scrollTo,
|
|
665
|
+
V as slotRender,
|
|
666
|
+
we as throttleByAnimationFrame,
|
|
667
|
+
Be as treeData
|
|
664
668
|
};
|
package/dist/pro-utils.umd.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(u,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],l):(u=typeof globalThis<"u"?globalThis:u||self,l(u.PorUtils={},u.vue))})(this,function(u,l){"use strict";const
|
|
1
|
+
(function(u,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],l):(u=typeof globalThis<"u"?globalThis:u||self,l(u.PorUtils={},u.vue))})(this,function(u,l){"use strict";const w=typeof window>"u";/**
|
|
2
2
|
* @vue/shared v3.5.11
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
|
-
**/process.env.NODE_ENV!=="production"&&Object.freeze({}),process.env.NODE_ENV!=="production"&&Object.freeze([]);const Q=e=>{const n=Object.create(null);return r=>n[r]||(n[r]=e(r))},Z=/-(\w)/g,k=Q(e=>e.replace(Z,(n,r)=>r?r.toUpperCase():"")),O=function(e,n){var r;if(p||!e||!n)return"";n=k(n),n==="float"&&(n="cssFloat");try{const t=e.style[n];if(t)return t;const i=(r=document==null?void 0:document.defaultView)==null?void 0:r.getComputedStyle(e,"");return i?i[n]:""}catch{return e.style[n]}},B=(e,n)=>p?void 0:(n==null?O(e,"overflow"):n?O(e,"overflow-y"):O(e,"overflow-x")).match(/(scroll|auto|overlay)/),K=(e,n)=>{if(p)return;let r=e;for(;r;){if([window,document,document.documentElement].includes(r))return window;if(B(r,n))return r;r=r.parentNode}return r},ee=(e,n)=>{if(p||!e||!n)return!1;const r=e.getBoundingClientRect();let t;return[window,document,document.documentElement,null,void 0].includes(n)?t={top:0,right:window.innerWidth,bottom:window.innerHeight,left:0}:t=n.getBoundingClientRect(),r.top<t.bottom&&r.bottom>t.top&&r.right>t.left&&r.left<t.right};function ne(e){return/\w.(png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(e)}const te=e=>e==null,re=e=>{if(!e||!e.startsWith("http"))return!1;try{return!!new URL(e)}catch{return!1}},ie=(...e)=>{const n={},r=e.length;let t,i=0;for(;i<r;i+=1)for(t in e[i])e[i].hasOwnProperty(t)&&(typeof n[t]=="object"&&typeof e[i][t]=="object"&&n[t]!==void 0&&n[t]!==null&&!Array.isArray(n[t])&&!Array.isArray(e[i][t])?n[t]={...n[t],...e[i][t]}:n[t]=e[i][t]);return n};let C=0;const N=(e=21)=>{if(typeof window>"u"||!window.crypto)return(C+=1).toFixed(0);let n="";const r=crypto.getRandomValues(new Uint8Array(e));for(;e--;){const t=63&r[e];n+=t<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t<63?"_":"-"}return n},oe=()=>typeof window>"u"?N():window.crypto&&window.crypto.randomUUID&&typeof crypto.randomUUID=="function"?crypto.randomUUID():N();function U(e,n){if(typeof n!="string"&&!Array.isArray(n))return;const r=Array.isArray(n)?n:n.split(":");let t=e;for(let i=0;i<r.length;i++)if(t&&t.hasOwnProperty(r[i]))t=t[r[i]];else return;return t}const ue=Object.prototype.toString;function R(e,n){return ue.call(e)===`[object ${n}]`}function P(e){return R(e,"Boolean")}function ce(e){return typeof e=="number"}function b(e){return typeof Array.isArray>"u"?Object.prototype.toString.call(e)==="[object Array]":Array.isArray(e)}function g(e){return e!==null&&R(e,"Object")}function V(e){return typeof e=="string"||e instanceof String}function fe(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function x(...e){const n=[];for(let r=0;r<e.length;r++){const t=e[r];if(t){if(V(t))n.push(t);else if(b(t))for(let i=0;i<t.length;i++){const o=x(t[i]);o&&n.push(o)}else if(g(t))for(const i in t)t[i]&&n.push(i)}}return n.filter(r=>r).join(" ")}let M=e=>setTimeout(e,16),$=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(M=e=>window.requestAnimationFrame(e),$=e=>window.cancelAnimationFrame(e));let z=0;const E=new Map;function W(e){E.delete(e)}function F(e,n=1){z+=1;const r=z;function t(i){if(i===0)W(r),e();else{const o=M(()=>{t(i-1)});E.set(r,o)}}return t(n),r}F.cancel=e=>{const n=E.get(e);return W(n),$(n)};function T(e){return e!=null&&e===e.window}function q(e,n){var i;if(typeof window>"u")return 0;const r=n?"scrollTop":"scrollLeft";let t=0;return T(e)?t=e[n?"pageYOffset":"pageXOffset"]:e instanceof Document?t=e.documentElement[r]:e&&(t=e[r]),e&&!T(e)&&typeof t!="number"&&(t=(i=(e.ownerDocument||e).documentElement)==null?void 0:i[r]),t}function ae(e,n,r,t){const i=r-n;return e/=t/2,e<1?i/2*e*e*e+n:i/2*((e-=2)*e*e+2)+n}function le(e,n={}){const{getContainer:r=()=>window,callback:t,duration:i=450}=n,o=r(),c=q(o,!0),f=Date.now(),a=()=>{const d=Date.now()-f,m=ae(d>i?i:d,c,e,i);T(o)?o.scrollTo(window.pageXOffset,m):o instanceof HTMLDocument||o.constructor.name==="HTMLDocument"?o.documentElement.scrollTop=m:o.scrollTop=m,d<i?F(a):typeof t=="function"&&t()};F(a)}function se(e){let n;const r=i=>()=>{n=null,e(...i)},t=(...i)=>{n==null&&(n=requestAnimationFrame(r(i)))};return t.cancel=()=>cancelAnimationFrame(n),t}const w={videoAllowType:["mp4","webm","ogg"],audioAllowType:["mp3"],imageType:["bmp","png","gif","jpg","jpeg","psd","tif"],videoType:["mp4","swf","rmvb","avi","flv","mpg","rm","mov","asf","3gp","mkv","ts","f4v","webm","m4v","3g2","m3u8"],audioType:["mp3","mpeg","aac","wav","wma","mp2","flac","midi","ra","ape","aac","cda"]};function h(e,n,r,t){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;let i,o,c;if(Array.isArray(e)){if(i=e.length,i!=n.length)return!1;for(o=i;o--!==0;)if(!h(e[o],n[o],r,t))return!1;return!0}if(e instanceof Map&&n instanceof Map){if(e.size!==n.size)return!1;for(o of e.entries())if(!n.has(o[0]))return!1;for(o of e.entries())if(!h(o[1],n.get(o[0]),r,t))return!1;return!0}if(e instanceof Set&&n instanceof Set){if(e.size!==n.size)return!1;for(o of e.entries())if(!n.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(n)){if(i=e.length,i!=n.length)return!1;for(o=i;o--!==0;)if(e[o]!==n[o])return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf&&e.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString&&e.toString)return e.toString()===n.toString();if(c=Object.keys(e),i=c.length,i!==Object.keys(n).length)return!1;for(o=i;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,c[o]))return!1;for(o=i;o--!==0;){const f=c[o];if(!(r!=null&&r.includes(f))&&!(f==="_owner"&&e.$$typeof)&&!h(e[f],n[f],r,t))return t&&console.log(f),!1}return!0}return e!==e&&n!==n}const de=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,ge=()=>process.env.NODE_ENV==="TEST"?!0:typeof window<"u"&&typeof window.document<"u"&&typeof window.matchMedia<"u"&&!de,me=e=>{if(e&&e!==!0)return e},pe=e=>{const n={};if(Object.keys(e||{}).forEach(r=>{e[r]!==void 0&&(n[r]=e[r])}),!(Object.keys(n).length<1))return n},we=e=>{const n={};return Object.keys(e||{}).forEach(r=>{var t;Array.isArray(e[r])&&((t=e[r])==null?void 0:t.length)===0||e[r]!==void 0&&(n[r]=e[r])}),n};function I(e){var n;if(!(typeof e!="string"&&!Array.isArray(e)))return Array.isArray(e)?e[e.length-1]:(n=e.split(":"))==null?void 0:n.slice(-1)[0]}function H(e){return e&&(e.type===l.Comment||e.type===l.Fragment&&e.children.length===0||e.type===Text&&e.children.trim()==="")}function ye(e,n){var r;return j((r=e[n])==null?void 0:r.call(e))}function j(e=[]){const n=[];return e.forEach(r=>{Array.isArray(r)?n.push(...r):(r==null?void 0:r.type)===l.Fragment?n.push(...j(r.children)):n.push(r)}),n.filter(r=>!H(r))}function D(e,...n){return typeof e=="function"?e==null?void 0:e(...n):e}function he(e,n,r="default",t){const i=I(r);if(i){let o;const c=U(n,r);return c===!1?o=!1:c===!0?o=e==null?void 0:e[i]:g(c)?l.isVNode(c)?o=c:o=e==null?void 0:e[i]:o=c||(e==null?void 0:e[i]),l.isVNode(o)?o:t?D(o):o}}function _(e,n,r="default",t){var o,c,f;const i=I(r);if(i){let a;const s=U(n,r);return s===!1?a=!1:s===!0?a=(o=e==null?void 0:e[i])==null?void 0:o.call(e,t):g(s)?l.isVNode(s)?a=s:a=(c=e==null?void 0:e[i])==null?void 0:c.call(e,t):a=s||((f=e==null?void 0:e[i])==null?void 0:f.call(e,t)),l.isVNode(a)?a:D(a,t)}}function Se(e,n,r){const t={};return e.forEach(i=>{const o=I(i);if(o){const c=_(n,r,i);(P(c)||c)&&(t[o]=c)}}),t}const ve=({suffixCls:e,customizePrefixCls:n,isPor:r,className:t})=>{const i=t||(r?"gx-pro":"gx");return n||(e?`${i}-${e}`:i)},Ae=(e,n)=>e?Array.isArray(e)?e.join("-"):e.toString():`${n}`;function Oe(e,{align:n,showIndex:r}){const t=S(e);if(r&&e.length&&e.every(i=>i.dataIndex!=="sortIndex")){const i=e[0];t.unshift({title:"序号",align:n,fixed:i.fixed,width:60,uuid:J().uuid(15),dataIndex:"sortIndex",key:"sortIndex"})}else t.filter(i=>i.dataIndex!=="sortIndex");return t}function Ue(e,...n){return typeof e=="function"?e(...n):e}function S(e){return JSON.parse(JSON.stringify(e))}function Re(e,n){if(g(e)){const{pageSize:r=10,total:t=0}=e;let{current:i=1}=e;return t-n<=r*(i-1)&&(i=i-1),i===0?1:i}return 1}function be(e=[],n,r="children"){function t(i,o){return o.map((c,f)=>{const a=`${i}-${f+1}`;return c[r]&&(c[r]=t(a,c[r])),c.sortIndex=a,c})}return S(e).map((i,o)=>{let c=o;const f=g(n)&&n.current||1,a=g(n)&&n.pageSize||10;return c=f?(f-1)*a+(o+1):o+1,i[r]&&(i[r]=t(`${c}`,i[r])),i.sortIndex=c,i})}function Ee(e,n,r,t){const i=e[r],o=n[r];let c=0;return i<o?c=t===0?-1:0:i>o&&(c=t===0?0:-1),c}function Fe(e){let n=S(e);const r=new Set(n);return n=Array.from(r),n}function Te(e,n){const r=["null","undefined"];let t=!0;return e===0?t=!0:r.includes(e)?t=!1:e||(t=!1),t?{value:e,success:t}:{value:n===""?n:n||"-",success:t}}function Ie(e){let n="";if(e>-1){const r=Math.floor(e/3600),t=Math.floor(e/60)%60,i=Number.parseInt(String(e%60));r<10?n="0"+r+":":n=r+":",t<10&&(n+="0"),n+=t+":",i<10&&(n+="0"),n+=i}return n.split(":")[0]==="00"?`${n.split(":")[1]}:${n.split(":")[2]}`:n}function J(){const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");return{uuid(n,r){const t=e,i=[],o=r||t.length;let c,f;if(n)for(c=0;c<n;c+=1)i[c]=t[Number.parseInt(String(Math.random()*o))];else for(i[8]="-",i[13]="-",i[18]="-",i[23]="-",i[14]="4",c=0;c<36;c+=1)i[c]||(f=Math.random()*16,i[c]=t[c===19?f&&3||8:f]);return i.join("")},uuidFast(){const n=e,r=Array.from({length:36});let t=0,i,o;for(o=0;o<36;o+=1)o===8||o===13||o===18||o===23?r[o]="-":o===14?r[o]="4":(t<=2&&(t=33554432+Math.random()*16777216||0),i=t&&15,t=t>4,r[o]=n[o===19?i&&3||8:i]);return r.join("")},uuidString(){return this.uuidFast().replace(new RegExp("-","g"),"")},uuidCompact(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,n=>{const r=Math.random()*16||0;return(n==="x"?r:r&&3||8).toString(16)})}}}function je(e=[]){let n=0;function r(t=[],i){t.forEach(o=>{o.floor=i,i>n&&(n=i),o.children&&o.children.length>0&&r(o.children,i+1)})}return r(e,1),n}function X(e,n="children"){let r=[];return e.forEach(t=>{r.push(t),b(t[n])&&t[n].length>0&&(r=r.concat(X(t[n])))}),r}function De(e,n,r,t,i){n=n||"id",r=r||"parentId",t=t||"children",i=i||0;const o=JSON.parse(JSON.stringify(e));return o.filter(c=>{const f=o.filter(a=>c[n]===a[r||"parentId"]);return f.length>0?c[t||"children"]=f:delete c[t||"children"],c[r||"parentId"]===i})}function Le(e){return URL.createObjectURL(e)}function Be(e){return new Promise((n,r)=>{const t=new FileReader;t.readAsDataURL(e),t.onload=()=>n(t.result),t.onerror=i=>r(i)})}function Ce(e){const n=e.split(","),r=n[0].match(/:(.*?);/)[1],t=atob(n[1]);let i=t.length;const o=new Uint8Array(i);for(;i--;)o[i]=t.charCodeAt(i);return new Blob([o],{type:r})}function Ne(e,n){const r=e.split(","),t=r[0].match(/:(.*?);/)[1],i=atob(r[1]);let o=i.length;const c=new Uint8Array(o);for(;o--;)c[o]=i.charCodeAt(o);return new File([c],n,{type:t})}function Pe(e,n,r){return new window.File([e],n,{type:r})}function Y(e=""){const n=e.indexOf("?");return n>0?`${e.substring(0,n)}`:e}function v(e=""){e=Y(e);const n=e.lastIndexOf(".");return n>0?`${e.substring(n).split("?")[0]}`.split(".")[1]:""}function y(e,n){if(n)return n;if(!e||e==="data:")return"4";let r="4";return A(e)?e.includes("data:image/")?r="png":e.includes("data:video/")?r="mp4":e.includes("data:audio/")&&(r="mp3"):e instanceof Blob?(e=String(e),e.includes("image")?r="png":e.includes("video")?r="mp4":e.includes("audio")&&(r="mp3")):r=v(e).toLowerCase(),w.imageType.includes(r)?"1":w.videoType.includes(r)?"3":w.audioType.includes(r)?"2":"4"}function G(e){const{url:n="",fileType:r="1"}=e;let t="";return n instanceof File?t=URL.createObjectURL(n):A(n)?t=n:n instanceof Blob?t=URL.createObjectURL(n):(n.includes("https")||n.includes("http"))&&(t=n),new Promise(i=>{let o;r==="1"?(o=document.createElement("img"),o.src=t):r==="2"?(o=document.createElement("audio"),o.src=t):r==="3"&&(o=document.createElement("video"),o.src=t),r==="1"?o.onload=function(){i({play:!0,width:o.width||0,height:o.height||0}),o=null}:o.oncanplay=function(){i({play:!0,duration:o.duration,width:(o==null?void 0:o.videoWidth)||0,height:(o==null?void 0:o.videoHeight)||0}),o=null},o.onerror=function(){i({play:!1}),o=null}})}async function Ve(e){const{url:n="",currentTime:r,videoSuffix:t="",vidoeAllowPlay:i=!1}=e;let o="",c=t,f="1",a;return n instanceof File?(o=URL.createObjectURL(n),c=v(n.name),f=y(n.name)):n instanceof Blob?(o=URL.createObjectURL(n),f=y(n)):A(n)?(o=n,f=y(n)):(n.includes("https")||n.includes("http"))&&(o=n,c=v(n),f=y(n)),(c?w.videoAllowType.includes(c.toLowerCase()):!1)?i?L(o,r):(a=await G({url:o,fileType:f}),a.play?L(o,r):new Promise(d=>{d("")})):new Promise(d=>{d("")})}async function L(e,n=0){return new Promise(r=>{let t=document.createElement("video");t.controls=!0,t.muted=!0,t.setAttribute("src",e),t.setAttribute("muted",String(!0)),t.setAttribute("crossorigin","anonymous"),t.setAttribute("autoplay",String(!0)),t&&t.addEventListener("loadeddata",async function(){let i;t==null||t.addEventListener("seeked",async function(){i&&i()});const o=(t==null?void 0:t.duration)||0;for(;n<o;){t&&(t.currentTime=n),await new Promise(ze=>i=ze);const c=document.createElement("canvas"),f=.8,a=c.getContext("2d"),s=(t==null?void 0:t.videoWidth)||0*f,d=(t==null?void 0:t.videoHeight)||0*f,m=0;c.width=(t==null?void 0:t.videoWidth)||0*f,c.height=(t==null?void 0:t.videoHeight)||0*f,a.drawImage(t,0,0,s+m,d+m),t=null,r(s===0||d===0?"":c.toDataURL("image/png",1))}})})}function A(e=""){return!!(e&&["data:image/","data:video/","data:audio/"].find(r=>e.includes(r)))}function xe(e,n,r,t=!1){e&&n&&r&&e.addEventListener(n,r,t)}function Me(e,n,r,t=!1){e&&n&&r&&e.removeEventListener(n,r,t)}function $e(){return/windows|win32/i.test(navigator.userAgent)}u.arrayRepeat=Fe,u.blobToDataURL=Pe,u.checkFileType=y,u.classNames=x,u.compareArray=Ee,u.dataURLtoBlob=Ce,u.dataURLtoFile=Ne,u.deepCopy=S,u.filterEmpty=j,u.formatDuraton=Ie,u.genColumnKey=Ae,u.generateVidoePicture=L,u.getBase64=Be,u.getBlobUrl=Le,u.getFileSuffix=v,u.getLevelData=X,u.getMaxFloor=je,u.getMediaInfos=G,u.getPrefixCls=ve,u.getRandomNumber=J,u.getScroll=q,u.getScrollContainer=K,u.getSlot=he,u.getSlotVNode=_,u.getSlotsChildren=ye,u.getSlotsProps=Se,u.getSortIndex=be,u.getValueFromObjectByKey=U,u.getVideoCoverPicture=Ve,u.getVideoFileUrl=Y,u.globalConfig=w,u.handleCurrentPage=Re,u.handleShowIndex=Oe,u.hanndleField=Te,u.is=R,u.isArray=b,u.isBase64=A,u.isBoolean=P,u.isBrowser=ge,u.isDeepEqualReact=h,u.isEmptyElement=H,u.isFunction=fe,u.isImg=ne,u.isInContainer=ee,u.isNil=te,u.isNumber=ce,u.isObject=g,u.isScroll=B,u.isServer=p,u.isString=V,u.isUrl=re,u.isWindowsOs=$e,u.merge=ie,u.nanoid=oe,u.off=Me,u.omitBoolean=me,u.omitUndefined=pe,u.omitUndefinedAndEmptyArr=we,u.on=xe,u.runFunction=Ue,u.scrollTo=le,u.slotRender=D,u.throttleByAnimationFrame=se,u.treeData=De,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
|
|
5
|
+
**/process.env.NODE_ENV!=="production"&&Object.freeze({}),process.env.NODE_ENV!=="production"&&Object.freeze([]);const Z=e=>{const n=Object.create(null);return r=>n[r]||(n[r]=e(r))},k=/-(\w)/g,K=Z(e=>e.replace(k,(n,r)=>r?r.toUpperCase():"")),O=function(e,n){var r;if(w||!e||!n)return"";n=K(n),n==="float"&&(n="cssFloat");try{const t=e.style[n];if(t)return t;const i=(r=document==null?void 0:document.defaultView)==null?void 0:r.getComputedStyle(e,"");return i?i[n]:""}catch{return e.style[n]}},C=(e,n)=>w?void 0:(n==null?O(e,"overflow"):n?O(e,"overflow-y"):O(e,"overflow-x")).match(/(scroll|auto|overlay)/),ee=(e,n)=>{if(w)return;let r=e;for(;r;){if([window,document,document.documentElement].includes(r))return window;if(C(r,n))return r;r=r.parentNode}return r},ne=(e,n)=>{if(w||!e||!n)return!1;const r=e.getBoundingClientRect();let t;return[window,document,document.documentElement,null,void 0].includes(n)?t={top:0,right:window.innerWidth,bottom:window.innerHeight,left:0}:t=n.getBoundingClientRect(),r.top<t.bottom&&r.bottom>t.top&&r.right>t.left&&r.left<t.right};function te(e){return/\w.(png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(e)}const re=e=>e==null,ie=e=>{if(!e||!e.startsWith("http"))return!1;try{return!!new URL(e)}catch{return!1}},oe=(...e)=>{const n={},r=e.length;let t,i=0;for(;i<r;i+=1)for(t in e[i])e[i].hasOwnProperty(t)&&(typeof n[t]=="object"&&typeof e[i][t]=="object"&&n[t]!==void 0&&n[t]!==null&&!Array.isArray(n[t])&&!Array.isArray(e[i][t])?n[t]={...n[t],...e[i][t]}:n[t]=e[i][t]);return n};let N=0;const P=(e=21)=>{if(typeof window>"u"||!window.crypto)return(N+=1).toFixed(0);let n="";const r=crypto.getRandomValues(new Uint8Array(e));for(;e--;){const t=63&r[e];n+=t<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t<63?"_":"-"}return n},ue=()=>typeof window>"u"?P():window.crypto&&window.crypto.randomUUID&&typeof crypto.randomUUID=="function"?crypto.randomUUID():P();function U(e,n){if(typeof n!="string"&&!Array.isArray(n))return;const r=Array.isArray(n)?n:n.split(":");let t=e;for(let i=0;i<r.length;i++)if(t&&t.hasOwnProperty(r[i]))t=t[r[i]];else return;return t}const ce=Object.prototype.toString;function R(e,n){return ce.call(e)===`[object ${n}]`}function b(e){return R(e,"Boolean")}function fe(e){return typeof e=="number"}function E(e){return typeof Array.isArray>"u"?Object.prototype.toString.call(e)==="[object Array]":Array.isArray(e)}function g(e){return e!==null&&R(e,"Object")}function V(e){return typeof e=="string"||e instanceof String}function ae(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function x(...e){const n=[];for(let r=0;r<e.length;r++){const t=e[r];if(t){if(V(t))n.push(t);else if(E(t))for(let i=0;i<t.length;i++){const o=x(t[i]);o&&n.push(o)}else if(g(t))for(const i in t)t[i]&&n.push(i)}}return n.filter(r=>r).join(" ")}let M=e=>setTimeout(e,16),$=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(M=e=>window.requestAnimationFrame(e),$=e=>window.cancelAnimationFrame(e));let z=0;const F=new Map;function W(e){F.delete(e)}function T(e,n=1){z+=1;const r=z;function t(i){if(i===0)W(r),e();else{const o=M(()=>{t(i-1)});F.set(r,o)}}return t(n),r}T.cancel=e=>{const n=F.get(e);return W(n),$(n)};function I(e){return e!=null&&e===e.window}function q(e,n){var i;if(typeof window>"u")return 0;const r=n?"scrollTop":"scrollLeft";let t=0;return I(e)?t=e[n?"pageYOffset":"pageXOffset"]:e instanceof Document?t=e.documentElement[r]:e&&(t=e[r]),e&&!I(e)&&typeof t!="number"&&(t=(i=(e.ownerDocument||e).documentElement)==null?void 0:i[r]),t}function le(e,n,r,t){const i=r-n;return e/=t/2,e<1?i/2*e*e*e+n:i/2*((e-=2)*e*e+2)+n}function se(e,n={}){const{getContainer:r=()=>window,callback:t,duration:i=450}=n,o=r(),c=q(o,!0),f=Date.now(),a=()=>{const d=Date.now()-f,m=le(d>i?i:d,c,e,i);I(o)?o.scrollTo(window.pageXOffset,m):o instanceof HTMLDocument||o.constructor.name==="HTMLDocument"?o.documentElement.scrollTop=m:o.scrollTop=m,d<i?T(a):typeof t=="function"&&t()};T(a)}function de(e){let n;const r=i=>()=>{n=null,e(...i)},t=(...i)=>{n==null&&(n=requestAnimationFrame(r(i)))};return t.cancel=()=>cancelAnimationFrame(n),t}const y={videoAllowType:["mp4","webm","ogg"],audioAllowType:["mp3"],imageType:["bmp","png","gif","jpg","jpeg","psd","tif"],videoType:["mp4","swf","rmvb","avi","flv","mpg","rm","mov","asf","3gp","mkv","ts","f4v","webm","m4v","3g2","m3u8"],audioType:["mp3","mpeg","aac","wav","wma","mp2","flac","midi","ra","ape","aac","cda"]};function h(e,n,r,t){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;let i,o,c;if(Array.isArray(e)){if(i=e.length,i!=n.length)return!1;for(o=i;o--!==0;)if(!h(e[o],n[o],r,t))return!1;return!0}if(e instanceof Map&&n instanceof Map){if(e.size!==n.size)return!1;for(o of e.entries())if(!n.has(o[0]))return!1;for(o of e.entries())if(!h(o[1],n.get(o[0]),r,t))return!1;return!0}if(e instanceof Set&&n instanceof Set){if(e.size!==n.size)return!1;for(o of e.entries())if(!n.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(n)){if(i=e.length,i!=n.length)return!1;for(o=i;o--!==0;)if(e[o]!==n[o])return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf&&e.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString&&e.toString)return e.toString()===n.toString();if(c=Object.keys(e),i=c.length,i!==Object.keys(n).length)return!1;for(o=i;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,c[o]))return!1;for(o=i;o--!==0;){const f=c[o];if(!(r!=null&&r.includes(f))&&!(f==="_owner"&&e.$$typeof)&&!h(e[f],n[f],r,t))return t&&console.log(f),!1}return!0}return e!==e&&n!==n}const ge=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,me=()=>process.env.NODE_ENV==="TEST"?!0:typeof window<"u"&&typeof window.document<"u"&&typeof window.matchMedia<"u"&&!ge,we=e=>{if(e&&e!==!0)return e},ye=e=>{const n={};if(Object.keys(e||{}).forEach(r=>{e[r]!==void 0&&(n[r]=e[r])}),!(Object.keys(n).length<1))return n},pe=e=>{const n={};return Object.keys(e||{}).forEach(r=>{var t;Array.isArray(e[r])&&((t=e[r])==null?void 0:t.length)===0||e[r]!==void 0&&(n[r]=e[r])}),n};function j(e){var n;if(!(typeof e!="string"&&!Array.isArray(e)))return Array.isArray(e)?e[e.length-1]:(n=e.split(":"))==null?void 0:n.slice(-1)[0]}function H(e){return e&&(e.type===l.Comment||e.type===l.Fragment&&e.children.length===0||e.type===Text&&e.children.trim()==="")}function he(e,n){var r;return B((r=e[n])==null?void 0:r.call(e))}function B(e=[]){const n=[];return e.forEach(r=>{Array.isArray(r)?n.push(...r):(r==null?void 0:r.type)===l.Fragment?n.push(...B(r.children)):n.push(r)}),n.filter(r=>!H(r))}function D(e,...n){return typeof e=="function"?e==null?void 0:e(...n):e}function _(e,n,r="default",t){const i=j(r);if(i){let o;const c=U(n,r);return c===!1?o=!1:c===!0?o=e==null?void 0:e[i]:g(c)?l.isVNode(c)?o=c:o=e==null?void 0:e[i]:o=c||(e==null?void 0:e[i]),l.isVNode(o)?o:t?D(o):o}}function J(e,n,r="default",t){var o,c,f;const i=j(r);if(i){let a;const s=U(n,r);return s===!1?a=!1:s===!0?a=(o=e==null?void 0:e[i])==null?void 0:o.call(e,t):g(s)?l.isVNode(s)?a=s:a=(c=e==null?void 0:e[i])==null?void 0:c.call(e,t):a=s||((f=e==null?void 0:e[i])==null?void 0:f.call(e,t)),l.isVNode(a)?a:D(a,t)}}function Se(e,n,r,t){const i={};return e.forEach(o=>{const c=j(o);if(c){const f=t!=null&&t.render?J(n,r,o,t==null?void 0:t.params):_(n,r,o);(b(f)||f)&&(i[c]=f)}}),i}const ve=({suffixCls:e,customizePrefixCls:n,isPor:r,className:t})=>{const i=t||(r?"gx-pro":"gx");return n||(e?`${i}-${e}`:i)},Ae=(e,n)=>e?Array.isArray(e)?e.join("-"):e.toString():`${n}`;function Oe(e,{align:n,showIndex:r}){const t=S(e);if(r&&e.length&&e.every(i=>i.dataIndex!=="sortIndex")){const i=e[0];t.unshift({title:"序号",align:n,fixed:i.fixed,width:60,uuid:X().uuid(15),dataIndex:"sortIndex",key:"sortIndex"})}else t.filter(i=>i.dataIndex!=="sortIndex");return t}function Ue(e,...n){return typeof e=="function"?e(...n):e}function S(e){return JSON.parse(JSON.stringify(e))}function Re(e,n){if(g(e)){const{pageSize:r=10,total:t=0}=e;let{current:i=1}=e;return t-n<=r*(i-1)&&(i=i-1),i===0?1:i}return 1}function be(e=[],n,r="children"){function t(i,o){return o.map((c,f)=>{const a=`${i}-${f+1}`;return c[r]&&(c[r]=t(a,c[r])),c.sortIndex=a,c})}return S(e).map((i,o)=>{let c=o;const f=g(n)&&n.current||1,a=g(n)&&n.pageSize||10;return c=f?(f-1)*a+(o+1):o+1,i[r]&&(i[r]=t(`${c}`,i[r])),i.sortIndex=c,i})}function Ee(e,n,r,t){const i=e[r],o=n[r];let c=0;return i<o?c=t===0?-1:0:i>o&&(c=t===0?0:-1),c}function Fe(e){let n=S(e);const r=new Set(n);return n=Array.from(r),n}function Te(e,n){const r=["null","undefined"];let t=!0;return e===0?t=!0:r.includes(e)?t=!1:e||(t=!1),t?{value:e,success:t}:{value:n===""?n:n||"-",success:t}}function Ie(e){let n="";if(e>-1){const r=Math.floor(e/3600),t=Math.floor(e/60)%60,i=Number.parseInt(String(e%60));r<10?n="0"+r+":":n=r+":",t<10&&(n+="0"),n+=t+":",i<10&&(n+="0"),n+=i}return n.split(":")[0]==="00"?`${n.split(":")[1]}:${n.split(":")[2]}`:n}function X(){const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");return{uuid(n,r){const t=e,i=[],o=r||t.length;let c,f;if(n)for(c=0;c<n;c+=1)i[c]=t[Number.parseInt(String(Math.random()*o))];else for(i[8]="-",i[13]="-",i[18]="-",i[23]="-",i[14]="4",c=0;c<36;c+=1)i[c]||(f=Math.random()*16,i[c]=t[c===19?f&&3||8:f]);return i.join("")},uuidFast(){const n=e,r=Array.from({length:36});let t=0,i,o;for(o=0;o<36;o+=1)o===8||o===13||o===18||o===23?r[o]="-":o===14?r[o]="4":(t<=2&&(t=33554432+Math.random()*16777216||0),i=t&&15,t=t>4,r[o]=n[o===19?i&&3||8:i]);return r.join("")},uuidString(){return this.uuidFast().replace(new RegExp("-","g"),"")},uuidCompact(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,n=>{const r=Math.random()*16||0;return(n==="x"?r:r&&3||8).toString(16)})}}}function je(e=[]){let n=0;function r(t=[],i){t.forEach(o=>{o.floor=i,i>n&&(n=i),o.children&&o.children.length>0&&r(o.children,i+1)})}return r(e,1),n}function Y(e,n="children"){let r=[];return e.forEach(t=>{r.push(t),E(t[n])&&t[n].length>0&&(r=r.concat(Y(t[n])))}),r}function Be(e,n,r,t,i){n=n||"id",r=r||"parentId",t=t||"children",i=i||0;const o=JSON.parse(JSON.stringify(e));return o.filter(c=>{const f=o.filter(a=>c[n]===a[r||"parentId"]);return f.length>0?c[t||"children"]=f:delete c[t||"children"],c[r||"parentId"]===i})}function De(e){return URL.createObjectURL(e)}function Le(e){return new Promise((n,r)=>{const t=new FileReader;t.readAsDataURL(e),t.onload=()=>n(t.result),t.onerror=i=>r(i)})}function Ce(e){const n=e.split(","),r=n[0].match(/:(.*?);/)[1],t=atob(n[1]);let i=t.length;const o=new Uint8Array(i);for(;i--;)o[i]=t.charCodeAt(i);return new Blob([o],{type:r})}function Ne(e,n){const r=e.split(","),t=r[0].match(/:(.*?);/)[1],i=atob(r[1]);let o=i.length;const c=new Uint8Array(o);for(;o--;)c[o]=i.charCodeAt(o);return new File([c],n,{type:t})}function Pe(e,n,r){return new window.File([e],n,{type:r})}function G(e=""){const n=e.indexOf("?");return n>0?`${e.substring(0,n)}`:e}function v(e=""){e=G(e);const n=e.lastIndexOf(".");return n>0?`${e.substring(n).split("?")[0]}`.split(".")[1]:""}function p(e,n){if(n)return n;if(!e||e==="data:")return"4";let r="4";return A(e)?e.includes("data:image/")?r="png":e.includes("data:video/")?r="mp4":e.includes("data:audio/")&&(r="mp3"):e instanceof Blob?(e=String(e),e.includes("image")?r="png":e.includes("video")?r="mp4":e.includes("audio")&&(r="mp3")):r=v(e).toLowerCase(),y.imageType.includes(r)?"1":y.videoType.includes(r)?"3":y.audioType.includes(r)?"2":"4"}function Q(e){const{url:n="",fileType:r="1"}=e;let t="";return n instanceof File?t=URL.createObjectURL(n):A(n)?t=n:n instanceof Blob?t=URL.createObjectURL(n):(n.includes("https")||n.includes("http"))&&(t=n),new Promise(i=>{let o;r==="1"?(o=document.createElement("img"),o.src=t):r==="2"?(o=document.createElement("audio"),o.src=t):r==="3"&&(o=document.createElement("video"),o.src=t),r==="1"?o.onload=function(){i({play:!0,width:o.width||0,height:o.height||0}),o=null}:o.oncanplay=function(){i({play:!0,duration:o.duration,width:(o==null?void 0:o.videoWidth)||0,height:(o==null?void 0:o.videoHeight)||0}),o=null},o.onerror=function(){i({play:!1}),o=null}})}async function Ve(e){const{url:n="",currentTime:r,videoSuffix:t="",vidoeAllowPlay:i=!1}=e;let o="",c=t,f="1",a;return n instanceof File?(o=URL.createObjectURL(n),c=v(n.name),f=p(n.name)):n instanceof Blob?(o=URL.createObjectURL(n),f=p(n)):A(n)?(o=n,f=p(n)):(n.includes("https")||n.includes("http"))&&(o=n,c=v(n),f=p(n)),(c?y.videoAllowType.includes(c.toLowerCase()):!1)?i?L(o,r):(a=await Q({url:o,fileType:f}),a.play?L(o,r):new Promise(d=>{d("")})):new Promise(d=>{d("")})}async function L(e,n=0){return new Promise(r=>{let t=document.createElement("video");t.controls=!0,t.muted=!0,t.setAttribute("src",e),t.setAttribute("muted",String(!0)),t.setAttribute("crossorigin","anonymous"),t.setAttribute("autoplay",String(!0)),t&&t.addEventListener("loadeddata",async function(){let i;t==null||t.addEventListener("seeked",async function(){i&&i()});const o=(t==null?void 0:t.duration)||0;for(;n<o;){t&&(t.currentTime=n),await new Promise(We=>i=We);const c=document.createElement("canvas"),f=.8,a=c.getContext("2d"),s=(t==null?void 0:t.videoWidth)||0*f,d=(t==null?void 0:t.videoHeight)||0*f,m=0;c.width=(t==null?void 0:t.videoWidth)||0*f,c.height=(t==null?void 0:t.videoHeight)||0*f,a.drawImage(t,0,0,s+m,d+m),t=null,r(s===0||d===0?"":c.toDataURL("image/png",1))}})})}function A(e=""){return!!(e&&["data:image/","data:video/","data:audio/"].find(r=>e.includes(r)))}function xe(e,n,r,t=!1){e&&n&&r&&e.addEventListener(n,r,t)}function Me(e,n,r,t=!1){e&&n&&r&&e.removeEventListener(n,r,t)}function $e(){return/windows|win32/i.test(navigator.userAgent)}function ze(e){return b(e)?e:!!e}u.arrayRepeat=Fe,u.blobToDataURL=Pe,u.checkFileType=p,u.classNames=x,u.compareArray=Ee,u.convertValueBoolean=ze,u.dataURLtoBlob=Ce,u.dataURLtoFile=Ne,u.deepCopy=S,u.filterEmpty=B,u.formatDuraton=Ie,u.genColumnKey=Ae,u.generateVidoePicture=L,u.getBase64=Le,u.getBlobUrl=De,u.getFileSuffix=v,u.getLevelData=Y,u.getMaxFloor=je,u.getMediaInfos=Q,u.getPrefixCls=ve,u.getRandomNumber=X,u.getScroll=q,u.getScrollContainer=ee,u.getSlot=_,u.getSlotVNode=J,u.getSlotsChildren=he,u.getSlotsProps=Se,u.getSortIndex=be,u.getValueFromObjectByKey=U,u.getVideoCoverPicture=Ve,u.getVideoFileUrl=G,u.globalConfig=y,u.handleCurrentPage=Re,u.handleShowIndex=Oe,u.hanndleField=Te,u.is=R,u.isArray=E,u.isBase64=A,u.isBoolean=b,u.isBrowser=me,u.isDeepEqualReact=h,u.isEmptyElement=H,u.isFunction=ae,u.isImg=te,u.isInContainer=ne,u.isNil=re,u.isNumber=fe,u.isObject=g,u.isScroll=C,u.isServer=w,u.isString=V,u.isUrl=ie,u.isWindowsOs=$e,u.merge=oe,u.nanoid=ue,u.off=Me,u.omitBoolean=we,u.omitUndefined=ye,u.omitUndefinedAndEmptyArr=pe,u.on=xe,u.runFunction=Ue,u.scrollTo=se,u.slotRender=D,u.throttleByAnimationFrame=de,u.treeData=Be,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
|
package/dist/slots/index.d.ts
CHANGED
|
@@ -19,5 +19,12 @@ export declare function getSlot<T = undefined, R extends boolean | undefined = u
|
|
|
19
19
|
* @lastTime 2024/2/2
|
|
20
20
|
* @description () => WithFalse<VNode | VNode[]>
|
|
21
21
|
*/
|
|
22
|
-
export declare function getSlotVNode<T = undefined>(slots: Readonly<Record<string, any>>, props: Record<string, unknown>, keys
|
|
23
|
-
export declare function getSlotsProps<T extends string>(names: string[], slots: Readonly<Record<string, any>>, props: Record<string, unknown
|
|
22
|
+
export declare function getSlotVNode<T = undefined>(slots: Readonly<Record<string, any>>, props: Record<string, unknown>, keys: string | string[], options?: any): T extends undefined ? WithFalse<VNode | VNode[]> : T;
|
|
23
|
+
export declare function getSlotsProps<T extends string, K extends undefined = undefined>(names: string[], slots: Readonly<Record<string, any>>, props: Record<string, unknown>, options?: {
|
|
24
|
+
render?: true;
|
|
25
|
+
params?: any;
|
|
26
|
+
}): K extends undefined ? Record<T, WithFalse<VNode | VNode[]>> : K;
|
|
27
|
+
export declare function getSlotsProps<T extends string, K extends undefined = undefined>(names: string[], slots: Readonly<Record<string, any>>, props: Record<string, unknown>, options?: {
|
|
28
|
+
render?: false;
|
|
29
|
+
params?: any;
|
|
30
|
+
}): K extends undefined ? Record<T, any> : K;
|
package/dist/typings/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export type Nullable<T> = T | null;
|
|
|
4
4
|
export type WithFalse<T> = T | false;
|
|
5
5
|
export type RecordType = Record<string, any>;
|
|
6
6
|
export type VueNode = VNodeChild | JSX.Element;
|
|
7
|
-
export type CustomRender = Slot | VNodeChild | VNode | ((...props: any[]) =>
|
|
7
|
+
export type CustomRender = Slot | VNodeChild | VNode | ((...props: any[]) => VNode) | ((...props: any[]) => VNode[]) | VNode[] | JSX.Element | string | null | undefined;
|
|
8
8
|
export type Breakpoint = 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs';
|
|
9
9
|
export type SizeType = 'small' | 'middle' | 'large' | undefined;
|
|
10
10
|
export type AlignType = 'left' | 'center' | 'right';
|
|
@@ -13,7 +13,7 @@ export type BasicTablePageConfig = {
|
|
|
13
13
|
pageSize: number;
|
|
14
14
|
total?: number;
|
|
15
15
|
} | boolean;
|
|
16
|
-
export type ProColumn<T
|
|
16
|
+
export type ProColumn<T extends undefined> = T extends undefined ? {
|
|
17
17
|
title?: string;
|
|
18
18
|
align?: AlignType;
|
|
19
19
|
fixed?: boolean;
|
|
@@ -21,12 +21,21 @@ export type ProColumn<T = any> = {
|
|
|
21
21
|
key: string;
|
|
22
22
|
dataIndex: string;
|
|
23
23
|
width?: number;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
} : {
|
|
25
|
+
title?: string;
|
|
26
|
+
align?: AlignType;
|
|
27
|
+
fixed?: boolean;
|
|
28
|
+
uuid?: string;
|
|
29
|
+
key: string;
|
|
30
|
+
dataIndex: string;
|
|
27
31
|
width?: number;
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
} & T;
|
|
33
|
+
export interface MaterialOptions {
|
|
34
|
+
play: boolean;
|
|
35
|
+
width: number;
|
|
36
|
+
height: number;
|
|
37
|
+
duration: number;
|
|
38
|
+
size: string;
|
|
30
39
|
}
|
|
31
40
|
export type OmitUndefined<T> = {
|
|
32
41
|
[P in keyof T]: NonNullable<T[P]>;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -215,3 +215,4 @@ export declare function off(element: HTMLElement | Document | Window | null, eve
|
|
|
215
215
|
* @returns {boolean} 如果当前环境是Windows OS,返回true,否则返回false。
|
|
216
216
|
*/
|
|
217
217
|
export declare function isWindowsOs(): boolean;
|
|
218
|
+
export declare function convertValueBoolean(value: any): boolean;
|