magtool 1.2.8 → 1.3.0
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/index.js +4 -4
- package/dist/store.js +10 -7
- package/dist/util.js +7 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import r from "moment";
|
|
2
2
|
import m from "markdown-it";
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
3
|
+
import * as n from "echarts";
|
|
4
|
+
import a from "bignumber.js";
|
|
5
5
|
import { d as p } from "./util.js";
|
|
6
6
|
import { d } from "./directive.js";
|
|
7
7
|
import w from "./store.js";
|
|
@@ -15,7 +15,7 @@ const S = (t, _) => {
|
|
|
15
15
|
i = o, t.provide("store", o).use(s);
|
|
16
16
|
} catch {
|
|
17
17
|
throw new Error(
|
|
18
|
-
"piniaStore error, storeChips must be an Object source from import.meta.
|
|
18
|
+
"piniaStore error, storeChips must be an Object source from import.meta.glob"
|
|
19
19
|
);
|
|
20
20
|
}
|
|
21
21
|
const e = localStorage.getItem("lang");
|
|
@@ -29,7 +29,7 @@ const S = (t, _) => {
|
|
|
29
29
|
weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
|
|
30
30
|
weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"),
|
|
31
31
|
weekdaysMin: "日_一_二_三_四_五_六".split("_")
|
|
32
|
-
}), window.$m = r, window.$moment = r, window.$md = m, window.$echarts =
|
|
32
|
+
}), window.$m = r, window.$moment = r, window.$md = m, window.$echarts = n, window.$bigNumber = a;
|
|
33
33
|
};
|
|
34
34
|
export {
|
|
35
35
|
S as default
|
package/dist/store.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { createPinia as
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
Object.keys(
|
|
5
|
-
const
|
|
6
|
-
o
|
|
7
|
-
}), window.$store =
|
|
1
|
+
import { createPinia as i, defineStore as r } from "pinia";
|
|
2
|
+
const a = i(), s = (t) => {
|
|
3
|
+
const e = {};
|
|
4
|
+
return Object.keys(t).forEach((n) => {
|
|
5
|
+
const o = n.match(/chip\/(\S*).js/)[1];
|
|
6
|
+
e[o] = r(o, t[n].default);
|
|
7
|
+
}), window.$store = e, window.$pinia = a, {
|
|
8
|
+
store: e,
|
|
9
|
+
pinia: a
|
|
10
|
+
};
|
|
8
11
|
};
|
|
9
12
|
export {
|
|
10
13
|
s as default
|
package/dist/util.js
CHANGED
|
@@ -230,10 +230,13 @@ const A = (a) => {
|
|
|
230
230
|
i("success", e);
|
|
231
231
|
}
|
|
232
232
|
};
|
|
233
|
-
const E = (e) =>
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
233
|
+
const E = (e) => {
|
|
234
|
+
if (e)
|
|
235
|
+
return new Promise((r, o) => {
|
|
236
|
+
const t = new Image();
|
|
237
|
+
t.src = window.$getType(e) === "String" ? e : URL.createObjectURL(e), t.onload = () => r(t), t.onerror = () => o(new Error("Could not load image"));
|
|
238
|
+
});
|
|
239
|
+
};
|
|
237
240
|
window.$loadImage = E;
|
|
238
241
|
const j = (e) => new Promise((r, o) => {
|
|
239
242
|
const t = document.createElement("video");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "magtool",
|
|
3
3
|
"packageManager": "yarn@4.4.1",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.3.0",
|
|
5
5
|
"author": "matt avis",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"bignumber.js": "^9.1.2",
|
|
33
33
|
"echarts": "^5.6.0",
|
|
34
|
-
"magtool": "^1.
|
|
34
|
+
"magtool": "^1.2.8",
|
|
35
35
|
"markdown-it": "^14.1.0",
|
|
36
36
|
"moment": "^2.30.1",
|
|
37
37
|
"pinia": "^3.0.0",
|