magtool 1.1.7 → 1.1.8

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/README.md CHANGED
@@ -1,4 +1,72 @@
1
1
  # magtool
2
2
  1.1.3 css
3
+
3
4
  1.1.6 scss/var.scss
4
- 1.1.7 store.options
5
+
6
+ 1.1.7 store.options
7
+
8
+ 1.1.8
9
+
10
+ $c info/error/warn/success/log
11
+ $loadImg
12
+ $loadVideo
13
+ $download
14
+
15
+ ```
16
+ {
17
+ type: '', // img|csv|table=no config fetch|excel/video=with config fetch
18
+ url: '',
19
+ name: 'download',
20
+ data: '', // csv data
21
+ }
22
+ ```
23
+
24
+ $pc paramsCount
25
+
26
+ $sc
27
+
28
+ $copy app
29
+
30
+ $getType
31
+
32
+ filter1 Array => {data, index}
33
+
34
+ toFixedNumber Number => toFixed(v) => Number()
35
+
36
+ $db $debounce
37
+
38
+ $pm $promise
39
+
40
+ $fa app (v, n)
41
+
42
+ $toUpperCamel app
43
+
44
+ $fd
45
+
46
+ $egc echart gradient color ({color})
47
+
48
+ $elc echart linear color ({color})
49
+
50
+ $rn random number (max, min=0)
51
+
52
+ $rc $randomColor app random color {alpha, name}
53
+
54
+ ```
55
+ names:
56
+ "blue",
57
+ "red",
58
+ "orange",
59
+ "green",
60
+ "pink",
61
+ "yellow",
62
+ "purple",
63
+ "primary",
64
+ "dark",
65
+ alpha:
66
+ "", 1, 3, 5, 7
67
+ ```
68
+
69
+ $getLang
70
+
71
+ $m $moment
72
+
package/dist/util.js CHANGED
@@ -43,7 +43,7 @@ const N = (i) => {
43
43
  };
44
44
  }, window.$egc = (e = {}) => {
45
45
  let { i: r = 0, color: o } = e;
46
- const t = window.global.config.color;
46
+ const t = window.config.color;
47
47
  o = o || t[r];
48
48
  const n = o + "FF";
49
49
  return {
@@ -207,13 +207,13 @@ const N = (i) => {
207
207
  style: "background-color:#f6fffc; color:#20c997;"
208
208
  }
209
209
  }, l = (e = "info", r) => {
210
- e === "success" && (e = "info"), console[e](
210
+ console.info(
211
211
  `%c ${e.toUpperCase()} %c┆${r}┆`,
212
212
  `${y[e].tag}`,
213
213
  `${y[e].style}`
214
214
  );
215
215
  };
216
- window.$console = {
216
+ window.$c = {
217
217
  info: (...e) => {
218
218
  l("info", e);
219
219
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "magtool",
3
3
  "packageManager": "yarn@4.4.1",
4
- "version": "1.1.7",
4
+ "version": "1.1.8",
5
5
  "author": "magxl",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",