mvframe 1.0.10 → 1.0.11
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/Config.js +201 -0
- package/dist/composition.js +267 -133
- package/dist/css/cpt.css +1 -1
- package/dist/css/style.css +1 -1
- package/dist/index.js +9 -2054
- package/dist/util.js +24 -19
- package/dist/vendor.js +2492 -0
- package/package.json +4 -1
- package/scripts/scaffold-app.js +16 -9
package/dist/util.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { MVFRAME_STORAGE_LANG as U } from "./composition.js";
|
|
2
|
+
const P = (s) => {
|
|
3
|
+
console.info(s);
|
|
2
4
|
const f = (e) => {
|
|
3
5
|
if (e.startsWith("/"))
|
|
4
6
|
return new URL(e, import.meta.url).href;
|
|
@@ -6,7 +8,10 @@ const I = (s) => {
|
|
|
6
8
|
return new URL((/* @__PURE__ */ Object.assign({}))[`/src/assets/img/${e}`], import.meta.url).href;
|
|
7
9
|
throw new Error("please provide an image url with getImg");
|
|
8
10
|
};
|
|
9
|
-
s.config.globalProperties.$getImg = f, globalThis.$getImg = f, globalThis.$getLang = () =>
|
|
11
|
+
s.config.globalProperties.$getImg = f, globalThis.$getImg = f, globalThis.$getLang = () => {
|
|
12
|
+
var e;
|
|
13
|
+
return localStorage.getItem(U) || ((e = globalThis.$config) == null ? void 0 : e.lang) || "en_us";
|
|
14
|
+
}, globalThis.token = "WQpvrYIEnSzAxhOWrbUpGvElhGztdOjOGOdbrSlhUYlrQArOdpMhY1vYMSA7l4xMOUl9MAl1I6AvSrQ8vlE0bpChQ0UWMMlYt0hQC0M0pSz0rUhvlIllSWzMESnAMUlt";
|
|
10
15
|
const m = (e) => Number(e.match(/\d+(\.\d+)?/g).join(""));
|
|
11
16
|
globalThis.$md5 = (e) => m(e);
|
|
12
17
|
const $ = (e, r = 0) => {
|
|
@@ -31,8 +36,8 @@ const I = (s) => {
|
|
|
31
36
|
let l = n[0].split("");
|
|
32
37
|
l = l.reverse();
|
|
33
38
|
let a = [];
|
|
34
|
-
l.forEach((
|
|
35
|
-
d !== 0 && d % 3 === 0 && a.push(","), a.push(
|
|
39
|
+
l.forEach((E, d) => {
|
|
40
|
+
d !== 0 && d % 3 === 0 && a.push(","), a.push(E);
|
|
36
41
|
});
|
|
37
42
|
let i = a.reverse().join("");
|
|
38
43
|
return globalThis.$getType(r) === "Number" && r > 0 && (i += ".", n[1] ? i += n[1].padEnd(r, 0).substr(0, r) : i += "0".padEnd(r, "0")), Number(t) !== Number(e) ? `-${i}` : i;
|
|
@@ -71,7 +76,7 @@ const I = (s) => {
|
|
|
71
76
|
});
|
|
72
77
|
};
|
|
73
78
|
globalThis.$pm = C;
|
|
74
|
-
const
|
|
79
|
+
const M = (e = () => {
|
|
75
80
|
}, r = 500) => {
|
|
76
81
|
let o;
|
|
77
82
|
return function(...t) {
|
|
@@ -80,7 +85,7 @@ const I = (s) => {
|
|
|
80
85
|
}, r);
|
|
81
86
|
};
|
|
82
87
|
};
|
|
83
|
-
globalThis.$db =
|
|
88
|
+
globalThis.$db = M, Number.prototype.toFixedNumber = function(e) {
|
|
84
89
|
return Number(this.toFixed(e));
|
|
85
90
|
}, Array.prototype.filter1 = function(e) {
|
|
86
91
|
if (!e || typeof e != "function")
|
|
@@ -116,27 +121,27 @@ const I = (s) => {
|
|
|
116
121
|
}
|
|
117
122
|
};
|
|
118
123
|
globalThis.$copy = h, s.config.globalProperties.$copy = h;
|
|
119
|
-
const
|
|
120
|
-
globalThis.$sc =
|
|
124
|
+
const k = (e) => e < 1e3 ? e : e < 1e6 ? parseInt(e / 1e3) + "k" : parseInt(e / 1e6) + "m";
|
|
125
|
+
globalThis.$sc = k;
|
|
121
126
|
const F = {
|
|
122
127
|
cpa: "avgCPA",
|
|
123
128
|
cpt: "avgCPT"
|
|
124
|
-
},
|
|
129
|
+
}, w = (e, r = F) => {
|
|
125
130
|
const o = r[e.name];
|
|
126
131
|
o && (e.name = o);
|
|
127
132
|
};
|
|
128
|
-
globalThis.$nr =
|
|
129
|
-
const
|
|
133
|
+
globalThis.$nr = w;
|
|
134
|
+
const O = (e, r) => (Object.keys(e).forEach((o) => {
|
|
130
135
|
objMap[o] && (e[objMap[o]] = e[o], delete e[o]);
|
|
131
136
|
}), e);
|
|
132
|
-
globalThis.$nro =
|
|
133
|
-
const
|
|
137
|
+
globalThis.$nro = O;
|
|
138
|
+
const x = (e) => {
|
|
134
139
|
let r = 0;
|
|
135
140
|
return Object.keys(e).forEach((o) => {
|
|
136
141
|
(globalThis.$getType(e[o]) === "Array" && e[o].length !== 0 || e[o]) && r++;
|
|
137
142
|
}), r;
|
|
138
143
|
};
|
|
139
|
-
globalThis.$pc =
|
|
144
|
+
globalThis.$pc = x;
|
|
140
145
|
const c = {
|
|
141
146
|
info: {
|
|
142
147
|
tag: "background-color:#0085FF; color:#f1f7ff; border-radius: 2px 0 0 2px;",
|
|
@@ -158,7 +163,7 @@ const I = (s) => {
|
|
|
158
163
|
tag: "background-color:#20c997; color:#f6fffc; border-radius: 2px 0 0 2px;",
|
|
159
164
|
style: "background-color:#f6fffc; color:#20c997;"
|
|
160
165
|
}
|
|
161
|
-
},
|
|
166
|
+
}, A = (e) => {
|
|
162
167
|
let r = !1;
|
|
163
168
|
for (let o in e)
|
|
164
169
|
if (globalThis.$getType(e[o]) === "Object") {
|
|
@@ -166,11 +171,11 @@ const I = (s) => {
|
|
|
166
171
|
break;
|
|
167
172
|
}
|
|
168
173
|
return r;
|
|
169
|
-
},
|
|
170
|
-
globalThis.$c = {},
|
|
174
|
+
}, S = ["info", "log", "warn", "error", "success"];
|
|
175
|
+
globalThis.$c = {}, S.forEach((e) => {
|
|
171
176
|
globalThis.$c[e] = (...r) => {
|
|
172
177
|
const o = e.toUpperCase();
|
|
173
|
-
|
|
178
|
+
A(r) ? (console.groupCollapsed(`%c ${o} `, `${c[e].tag}`), console[e](r), console.groupEnd()) : console.info(
|
|
174
179
|
`%c ${o} %c┆${r}┆`,
|
|
175
180
|
`${c[e].tag}`,
|
|
176
181
|
`${c[e].style}`
|
|
@@ -192,5 +197,5 @@ const I = (s) => {
|
|
|
192
197
|
};
|
|
193
198
|
};
|
|
194
199
|
export {
|
|
195
|
-
|
|
200
|
+
P as u
|
|
196
201
|
};
|