magtool 1.5.0 → 1.5.1

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.1.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # magtool
2
2
 
3
+ 1.5.0
4
+ 增加Mvc与Super组件
5
+
3
6
  1.4.2
4
7
  color#border-inline
5
8
 
package/dist/component.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import { createElementBlock as M, openBlock as p, normalizeStyle as se, unref as t, createCommentVNode as B, createElementVNode as c, normalizeClass as G, renderSlot as H, toDisplayString as I, createVNode as N, markRaw as ve, resolveComponent as D, mergeProps as K, withCtx as _, resolveDirective as _e, withDirectives as be, createBlock as Y, withKeys as ye, createSlots as ee, Fragment as oe, renderList as le, createTextVNode as te, defineComponent as we, reactive as $e, onBeforeMount as Se, withModifiers as ie, resolveDynamicComponent as Ce, nextTick as pe } from "vue";
2
- import { _ as ae } from "./vendor.js";
3
- import { dayjs as ke, ElDatePicker as xe } from "element-plus";
2
+ import { _ as ae, d as ke, E as xe } from "./vendor.js";
4
3
  import { u as Ve } from "./composition.js";
5
4
  import me from "vuedraggable";
6
5
  const Te = { class: "fw700" }, Oe = /* @__PURE__ */ Object.assign({
@@ -3393,7 +3392,7 @@ ${C.value}` : `${C.value}`), m = computed(() => r.value ? e.modelValue.join(e.se
3393
3392
  ]);
3394
3393
  };
3395
3394
  }
3396
- }), Zl = {
3395
+ }), ql = {
3397
3396
  Card: Me,
3398
3397
  DatePicker: De,
3399
3398
  EChart: je,
@@ -4298,5 +4297,5 @@ ${C.value}` : `${C.value}`), m = computed(() => r.value ? e.modelValue.join(e.se
4298
4297
  default: Fl
4299
4298
  }, Symbol.toStringTag, { value: "Module" }));
4300
4299
  export {
4301
- Zl as c
4300
+ ql as c
4302
4301
  };
@@ -1,10 +1,36 @@
1
- const C = ({ columns: i, data: e, currency: l = "", channel: P = "" }) => {
2
- if (!e.length || !i.length)
1
+ import { ref as P, nextTick as g } from "vue";
2
+ import { i as h } from "./vendor.js";
3
+ function y({
4
+ afterComposition: e,
5
+ emit: r
6
+ }) {
7
+ const p = P(!1), d = (a) => {
8
+ r == null || r("compositionstart", a), p.value = !0;
9
+ }, o = (a) => {
10
+ var m;
11
+ r == null || r("compositionupdate", a);
12
+ const f = (m = a.target) == null ? void 0 : m.value, c = f[f.length - 1] || "";
13
+ p.value = !h(c);
14
+ }, s = (a) => {
15
+ r == null || r("compositionend", a), p.value && (p.value = !1, g(() => e(a)));
16
+ };
17
+ return {
18
+ isComposing: p,
19
+ handleComposition: (a) => {
20
+ a.type === "compositionend" ? s(a) : o(a);
21
+ },
22
+ handleCompositionStart: d,
23
+ handleCompositionUpdate: o,
24
+ handleCompositionEnd: s
25
+ };
26
+ }
27
+ const M = ({ columns: e, data: r, currency: p = "", channel: d = "" }) => {
28
+ if (!r.length || !e.length)
3
29
  return [];
4
30
  const o = {
5
31
  spend: {
6
32
  prop: "spend",
7
- prefix: l,
33
+ prefix: p,
8
34
  format: (t) => window.$fa(t, 2)
9
35
  },
10
36
  taps: {
@@ -35,7 +61,7 @@ const C = ({ columns: i, data: e, currency: l = "", channel: P = "" }) => {
35
61
  prop: "revenue",
36
62
  format: (t) => window.$fa(t, 2)
37
63
  }
38
- }, s = [], a = {
64
+ }, s = [], n = {
39
65
  avgCPT: {},
40
66
  avgCPA: {},
41
67
  avgCPM: {},
@@ -45,35 +71,36 @@ const C = ({ columns: i, data: e, currency: l = "", channel: P = "" }) => {
45
71
  mmpInstalls: {},
46
72
  mmpCPI: {}
47
73
  };
48
- i.forEach((t, r) => {
49
- a[t.property] && (a[t.property].i = r);
50
- const p = o[t.property];
51
- if (p) {
52
- p.i = r;
53
- let n = window.$bigNumber(0);
54
- e.forEach((d) => {
55
- n = n.plus(d[t.property] || 0);
56
- }), n = n.toNumber(), p.total = n, s.push(n);
74
+ e.forEach((t, i) => {
75
+ n[t.property] && (n[t.property].i = i);
76
+ const u = o[t.property];
77
+ if (u) {
78
+ u.i = i;
79
+ let l = window.$bigNumber(0);
80
+ r.forEach((v) => {
81
+ l = l.plus(v[t.property] || 0);
82
+ }), l = l.toNumber(), u.total = l, s.push(l);
57
83
  } else
58
84
  s.push("");
59
85
  }), Object.keys(o).forEach((t) => {
60
- const r = o[t];
61
- r.format && s[r.i] && (s[r.i] = r.format(s[r.i]));
86
+ const i = o[t];
87
+ i.format && s[i.i] && (s[i.i] = i.format(s[i.i]));
62
88
  });
63
89
  const m = o.taps.total ? window.$fa(o.spend.total / o.taps.total) : "0.00";
64
- s[a.avgCPT.i] = m;
90
+ s[n.avgCPT.i] = m;
65
91
  const f = o.installs.total ? window.$fa(o.spend.total / o.installs.total) : "0.00";
66
- if (s[a.avgCPA.i] = f, a.avgCPM.i !== void 0) {
92
+ if (s[n.avgCPA.i] = f, n.avgCPM.i !== void 0) {
67
93
  const t = o.impressions.total ? window.$fa(o.spend.total / (o.impressions.total / 1e3)) : "0.00";
68
- s[a.avgCPM.i] = t;
94
+ s[n.avgCPM.i] = t;
69
95
  }
70
- const w = o.taps.total ? window.$fa(o.installs.total / o.taps.total * 100) : "0.00";
71
- s[a.cr.i] = w;
72
- const c = o.impressions.total ? window.$fa(o.taps.total / o.impressions.total * 100) : "0.00";
73
- s[a.ttr.i] = c;
74
- const u = o.impressions.total ? window.$fa(o.installs.total * 1e3 / o.impressions.total) : "0.00";
75
- return s[a.IPM.i] = u, s;
96
+ const c = o.taps.total ? window.$fa(o.installs.total / o.taps.total * 100) : "0.00";
97
+ s[n.cr.i] = c;
98
+ const w = o.impressions.total ? window.$fa(o.taps.total / o.impressions.total * 100) : "0.00";
99
+ s[n.ttr.i] = w;
100
+ const C = o.impressions.total ? window.$fa(o.installs.total * 1e3 / o.impressions.total) : "0.00";
101
+ return s[n.IPM.i] = C, s;
76
102
  };
77
103
  export {
78
- C as u
104
+ y as a,
105
+ M as u
79
106
  };
package/dist/index.js CHANGED
@@ -3,11 +3,10 @@ import "markdown-it";
3
3
  import "echarts";
4
4
  import "bignumber.js";
5
5
  import "./util.js";
6
- import "element-plus";
7
6
  import "./directive.js";
8
7
  import "./store.js";
9
8
  import "./component.js";
10
- import { i as s } from "./vendor.js";
9
+ import { p as l } from "./vendor.js";
11
10
  export {
12
- s as default
11
+ l as default
13
12
  };