vue-happy-framework 1.0.11 → 1.0.12

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.
Files changed (44) hide show
  1. package/README.md +1 -4
  2. package/common/utils/ApiBase.js +1 -0
  3. package/common/utils/EventBus.js +21 -0
  4. package/common/utils/animation.js +42 -0
  5. package/common/utils/file.js +21 -0
  6. package/common/utils/function.js +72 -0
  7. package/common/utils/img.js +26 -0
  8. package/common/utils/index.js +10 -0
  9. package/common/utils/request.js +1 -0
  10. package/common/utils/stringUtils.js +14 -0
  11. package/common/utils/table.js +10 -0
  12. package/common/utils/tree.js +75 -0
  13. package/common/utils.js +10 -0
  14. package/index.css +1 -1
  15. package/package.json +38 -47
  16. package/pc/components/HelloWorld.js +45 -0
  17. package/pc/components/NewButton.js +46 -0
  18. package/pc/components/index.js +4 -61
  19. package/pc/directives/copy.js +46 -0
  20. package/pc/utils/ApiBase.js +1 -0
  21. package/pc/utils/EventBus.js +21 -0
  22. package/pc/utils/animation.js +42 -0
  23. package/pc/utils/file.js +21 -0
  24. package/pc/utils/function.js +72 -0
  25. package/pc/utils/img.js +26 -0
  26. package/pc/utils/index.js +8 -3030
  27. package/pc/utils/request.js +34 -0
  28. package/pc/utils/stringUtils.js +14 -0
  29. package/pc/utils/table.js +10 -0
  30. package/pc/utils/tree.js +75 -0
  31. package/_plugin-vue_export-helper-BHFhmbuH.cjs +0 -1
  32. package/index2.css +0 -1
  33. package/mobile/components/index.cjs +0 -1
  34. package/mobile/components/index.d.ts +0 -3
  35. package/mobile/components/index.js +0 -53
  36. package/mobile/utils/index.d.ts +0 -2
  37. package/pc/components/index.cjs +0 -1
  38. package/pc/components/index.d.ts +0 -3
  39. package/pc/utils/index.cjs +0 -11
  40. package/pc/utils/index.d.ts +0 -2
  41. package/styles/style.scss +0 -12
  42. package/utils/index.cjs +0 -1
  43. package/utils/index.d.ts +0 -7
  44. package/utils/index.js +0 -193
@@ -0,0 +1,42 @@
1
+ function f(u, i, n) {
2
+ var e = document.getElementById(u), o = e.getAttribute(i), a = o - 1e3, r = function() {
3
+ a < o && (a++, e.innerText = a), setTimeout(r, n);
4
+ };
5
+ setTimeout(r, n);
6
+ }
7
+ function v(u, i) {
8
+ var n = document.getElementsByClassName(u)[0], e = n.firstElementChild, o = e.children.length;
9
+ let a = e == null ? void 0 : e.children;
10
+ const r = document.createDocumentFragment();
11
+ for (var d = 0; d < o; d++) {
12
+ let m = a[d].cloneNode(!0);
13
+ r.appendChild(m);
14
+ }
15
+ e.appendChild(r);
16
+ let s = 0;
17
+ o >= 2 && (s = e == null ? void 0 : e.children[1].offsetTop);
18
+ var t = 0;
19
+ function l() {
20
+ t >= o && (t = 0, e.style.top = "0px"), t++, e.children[t - 1].classList.add("active"), e.animate([
21
+ { top: -((t - 1) * s) + "px" },
22
+ { top: -(t * s) + "px" }
23
+ ], {
24
+ duration: 1e3,
25
+ delay: 100,
26
+ easing: "ease-in",
27
+ fill: "forwards"
28
+ }), setTimeout(function() {
29
+ e.children[t - 1].classList.remove("active");
30
+ }, 1e3), c = setTimeout(l, i);
31
+ }
32
+ var c = setTimeout(l, i);
33
+ n.onmouseover = function() {
34
+ clearTimeout(c);
35
+ }, n.onmouseout = function() {
36
+ c = setTimeout(l, i);
37
+ };
38
+ }
39
+ export {
40
+ v as AutoScroll,
41
+ f as NunberAdd
42
+ };
@@ -0,0 +1,21 @@
1
+ function l(e) {
2
+ return `undefined${e}`;
3
+ }
4
+ function o(e) {
5
+ let t = {};
6
+ return typeof e == "string" ? t = JSON.parse(e || "{}") : t = e, t.url = l(t.path), t;
7
+ }
8
+ function i(e) {
9
+ let t;
10
+ return Array.isArray(e) ? t = e : t = JSON.parse(e || "[]"), t.map((n) => (n.url = l(n.path), n));
11
+ }
12
+ function c(e, t) {
13
+ let n = new Blob([e]), r = document.createElement("a");
14
+ r.download = "导出文件.xlsx", r.href = URL.createObjectURL(n), r.style.display = "none", r.target = "_blank", document.appendChild(r), r.click(), URL.revokeObjectURL(n), document.body.removeChild(r);
15
+ }
16
+ export {
17
+ c as exportExl,
18
+ l as getFileUrl,
19
+ o as getShowFile,
20
+ i as getShowFileList
21
+ };
@@ -0,0 +1,72 @@
1
+ function o(n, r = /* @__PURE__ */ new WeakMap()) {
2
+ if (typeof n != "object" || n === null)
3
+ return n;
4
+ if (r.has(n))
5
+ return r.get(n);
6
+ let e;
7
+ return n instanceof Array ? (e = [], r.set(n, e), n.forEach((u, t) => {
8
+ e[t] = o(u, r);
9
+ }), e) : n instanceof Date ? (e = new Date(n), r.set(n, e), e) : n instanceof RegExp ? (e = new RegExp(n.source, n.flags), r.set(n, e), e) : typeof n == "object" ? (e = {}, r.set(n, e), Reflect.ownKeys(n).forEach((t) => {
10
+ e[t] = o(n[t], r);
11
+ }), e) : n;
12
+ }
13
+ function s(n, r) {
14
+ var e = null;
15
+ return function() {
16
+ clearTimeout(e), e = setTimeout(() => {
17
+ n.apply(this, arguments);
18
+ }, r);
19
+ };
20
+ }
21
+ function f(n, r) {
22
+ var e = !0;
23
+ return function() {
24
+ e && (e = !1, setTimeout(() => {
25
+ n.apply(this, arguments), e = !0;
26
+ }, r));
27
+ };
28
+ }
29
+ function l(n, ...r) {
30
+ const e = n.length;
31
+ return function(...u) {
32
+ let t = [...r, ...u];
33
+ return t.length < e ? l.call(this, n, ...t) : n.apply(this, t);
34
+ };
35
+ }
36
+ function c(n) {
37
+ var r = Array.prototype.slice.call(arguments, 1);
38
+ return function() {
39
+ var e = Array.prototype.slice.call(arguments), u = r.concat(e);
40
+ return n.apply(null, u);
41
+ };
42
+ }
43
+ function p(n, r, e, u) {
44
+ return n.addEventListener(r, (t) => {
45
+ let i = t.target;
46
+ for (; !i.matches(e); ) {
47
+ if (n === i) {
48
+ i = null;
49
+ break;
50
+ }
51
+ i = i.parentNode;
52
+ }
53
+ i && u.call(i, t, i);
54
+ }), n;
55
+ }
56
+ function a(n) {
57
+ if (!(n instanceof Function) || !n.prototype)
58
+ throw new Error("不是合法的构造函数");
59
+ let r;
60
+ return function() {
61
+ return r || (r = new n()), r;
62
+ };
63
+ }
64
+ export {
65
+ a as SingleWrapper,
66
+ c as curry,
67
+ l as currying,
68
+ s as debounce,
69
+ o as deepClone,
70
+ p as delegate,
71
+ f as throttle
72
+ };
@@ -0,0 +1,26 @@
1
+ function i(t) {
2
+ return new Promise((a) => {
3
+ var e = new Image();
4
+ e.crossOrigin = "anonymous", e.src = t, e.onload = function() {
5
+ var n = document.createElement("canvas");
6
+ n.width = e.width, n.height = e.height, n.getContext("2d").drawImage(e, 0, 0);
7
+ var o = n.toDataURL();
8
+ a(o);
9
+ };
10
+ });
11
+ }
12
+ function r(t) {
13
+ return new Promise((a) => {
14
+ var e = new Image();
15
+ e.crossOrigin = "anonymous", e.src = t, e.onload = function() {
16
+ var n = document.createElement("canvas");
17
+ n.width = e.width, n.height = e.height, n.getContext("2d").drawImage(e, 0, 0), n.toBlob((o) => {
18
+ a(o);
19
+ });
20
+ };
21
+ });
22
+ }
23
+ export {
24
+ i as imgToBase64,
25
+ r as imgToBlob
26
+ };