@topdatasec/report 1.0.3 → 1.0.5
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.iife.js +1 -1
- package/dist/index.js +135 -128
- package/dist/index.umd.cjs +1 -1
- package/es/bar/TdsReportBar.vue.js +22 -0
- package/es/bar/TdsReportBar.vue2.js +4 -0
- package/es/bar/index.d.ts +4 -4
- package/es/bar/index.js +1 -1
- package/lib/bar/TdsReportBar.vue.cjs +1 -0
- package/lib/bar/TdsReportBar.vue2.cjs +1 -0
- package/lib/bar/index.cjs +1 -1
- package/lib/bar/index.d.ts +4 -4
- package/package.json +1 -2
- package/es/bar/Bar.vue.js +0 -15
- package/es/bar/Bar.vue2.js +0 -4
- package/lib/bar/Bar.vue.cjs +0 -1
- package/lib/bar/Bar.vue2.cjs +0 -1
- /package/es/bar/{Bar.d.ts → TdsReportBar.d.ts} +0 -0
- /package/lib/bar/{Bar.d.ts → TdsReportBar.d.ts} +0 -0
package/dist/index.iife.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(u,
|
|
1
|
+
(function(u,r){"use strict";const O={class:"chart-components"},y=(e=>{const t=e;return t.install=function(n){n.component(t.__name,e)},e})(r.defineComponent({name:"TdsReportBar",__name:"TdsReportBar",props:{data:{}},setup(e){const t=e;console.log(t.data,444444444);const n=r.computed(()=>t.data.options);return(o,s)=>{const c=r.resolveComponent("TdsChart");return r.openBlock(),r.createElementBlock("div",O,[r.createVNode(c,{option:n.value},null,8,["option"])])}}})),B=Object.freeze(Object.defineProperty({__proto__:null,TdsReportBar:y},Symbol.toStringTag,{value:"Module"}));function U(e=Date.now(),t="YYYY-MM-DD HH:mm:ss"){try{let n;if(typeof e=="number"||typeof e=="string"){if(n=new Date(e),isNaN(n.getTime()))throw new Error("Invalid date")}else n=e;const o=(c,a=2)=>String(c).padStart(a,"0"),s=c=>{switch(c){case"YYYY":return o(n.getFullYear());case"YY":return o(n.getFullYear()).slice(2,4);case"MM":return o(n.getMonth()+1);case"M":return String(n.getMonth()+1);case"DD":return o(n.getDate());case"D":return String(n.getDate());case"HH":return o(n.getHours());case"H":return String(n.getHours());case"mm":return o(n.getMinutes());case"m":return String(n.getMinutes());case"ss":return o(n.getSeconds());case"s":return String(n.getSeconds());case"SSS":return o(n.getMilliseconds(),3);default:return c}};return t.replace(/(YYYY|YY|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS)/g,s)}catch(n){return console.error("Error formatting date:",n),""}}function V(e,t=2,n=",",o=".",s,c){typeof e!="number"&&typeof e!="string"&&console.warn("Expected value to be of type number or string"),typeof t!="number"&&console.warn("Expected precision to be of type number");const a=Number(e);if(isNaN(a)||!isFinite(a))return"";if(a===0)return a.toFixed(t);let i=a.toFixed(t);if(typeof n=="string"&&n!==""){const[f,m]=i.split(".");i=f.replace(/(\d)(?=(\d{3})+$)/g,"$1"+n)+(m?o+m:"")}return(s||"")+i+(c||"")}function k(e,t=0,n=!1){let o=null;function s(a){if(o||(o=a),a-o>=t){try{e()}catch(f){console.error("Error executing rafTimeout function:",f)}n&&(o=a,c.id=requestAnimationFrame(s))}else c.id=requestAnimationFrame(s)}const c={id:requestAnimationFrame(s)};return c}function H(e){e&&e.id&&typeof e.id=="number"?cancelAnimationFrame(e.id):console.warn("cancelRaf received an invalid id:",e)}function M(e,t=300){let n=!0;return function(...o){return n&&(e(...o),n=!1,setTimeout(()=>{n=!0},t)),!1}}function T(e,t=300){let n=null;return function(...o){n&&clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}function I(e,t){if(Number.isNaN(e)||Number.isNaN(t))throw new Error("Both num1 and num2 must be valid numbers.");const n=e%1!==0,o=t%1!==0;if(!n&&!o)return e+t;const s=String(e).split(".")[1]??"",c=String(t).split(".")[1]??"",a=Math.max(s.length,c.length),i=Math.pow(10,a),f=e.toFixed(a),m=t.toFixed(a);return(+f.replace(".","")+ +m.replace(".",""))/i}function N(e,t){if(!e){console.error("无效的 url");return}const n=t||e.split("?")[0].split("/").pop()||"download";try{fetch(e).then(o=>{o.ok?o.blob().then(s=>{const c=URL.createObjectURL(s),a=document.createElement("a");a.href=c,a.download=n,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(c)}):console.error("请求文件失败,状态码:",o.status)})}catch(o){console.error("文件下载失败:",o)}}function j(){const e=document.documentElement;e.classList.toggle("dark"),e.classList.contains("dark")?e.style.colorScheme="dark":e.style.colorScheme="light"}function z(){const e=r.ref(!1),t=r.getCurrentInstance();return t&&r.onMounted(()=>{e.value=!0},t),e}function R(e){const t=z();return r.computed(()=>(t.value,!!e()))}function $(e,t,n){r.onMounted(()=>e.addEventListener(t,n)),r.onUnmounted(()=>e.removeEventListener(t,n))}function q(e,t,n={}){const o=R(()=>window&&"MutationObserver"in window),s=r.ref(!1);let c;const a=r.computed(()=>{const d=r.toValue(e);return d?Array.isArray(d)?d.map(h=>r.toValue(h)).filter(h=>h):[d]:[]}),i=()=>{c&&(c.disconnect(),c=void 0)},f=()=>{o.value&&a.value.length&&!s.value&&(c=new MutationObserver(t),a.value.forEach(d=>c.observe(d,n)))};r.watch(()=>a.value,()=>{i(),f()},{immediate:!0,flush:"post"});const m=()=>{s.value=!0,i()},p=()=>{s.value=!1,f()};return r.onBeforeUnmount(()=>i()),{stop:m,start:p}}function C(e=window,t=0,n,o){const s=r.ref(0),c=r.ref(0),a=r.ref(0),i=r.ref(0),f=r.ref(!1),m=r.ref(!1),p=r.ref(!1),d=r.ref(!1),h=r.ref(!1),E=r.ref(0),S=r.ref(0);function Q(l){f.value=!0;const g=l.target.documentElement??l.target;s.value=g.scrollLeft,a.value=g.scrollTop,m.value=s.value<E.value,p.value=s.value>E.value,d.value=a.value<S.value,h.value=a.value>S.value,E.value=s.value,S.value=a.value,w(l),n&&n(l)}const Y=M(Q,t);function X(l){f.value&&(f.value=!1,m.value=!1,p.value=!1,d.value=!1,h.value=!1,o&&o(l))}const w=T(X,t+200),A=r.computed(()=>{const l=r.toValue(e);return l||null});r.watch(()=>A.value,(l,g)=>{var v;if(g&&D(g),l){const b=((v=l==null?void 0:l.document)==null?void 0:v.documentElement)||(l==null?void 0:l.documentElement)||l;c.value=b.scrollWidth-b.clientWidth,i.value=b.scrollHeight-b.clientHeight,b.addEventListener("scroll",Y),b.addEventListener("scrollend",w)}},{immediate:!0,flush:"post"});function D(l){var v;const g=((v=l==null?void 0:l.document)==null?void 0:v.documentElement)||(l==null?void 0:l.documentElement)||l;g.removeEventListener("scroll",Y),g.removeEventListener("scrollend",w)}return r.onBeforeUnmount(()=>D(A.value)),{x:s,xScrollMax:c,y:a,yScrollMax:i,isScrolling:f,left:m,right:p,top:d,bottom:h}}function P(){const e=r.ref(0),t=r.ref(0);let n=performance.now();const o=10,s=c=>{if(t.value++,t.value>=o){const a=c-n;e.value=Math.round(1e3/(a/o)),n=c,t.value=0}requestAnimationFrame(s)};return requestAnimationFrame(s),{fps:e}}function x(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid mediaQuery parameter. It must be a non-empty string.");const t=r.ref(window&&window.matchMedia(e).matches),n=window.matchMedia(e),o=s=>{t.value=s.matches};return r.onMounted(()=>{n.addEventListener("change",o)}),r.onBeforeUnmount(()=>{n.removeEventListener("change",o)}),{match:t}}function W(e,t,n={}){const o=R(()=>window&&"ResizeObserver"in window);let s;const c=r.ref(!1),a=r.computed(()=>{const d=r.toValue(e);return d?Array.isArray(d)?d.map(h=>r.toValue(h)).filter(h=>h):[d]:[]}),i=()=>{s&&(s.disconnect(),s=void 0)},f=()=>{o.value&&a.value.length&&!c.value&&(s=new ResizeObserver(t),a.value.forEach(d=>s.observe(d,n)))};r.watch(()=>a.value,()=>{i(),f()},{immediate:!0,flush:"post"});const m=()=>{c.value=!0,i()},p=()=>{c.value=!1,f()};return r.onBeforeUnmount(()=>i()),{stop:m,start:p}}function Z(e="default"){const t=r.useSlots(),n=o=>{var a;const s=(a=t[o])==null?void 0:a.call(t),c=i=>{if(i.type===r.Comment||Array.isArray(i.children)&&!i.children.length)return!1;if(i.type!==r.Text)return!0;if(typeof i.children=="string")return i.children.trim()!==""};return s&&(s!=null&&s.length)?s.some(f=>c(f)):!1};if(Array.isArray(e)){const o=r.reactive({});return e.forEach(s=>{const c=r.computed(()=>n(s));o[s]=c}),o}else return r.computed(()=>n(e))}const F={TdsReportBar:"TdsReportBar"},L={BackTop:["Tooltip"]};function G(e,t){if(["NumberAnimation","Watermark"].includes(e))return[];const n=[e];e in L&&n.push(...L[e]);const o=t!=null&&t.cjs?"lib":"es",s=[`@topdatasec/report/${o}/style/global.css`];return n.forEach(c=>{s.push(`@topdatasec/report/${o}/${F[c]}/${c}.css`)}),s}function J(e){return{type:"component",resolve:t=>{if(t in F)return{name:t,from:"@topdatasec/report",sideEffects:G(t,e)}}}}const _=function(e){return Object.values(B).forEach(t=>{t&&t.install&&e.use(t)}),e},K={install:_};u.TdsReportBar=y,u.VueAmazingUIResolver=J,u.add=I,u.cancelRaf=H,u.dateFormat=U,u.debounce=T,u.default=K,u.downloadFile=N,u.formatNumber=V,u.install=_,u.rafTimeout=k,u.throttle=M,u.toggleDark=j,u.useEventListener=$,u.useFps=P,u.useMediaQuery=x,u.useMutationObserver=q,u.useResizeObserver=W,u.useScroll=C,u.useSlotsExist=Z,Object.defineProperties(u,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})})(this.TdsReportUI=this.TdsReportUI||{},Vue);
|
package/dist/index.js
CHANGED
|
@@ -1,24 +1,31 @@
|
|
|
1
|
-
import { defineComponent as k, computed as h,
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as k, computed as h, resolveComponent as B, createElementBlock as H, openBlock as U, createVNode as V, onMounted as x, onUnmounted as N, ref as f, toValue as E, watch as T, onBeforeUnmount as S, useSlots as $, reactive as j, getCurrentInstance as I, Comment as q, Text as z } from "vue";
|
|
2
|
+
const C = { class: "chart-components" }, P = /* @__PURE__ */ k({
|
|
3
3
|
name: "TdsReportBar",
|
|
4
|
-
__name: "
|
|
4
|
+
__name: "TdsReportBar",
|
|
5
5
|
props: {
|
|
6
6
|
data: {}
|
|
7
7
|
},
|
|
8
8
|
setup(e) {
|
|
9
9
|
const t = e;
|
|
10
|
-
|
|
10
|
+
console.log(t.data, 444444444);
|
|
11
|
+
const n = h(() => t.data.options);
|
|
12
|
+
return (r, o) => {
|
|
13
|
+
const s = B("TdsChart");
|
|
14
|
+
return U(), H("div", C, [
|
|
15
|
+
V(s, { option: n.value }, null, 8, ["option"])
|
|
16
|
+
]);
|
|
17
|
+
};
|
|
11
18
|
}
|
|
12
|
-
}),
|
|
19
|
+
}), W = (e) => {
|
|
13
20
|
const t = e;
|
|
14
21
|
return t.install = function(n) {
|
|
15
22
|
n.component(t.__name, e);
|
|
16
23
|
}, e;
|
|
17
|
-
},
|
|
24
|
+
}, Z = W(P), G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
18
25
|
__proto__: null,
|
|
19
|
-
TdsReportBar:
|
|
26
|
+
TdsReportBar: Z
|
|
20
27
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
21
|
-
function
|
|
28
|
+
function ne(e = Date.now(), t = "YYYY-MM-DD HH:mm:ss") {
|
|
22
29
|
try {
|
|
23
30
|
let n;
|
|
24
31
|
if (typeof e == "number" || typeof e == "string") {
|
|
@@ -26,8 +33,8 @@ function ee(e = Date.now(), t = "YYYY-MM-DD HH:mm:ss") {
|
|
|
26
33
|
throw new Error("Invalid date");
|
|
27
34
|
} else
|
|
28
35
|
n = e;
|
|
29
|
-
const r = (
|
|
30
|
-
switch (
|
|
36
|
+
const r = (s, c = 2) => String(s).padStart(c, "0"), o = (s) => {
|
|
37
|
+
switch (s) {
|
|
31
38
|
case "YYYY":
|
|
32
39
|
return r(n.getFullYear());
|
|
33
40
|
case "YY":
|
|
@@ -55,50 +62,50 @@ function ee(e = Date.now(), t = "YYYY-MM-DD HH:mm:ss") {
|
|
|
55
62
|
case "SSS":
|
|
56
63
|
return r(n.getMilliseconds(), 3);
|
|
57
64
|
default:
|
|
58
|
-
return
|
|
65
|
+
return s;
|
|
59
66
|
}
|
|
60
67
|
};
|
|
61
|
-
return t.replace(/(YYYY|YY|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS)/g,
|
|
68
|
+
return t.replace(/(YYYY|YY|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS)/g, o);
|
|
62
69
|
} catch (n) {
|
|
63
70
|
return console.error("Error formatting date:", n), "";
|
|
64
71
|
}
|
|
65
72
|
}
|
|
66
|
-
function
|
|
73
|
+
function re(e, t = 2, n = ",", r = ".", o, s) {
|
|
67
74
|
typeof e != "number" && typeof e != "string" && console.warn("Expected value to be of type number or string"), typeof t != "number" && console.warn("Expected precision to be of type number");
|
|
68
|
-
const
|
|
69
|
-
if (isNaN(
|
|
75
|
+
const c = Number(e);
|
|
76
|
+
if (isNaN(c) || !isFinite(c))
|
|
70
77
|
return "";
|
|
71
|
-
if (
|
|
72
|
-
return
|
|
73
|
-
let l =
|
|
78
|
+
if (c === 0)
|
|
79
|
+
return c.toFixed(t);
|
|
80
|
+
let l = c.toFixed(t);
|
|
74
81
|
if (typeof n == "string" && n !== "") {
|
|
75
82
|
const [i, d] = l.split(".");
|
|
76
83
|
l = i.replace(/(\d)(?=(\d{3})+$)/g, "$1" + n) + (d ? r + d : "");
|
|
77
84
|
}
|
|
78
|
-
return (
|
|
85
|
+
return (o || "") + l + (s || "");
|
|
79
86
|
}
|
|
80
|
-
function
|
|
87
|
+
function oe(e, t = 0, n = !1) {
|
|
81
88
|
let r = null;
|
|
82
|
-
function
|
|
83
|
-
if (r || (r =
|
|
89
|
+
function o(c) {
|
|
90
|
+
if (r || (r = c), c - r >= t) {
|
|
84
91
|
try {
|
|
85
92
|
e();
|
|
86
93
|
} catch (i) {
|
|
87
94
|
console.error("Error executing rafTimeout function:", i);
|
|
88
95
|
}
|
|
89
|
-
n && (r =
|
|
96
|
+
n && (r = c, s.id = requestAnimationFrame(o));
|
|
90
97
|
} else
|
|
91
|
-
|
|
98
|
+
s.id = requestAnimationFrame(o);
|
|
92
99
|
}
|
|
93
|
-
const
|
|
94
|
-
id: requestAnimationFrame(
|
|
100
|
+
const s = {
|
|
101
|
+
id: requestAnimationFrame(o)
|
|
95
102
|
};
|
|
96
|
-
return
|
|
103
|
+
return s;
|
|
97
104
|
}
|
|
98
|
-
function
|
|
105
|
+
function se(e) {
|
|
99
106
|
e && e.id && typeof e.id == "number" ? cancelAnimationFrame(e.id) : console.warn("cancelRaf received an invalid id:", e);
|
|
100
107
|
}
|
|
101
|
-
function
|
|
108
|
+
function J(e, t = 300) {
|
|
102
109
|
let n = !0;
|
|
103
110
|
return function(...r) {
|
|
104
111
|
return n && (e(...r), n = !1, setTimeout(() => {
|
|
@@ -106,7 +113,7 @@ function Z(e, t = 300) {
|
|
|
106
113
|
}, t)), !1;
|
|
107
114
|
};
|
|
108
115
|
}
|
|
109
|
-
function
|
|
116
|
+
function K(e, t = 300) {
|
|
110
117
|
let n = null;
|
|
111
118
|
return function(...r) {
|
|
112
119
|
n && clearTimeout(n), n = setTimeout(() => {
|
|
@@ -114,16 +121,16 @@ function G(e, t = 300) {
|
|
|
114
121
|
}, t);
|
|
115
122
|
};
|
|
116
123
|
}
|
|
117
|
-
function
|
|
124
|
+
function ce(e, t) {
|
|
118
125
|
if (Number.isNaN(e) || Number.isNaN(t))
|
|
119
126
|
throw new Error("Both num1 and num2 must be valid numbers.");
|
|
120
127
|
const n = e % 1 !== 0, r = t % 1 !== 0;
|
|
121
128
|
if (!n && !r)
|
|
122
129
|
return e + t;
|
|
123
|
-
const
|
|
130
|
+
const o = String(e).split(".")[1] ?? "", s = String(t).split(".")[1] ?? "", c = Math.max(o.length, s.length), l = Math.pow(10, c), i = e.toFixed(c), d = t.toFixed(c);
|
|
124
131
|
return (+i.replace(".", "") + +d.replace(".", "")) / l;
|
|
125
132
|
}
|
|
126
|
-
function
|
|
133
|
+
function ae(e, t) {
|
|
127
134
|
if (!e) {
|
|
128
135
|
console.error("无效的 url");
|
|
129
136
|
return;
|
|
@@ -131,45 +138,45 @@ function oe(e, t) {
|
|
|
131
138
|
const n = t || e.split("?")[0].split("/").pop() || "download";
|
|
132
139
|
try {
|
|
133
140
|
fetch(e).then((r) => {
|
|
134
|
-
r.ok ? r.blob().then((
|
|
135
|
-
const
|
|
136
|
-
|
|
141
|
+
r.ok ? r.blob().then((o) => {
|
|
142
|
+
const s = URL.createObjectURL(o), c = document.createElement("a");
|
|
143
|
+
c.href = s, c.download = n, document.body.appendChild(c), c.click(), document.body.removeChild(c), URL.revokeObjectURL(s);
|
|
137
144
|
}) : console.error("请求文件失败,状态码:", r.status);
|
|
138
145
|
});
|
|
139
146
|
} catch (r) {
|
|
140
147
|
console.error("文件下载失败:", r);
|
|
141
148
|
}
|
|
142
149
|
}
|
|
143
|
-
function
|
|
150
|
+
function le() {
|
|
144
151
|
const e = document.documentElement;
|
|
145
152
|
e.classList.toggle("dark"), e.classList.contains("dark") ? e.style.colorScheme = "dark" : e.style.colorScheme = "light";
|
|
146
153
|
}
|
|
147
|
-
function
|
|
148
|
-
const e = f(!1), t =
|
|
154
|
+
function X() {
|
|
155
|
+
const e = f(!1), t = I();
|
|
149
156
|
return t && x(() => {
|
|
150
157
|
e.value = !0;
|
|
151
158
|
}, t), e;
|
|
152
159
|
}
|
|
153
|
-
function
|
|
154
|
-
const t =
|
|
160
|
+
function A(e) {
|
|
161
|
+
const t = X();
|
|
155
162
|
return h(() => (t.value, !!e()));
|
|
156
163
|
}
|
|
157
|
-
function
|
|
158
|
-
x(() => e.addEventListener(t, n)),
|
|
164
|
+
function ie(e, t, n) {
|
|
165
|
+
x(() => e.addEventListener(t, n)), N(() => e.removeEventListener(t, n));
|
|
159
166
|
}
|
|
160
|
-
function
|
|
161
|
-
const r =
|
|
162
|
-
let
|
|
163
|
-
const
|
|
167
|
+
function ue(e, t, n = {}) {
|
|
168
|
+
const r = A(() => window && "MutationObserver" in window), o = f(!1);
|
|
169
|
+
let s;
|
|
170
|
+
const c = h(() => {
|
|
164
171
|
const u = E(e);
|
|
165
172
|
return u ? Array.isArray(u) ? u.map((m) => E(m)).filter((m) => m) : [u] : [];
|
|
166
173
|
}), l = () => {
|
|
167
|
-
|
|
174
|
+
s && (s.disconnect(), s = void 0);
|
|
168
175
|
}, i = () => {
|
|
169
|
-
r.value &&
|
|
176
|
+
r.value && c.value.length && !o.value && (s = new MutationObserver(t), c.value.forEach((u) => s.observe(u, n)));
|
|
170
177
|
};
|
|
171
|
-
|
|
172
|
-
() =>
|
|
178
|
+
T(
|
|
179
|
+
() => c.value,
|
|
173
180
|
() => {
|
|
174
181
|
l(), i();
|
|
175
182
|
},
|
|
@@ -180,37 +187,37 @@ function le(e, t, n = {}) {
|
|
|
180
187
|
}
|
|
181
188
|
);
|
|
182
189
|
const d = () => {
|
|
183
|
-
|
|
190
|
+
o.value = !0, l();
|
|
184
191
|
}, v = () => {
|
|
185
|
-
|
|
192
|
+
o.value = !1, i();
|
|
186
193
|
};
|
|
187
194
|
return S(() => l()), {
|
|
188
195
|
stop: d,
|
|
189
196
|
start: v
|
|
190
197
|
};
|
|
191
198
|
}
|
|
192
|
-
function
|
|
193
|
-
const
|
|
199
|
+
function fe(e = window, t = 0, n, r) {
|
|
200
|
+
const o = f(0), s = f(0), c = f(0), l = f(0), i = f(!1), d = f(!1), v = f(!1), u = f(!1), m = f(!1), w = f(0), y = f(0);
|
|
194
201
|
function _(a) {
|
|
195
202
|
i.value = !0;
|
|
196
203
|
const p = a.target.documentElement ?? a.target;
|
|
197
|
-
|
|
204
|
+
o.value = p.scrollLeft, c.value = p.scrollTop, d.value = o.value < w.value, v.value = o.value > w.value, u.value = c.value < y.value, m.value = c.value > y.value, w.value = o.value, y.value = c.value, M(a), n && n(a);
|
|
198
205
|
}
|
|
199
|
-
const
|
|
206
|
+
const L = J(_, t);
|
|
200
207
|
function O(a) {
|
|
201
208
|
i.value && (i.value = !1, d.value = !1, v.value = !1, u.value = !1, m.value = !1, r && r(a));
|
|
202
209
|
}
|
|
203
|
-
const M =
|
|
210
|
+
const M = K(O, t + 200), Y = h(() => {
|
|
204
211
|
const a = E(e);
|
|
205
212
|
return a || null;
|
|
206
213
|
});
|
|
207
|
-
|
|
214
|
+
T(
|
|
208
215
|
() => Y.value,
|
|
209
216
|
(a, p) => {
|
|
210
217
|
var b;
|
|
211
218
|
if (p && F(p), a) {
|
|
212
219
|
const g = ((b = a == null ? void 0 : a.document) == null ? void 0 : b.documentElement) || (a == null ? void 0 : a.documentElement) || a;
|
|
213
|
-
|
|
220
|
+
s.value = g.scrollWidth - g.clientWidth, l.value = g.scrollHeight - g.clientHeight, g.addEventListener("scroll", L), g.addEventListener("scrollend", M);
|
|
214
221
|
}
|
|
215
222
|
},
|
|
216
223
|
{
|
|
@@ -221,27 +228,27 @@ function ie(e = window, t = 0, n, r) {
|
|
|
221
228
|
function F(a) {
|
|
222
229
|
var b;
|
|
223
230
|
const p = ((b = a == null ? void 0 : a.document) == null ? void 0 : b.documentElement) || (a == null ? void 0 : a.documentElement) || a;
|
|
224
|
-
p.removeEventListener("scroll",
|
|
231
|
+
p.removeEventListener("scroll", L), p.removeEventListener("scrollend", M);
|
|
225
232
|
}
|
|
226
|
-
return S(() => F(Y.value)), { x:
|
|
233
|
+
return S(() => F(Y.value)), { x: o, xScrollMax: s, y: c, yScrollMax: l, isScrolling: i, left: d, right: v, top: u, bottom: m };
|
|
227
234
|
}
|
|
228
|
-
function
|
|
235
|
+
function de() {
|
|
229
236
|
const e = f(0), t = f(0);
|
|
230
237
|
let n = performance.now();
|
|
231
|
-
const r = 10,
|
|
238
|
+
const r = 10, o = (s) => {
|
|
232
239
|
if (t.value++, t.value >= r) {
|
|
233
|
-
const
|
|
234
|
-
e.value = Math.round(1e3 / (
|
|
240
|
+
const c = s - n;
|
|
241
|
+
e.value = Math.round(1e3 / (c / r)), n = s, t.value = 0;
|
|
235
242
|
}
|
|
236
|
-
requestAnimationFrame(
|
|
243
|
+
requestAnimationFrame(o);
|
|
237
244
|
};
|
|
238
|
-
return requestAnimationFrame(
|
|
245
|
+
return requestAnimationFrame(o), { fps: e };
|
|
239
246
|
}
|
|
240
|
-
function
|
|
247
|
+
function me(e) {
|
|
241
248
|
if (!e || typeof e != "string" || e.trim() === "")
|
|
242
249
|
throw new Error("Invalid mediaQuery parameter. It must be a non-empty string.");
|
|
243
|
-
const t = f(window && window.matchMedia(e).matches), n = window.matchMedia(e), r = (
|
|
244
|
-
t.value =
|
|
250
|
+
const t = f(window && window.matchMedia(e).matches), n = window.matchMedia(e), r = (o) => {
|
|
251
|
+
t.value = o.matches;
|
|
245
252
|
};
|
|
246
253
|
return x(() => {
|
|
247
254
|
n.addEventListener("change", r);
|
|
@@ -249,19 +256,19 @@ function fe(e) {
|
|
|
249
256
|
n.removeEventListener("change", r);
|
|
250
257
|
}), { match: t };
|
|
251
258
|
}
|
|
252
|
-
function
|
|
253
|
-
const r =
|
|
254
|
-
let
|
|
255
|
-
const
|
|
259
|
+
function ve(e, t, n = {}) {
|
|
260
|
+
const r = A(() => window && "ResizeObserver" in window);
|
|
261
|
+
let o;
|
|
262
|
+
const s = f(!1), c = h(() => {
|
|
256
263
|
const u = E(e);
|
|
257
264
|
return u ? Array.isArray(u) ? u.map((m) => E(m)).filter((m) => m) : [u] : [];
|
|
258
265
|
}), l = () => {
|
|
259
|
-
|
|
266
|
+
o && (o.disconnect(), o = void 0);
|
|
260
267
|
}, i = () => {
|
|
261
|
-
r.value &&
|
|
268
|
+
r.value && c.value.length && !s.value && (o = new ResizeObserver(t), c.value.forEach((u) => o.observe(u, n)));
|
|
262
269
|
};
|
|
263
|
-
|
|
264
|
-
() =>
|
|
270
|
+
T(
|
|
271
|
+
() => c.value,
|
|
265
272
|
() => {
|
|
266
273
|
l(), i();
|
|
267
274
|
},
|
|
@@ -272,96 +279,96 @@ function de(e, t, n = {}) {
|
|
|
272
279
|
}
|
|
273
280
|
);
|
|
274
281
|
const d = () => {
|
|
275
|
-
|
|
282
|
+
s.value = !0, l();
|
|
276
283
|
}, v = () => {
|
|
277
|
-
|
|
284
|
+
s.value = !1, i();
|
|
278
285
|
};
|
|
279
286
|
return S(() => l()), {
|
|
280
287
|
stop: d,
|
|
281
288
|
start: v
|
|
282
289
|
};
|
|
283
290
|
}
|
|
284
|
-
function
|
|
285
|
-
const t =
|
|
286
|
-
var
|
|
287
|
-
const
|
|
288
|
-
if (l.type ===
|
|
291
|
+
function pe(e = "default") {
|
|
292
|
+
const t = $(), n = (r) => {
|
|
293
|
+
var c;
|
|
294
|
+
const o = (c = t[r]) == null ? void 0 : c.call(t), s = (l) => {
|
|
295
|
+
if (l.type === q || Array.isArray(l.children) && !l.children.length)
|
|
289
296
|
return !1;
|
|
290
|
-
if (l.type !==
|
|
297
|
+
if (l.type !== z)
|
|
291
298
|
return !0;
|
|
292
299
|
if (typeof l.children == "string")
|
|
293
300
|
return l.children.trim() !== "";
|
|
294
301
|
};
|
|
295
|
-
return
|
|
302
|
+
return o && (o != null && o.length) ? o.some((i) => s(i)) : !1;
|
|
296
303
|
};
|
|
297
304
|
if (Array.isArray(e)) {
|
|
298
|
-
const r =
|
|
299
|
-
return e.forEach((
|
|
300
|
-
const
|
|
301
|
-
r[
|
|
305
|
+
const r = j({});
|
|
306
|
+
return e.forEach((o) => {
|
|
307
|
+
const s = h(() => n(o));
|
|
308
|
+
r[o] = s;
|
|
302
309
|
}), r;
|
|
303
310
|
} else
|
|
304
311
|
return h(() => n(e));
|
|
305
312
|
}
|
|
306
|
-
const
|
|
313
|
+
const D = {
|
|
307
314
|
TdsReportBar: "TdsReportBar"
|
|
308
|
-
},
|
|
315
|
+
}, R = {
|
|
309
316
|
BackTop: ["Tooltip"]
|
|
310
317
|
};
|
|
311
|
-
function
|
|
318
|
+
function Q(e, t) {
|
|
312
319
|
if (["NumberAnimation", "Watermark"].includes(e))
|
|
313
320
|
return [];
|
|
314
321
|
const n = [e];
|
|
315
|
-
e in
|
|
316
|
-
const r = t != null && t.cjs ? "lib" : "es",
|
|
317
|
-
return n.forEach((
|
|
318
|
-
|
|
319
|
-
`@topdatasec/report/${r}/${
|
|
322
|
+
e in R && n.push(...R[e]);
|
|
323
|
+
const r = t != null && t.cjs ? "lib" : "es", o = [`@topdatasec/report/${r}/style/global.css`];
|
|
324
|
+
return n.forEach((s) => {
|
|
325
|
+
o.push(
|
|
326
|
+
`@topdatasec/report/${r}/${D[s]}/${s}.css`
|
|
320
327
|
);
|
|
321
|
-
}),
|
|
328
|
+
}), o;
|
|
322
329
|
}
|
|
323
|
-
function
|
|
330
|
+
function he(e) {
|
|
324
331
|
return {
|
|
325
332
|
type: "component",
|
|
326
333
|
resolve: (t) => {
|
|
327
|
-
if (t in
|
|
334
|
+
if (t in D)
|
|
328
335
|
return {
|
|
329
336
|
name: t,
|
|
330
337
|
// 组件名
|
|
331
338
|
from: "@topdatasec/report",
|
|
332
339
|
// 组件库名称
|
|
333
|
-
sideEffects:
|
|
340
|
+
sideEffects: Q(t, e)
|
|
334
341
|
// 组件样式文件
|
|
335
342
|
};
|
|
336
343
|
}
|
|
337
344
|
};
|
|
338
345
|
}
|
|
339
|
-
const
|
|
340
|
-
return Object.values(
|
|
346
|
+
const ee = function(e) {
|
|
347
|
+
return Object.values(G).forEach((t) => {
|
|
341
348
|
t && t.install && e.use(t);
|
|
342
349
|
}), e;
|
|
343
|
-
},
|
|
344
|
-
install:
|
|
350
|
+
}, ge = {
|
|
351
|
+
install: ee
|
|
345
352
|
};
|
|
346
353
|
export {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
354
|
+
Z as TdsReportBar,
|
|
355
|
+
he as VueAmazingUIResolver,
|
|
356
|
+
ce as add,
|
|
357
|
+
se as cancelRaf,
|
|
358
|
+
ne as dateFormat,
|
|
359
|
+
K as debounce,
|
|
360
|
+
ge as default,
|
|
361
|
+
ae as downloadFile,
|
|
362
|
+
re as formatNumber,
|
|
363
|
+
ee as install,
|
|
364
|
+
oe as rafTimeout,
|
|
365
|
+
J as throttle,
|
|
366
|
+
le as toggleDark,
|
|
367
|
+
ie as useEventListener,
|
|
368
|
+
de as useFps,
|
|
369
|
+
me as useMediaQuery,
|
|
370
|
+
ue as useMutationObserver,
|
|
371
|
+
ve as useResizeObserver,
|
|
372
|
+
fe as useScroll,
|
|
373
|
+
pe as useSlotsExist
|
|
367
374
|
};
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(i,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],r):(i=typeof globalThis<"u"?globalThis:i||self,r(i.TdsReportUI=i.TdsReportUI||{},i.Vue))})(this,function(i,r){"use strict";const O={class:"chart-components"},y=(e=>{const t=e;return t.install=function(n){n.component(t.__name,e)},e})(r.defineComponent({name:"TdsReportBar",__name:"
|
|
1
|
+
(function(i,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],r):(i=typeof globalThis<"u"?globalThis:i||self,r(i.TdsReportUI=i.TdsReportUI||{},i.Vue))})(this,function(i,r){"use strict";const O={class:"chart-components"},y=(e=>{const t=e;return t.install=function(n){n.component(t.__name,e)},e})(r.defineComponent({name:"TdsReportBar",__name:"TdsReportBar",props:{data:{}},setup(e){const t=e;console.log(t.data,444444444);const n=r.computed(()=>t.data.options);return(o,s)=>{const c=r.resolveComponent("TdsChart");return r.openBlock(),r.createElementBlock("div",O,[r.createVNode(c,{option:n.value},null,8,["option"])])}}})),B=Object.freeze(Object.defineProperty({__proto__:null,TdsReportBar:y},Symbol.toStringTag,{value:"Module"}));function U(e=Date.now(),t="YYYY-MM-DD HH:mm:ss"){try{let n;if(typeof e=="number"||typeof e=="string"){if(n=new Date(e),isNaN(n.getTime()))throw new Error("Invalid date")}else n=e;const o=(c,a=2)=>String(c).padStart(a,"0"),s=c=>{switch(c){case"YYYY":return o(n.getFullYear());case"YY":return o(n.getFullYear()).slice(2,4);case"MM":return o(n.getMonth()+1);case"M":return String(n.getMonth()+1);case"DD":return o(n.getDate());case"D":return String(n.getDate());case"HH":return o(n.getHours());case"H":return String(n.getHours());case"mm":return o(n.getMinutes());case"m":return String(n.getMinutes());case"ss":return o(n.getSeconds());case"s":return String(n.getSeconds());case"SSS":return o(n.getMilliseconds(),3);default:return c}};return t.replace(/(YYYY|YY|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS)/g,s)}catch(n){return console.error("Error formatting date:",n),""}}function V(e,t=2,n=",",o=".",s,c){typeof e!="number"&&typeof e!="string"&&console.warn("Expected value to be of type number or string"),typeof t!="number"&&console.warn("Expected precision to be of type number");const a=Number(e);if(isNaN(a)||!isFinite(a))return"";if(a===0)return a.toFixed(t);let u=a.toFixed(t);if(typeof n=="string"&&n!==""){const[f,m]=u.split(".");u=f.replace(/(\d)(?=(\d{3})+$)/g,"$1"+n)+(m?o+m:"")}return(s||"")+u+(c||"")}function k(e,t=0,n=!1){let o=null;function s(a){if(o||(o=a),a-o>=t){try{e()}catch(f){console.error("Error executing rafTimeout function:",f)}n&&(o=a,c.id=requestAnimationFrame(s))}else c.id=requestAnimationFrame(s)}const c={id:requestAnimationFrame(s)};return c}function H(e){e&&e.id&&typeof e.id=="number"?cancelAnimationFrame(e.id):console.warn("cancelRaf received an invalid id:",e)}function M(e,t=300){let n=!0;return function(...o){return n&&(e(...o),n=!1,setTimeout(()=>{n=!0},t)),!1}}function T(e,t=300){let n=null;return function(...o){n&&clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}function I(e,t){if(Number.isNaN(e)||Number.isNaN(t))throw new Error("Both num1 and num2 must be valid numbers.");const n=e%1!==0,o=t%1!==0;if(!n&&!o)return e+t;const s=String(e).split(".")[1]??"",c=String(t).split(".")[1]??"",a=Math.max(s.length,c.length),u=Math.pow(10,a),f=e.toFixed(a),m=t.toFixed(a);return(+f.replace(".","")+ +m.replace(".",""))/u}function j(e,t){if(!e){console.error("无效的 url");return}const n=t||e.split("?")[0].split("/").pop()||"download";try{fetch(e).then(o=>{o.ok?o.blob().then(s=>{const c=URL.createObjectURL(s),a=document.createElement("a");a.href=c,a.download=n,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(c)}):console.error("请求文件失败,状态码:",o.status)})}catch(o){console.error("文件下载失败:",o)}}function N(){const e=document.documentElement;e.classList.toggle("dark"),e.classList.contains("dark")?e.style.colorScheme="dark":e.style.colorScheme="light"}function z(){const e=r.ref(!1),t=r.getCurrentInstance();return t&&r.onMounted(()=>{e.value=!0},t),e}function R(e){const t=z();return r.computed(()=>(t.value,!!e()))}function $(e,t,n){r.onMounted(()=>e.addEventListener(t,n)),r.onUnmounted(()=>e.removeEventListener(t,n))}function q(e,t,n={}){const o=R(()=>window&&"MutationObserver"in window),s=r.ref(!1);let c;const a=r.computed(()=>{const d=r.toValue(e);return d?Array.isArray(d)?d.map(p=>r.toValue(p)).filter(p=>p):[d]:[]}),u=()=>{c&&(c.disconnect(),c=void 0)},f=()=>{o.value&&a.value.length&&!s.value&&(c=new MutationObserver(t),a.value.forEach(d=>c.observe(d,n)))};r.watch(()=>a.value,()=>{u(),f()},{immediate:!0,flush:"post"});const m=()=>{s.value=!0,u()},h=()=>{s.value=!1,f()};return r.onBeforeUnmount(()=>u()),{stop:m,start:h}}function x(e=window,t=0,n,o){const s=r.ref(0),c=r.ref(0),a=r.ref(0),u=r.ref(0),f=r.ref(!1),m=r.ref(!1),h=r.ref(!1),d=r.ref(!1),p=r.ref(!1),E=r.ref(0),S=r.ref(0);function Q(l){f.value=!0;const g=l.target.documentElement??l.target;s.value=g.scrollLeft,a.value=g.scrollTop,m.value=s.value<E.value,h.value=s.value>E.value,d.value=a.value<S.value,p.value=a.value>S.value,E.value=s.value,S.value=a.value,w(l),n&&n(l)}const Y=M(Q,t);function X(l){f.value&&(f.value=!1,m.value=!1,h.value=!1,d.value=!1,p.value=!1,o&&o(l))}const w=T(X,t+200),A=r.computed(()=>{const l=r.toValue(e);return l||null});r.watch(()=>A.value,(l,g)=>{var b;if(g&&D(g),l){const v=((b=l==null?void 0:l.document)==null?void 0:b.documentElement)||(l==null?void 0:l.documentElement)||l;c.value=v.scrollWidth-v.clientWidth,u.value=v.scrollHeight-v.clientHeight,v.addEventListener("scroll",Y),v.addEventListener("scrollend",w)}},{immediate:!0,flush:"post"});function D(l){var b;const g=((b=l==null?void 0:l.document)==null?void 0:b.documentElement)||(l==null?void 0:l.documentElement)||l;g.removeEventListener("scroll",Y),g.removeEventListener("scrollend",w)}return r.onBeforeUnmount(()=>D(A.value)),{x:s,xScrollMax:c,y:a,yScrollMax:u,isScrolling:f,left:m,right:h,top:d,bottom:p}}function C(){const e=r.ref(0),t=r.ref(0);let n=performance.now();const o=10,s=c=>{if(t.value++,t.value>=o){const a=c-n;e.value=Math.round(1e3/(a/o)),n=c,t.value=0}requestAnimationFrame(s)};return requestAnimationFrame(s),{fps:e}}function P(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid mediaQuery parameter. It must be a non-empty string.");const t=r.ref(window&&window.matchMedia(e).matches),n=window.matchMedia(e),o=s=>{t.value=s.matches};return r.onMounted(()=>{n.addEventListener("change",o)}),r.onBeforeUnmount(()=>{n.removeEventListener("change",o)}),{match:t}}function W(e,t,n={}){const o=R(()=>window&&"ResizeObserver"in window);let s;const c=r.ref(!1),a=r.computed(()=>{const d=r.toValue(e);return d?Array.isArray(d)?d.map(p=>r.toValue(p)).filter(p=>p):[d]:[]}),u=()=>{s&&(s.disconnect(),s=void 0)},f=()=>{o.value&&a.value.length&&!c.value&&(s=new ResizeObserver(t),a.value.forEach(d=>s.observe(d,n)))};r.watch(()=>a.value,()=>{u(),f()},{immediate:!0,flush:"post"});const m=()=>{c.value=!0,u()},h=()=>{c.value=!1,f()};return r.onBeforeUnmount(()=>u()),{stop:m,start:h}}function Z(e="default"){const t=r.useSlots(),n=o=>{var a;const s=(a=t[o])==null?void 0:a.call(t),c=u=>{if(u.type===r.Comment||Array.isArray(u.children)&&!u.children.length)return!1;if(u.type!==r.Text)return!0;if(typeof u.children=="string")return u.children.trim()!==""};return s&&(s!=null&&s.length)?s.some(f=>c(f)):!1};if(Array.isArray(e)){const o=r.reactive({});return e.forEach(s=>{const c=r.computed(()=>n(s));o[s]=c}),o}else return r.computed(()=>n(e))}const F={TdsReportBar:"TdsReportBar"},L={BackTop:["Tooltip"]};function G(e,t){if(["NumberAnimation","Watermark"].includes(e))return[];const n=[e];e in L&&n.push(...L[e]);const o=t!=null&&t.cjs?"lib":"es",s=[`@topdatasec/report/${o}/style/global.css`];return n.forEach(c=>{s.push(`@topdatasec/report/${o}/${F[c]}/${c}.css`)}),s}function J(e){return{type:"component",resolve:t=>{if(t in F)return{name:t,from:"@topdatasec/report",sideEffects:G(t,e)}}}}const _=function(e){return Object.values(B).forEach(t=>{t&&t.install&&e.use(t)}),e},K={install:_};i.TdsReportBar=y,i.VueAmazingUIResolver=J,i.add=I,i.cancelRaf=H,i.dateFormat=U,i.debounce=T,i.default=K,i.downloadFile=j,i.formatNumber=V,i.install=_,i.rafTimeout=k,i.throttle=M,i.toggleDark=N,i.useEventListener=$,i.useFps=C,i.useMediaQuery=P,i.useMutationObserver=q,i.useResizeObserver=W,i.useScroll=x,i.useSlotsExist=Z,Object.defineProperties(i,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { defineComponent as s, computed as a, resolveComponent as c, createElementBlock as p, openBlock as r, createVNode as d } from "vue";
|
|
2
|
+
const l = { class: "chart-components" }, u = /* @__PURE__ */ s({
|
|
3
|
+
name: "TdsReportBar",
|
|
4
|
+
__name: "TdsReportBar",
|
|
5
|
+
props: {
|
|
6
|
+
data: {}
|
|
7
|
+
},
|
|
8
|
+
setup(t) {
|
|
9
|
+
const o = t;
|
|
10
|
+
console.log(o.data, 444444444);
|
|
11
|
+
const e = a(() => o.data.options);
|
|
12
|
+
return (m, _) => {
|
|
13
|
+
const n = c("TdsChart");
|
|
14
|
+
return r(), p("div", l, [
|
|
15
|
+
d(n, { option: e.value }, null, 8, ["option"])
|
|
16
|
+
]);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
export {
|
|
21
|
+
u as default
|
|
22
|
+
};
|
package/es/bar/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export type { Props } from './
|
|
1
|
+
export type { Props } from './TdsReportBar';
|
|
2
2
|
declare const _default: {
|
|
3
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./
|
|
3
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./TdsReportBar').Props> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
4
4
|
P: {};
|
|
5
5
|
B: {};
|
|
6
6
|
D: {};
|
|
7
7
|
C: {};
|
|
8
8
|
M: {};
|
|
9
9
|
Defaults: {};
|
|
10
|
-
}, Readonly<import('./
|
|
10
|
+
}, Readonly<import('./TdsReportBar').Props> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
11
11
|
__isFragment?: never;
|
|
12
12
|
__isTeleport?: never;
|
|
13
13
|
__isSuspense?: never;
|
|
14
|
-
} & import('vue').ComponentOptionsBase<Readonly<import('./
|
|
14
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./TdsReportBar').Props> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & import('vue').Plugin;
|
|
15
15
|
export default _default;
|
package/es/bar/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a={class:"chart-components"},r=e.defineComponent({name:"TdsReportBar",__name:"TdsReportBar",props:{data:{}},setup(t){const o=t;console.log(o.data,444444444);const n=e.computed(()=>o.data.options);return(c,p)=>{const s=e.resolveComponent("TdsChart");return e.openBlock(),e.createElementBlock("div",a,[e.createVNode(s,{option:n.value},null,8,["option"])])}}});exports.default=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./TdsReportBar.vue.cjs");exports.default=e.default;
|
package/lib/bar/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./TdsReportBar.vue.cjs"),t=require("../utils/type.cjs"),u=t.withInstall(e.default);exports.default=u;
|
package/lib/bar/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export type { Props } from './
|
|
1
|
+
export type { Props } from './TdsReportBar';
|
|
2
2
|
declare const _default: {
|
|
3
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./
|
|
3
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./TdsReportBar').Props> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
4
4
|
P: {};
|
|
5
5
|
B: {};
|
|
6
6
|
D: {};
|
|
7
7
|
C: {};
|
|
8
8
|
M: {};
|
|
9
9
|
Defaults: {};
|
|
10
|
-
}, Readonly<import('./
|
|
10
|
+
}, Readonly<import('./TdsReportBar').Props> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
11
11
|
__isFragment?: never;
|
|
12
12
|
__isTeleport?: never;
|
|
13
13
|
__isSuspense?: never;
|
|
14
|
-
} & import('vue').ComponentOptionsBase<Readonly<import('./
|
|
14
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./TdsReportBar').Props> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & import('vue').Plugin;
|
|
15
15
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topdatasec/report",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "wangguiwang",
|
|
6
6
|
"homepage": "",
|
|
@@ -78,7 +78,6 @@
|
|
|
78
78
|
"prettier": "^3.5.3",
|
|
79
79
|
"rimraf": "^6.0.1",
|
|
80
80
|
"rollup-plugin-visualizer": "^5.14.0",
|
|
81
|
-
"topdatasec-ui": "^1.6.1",
|
|
82
81
|
"typescript": "^5.8.2",
|
|
83
82
|
"unplugin-auto-import": "^19.1.1",
|
|
84
83
|
"unplugin-vue-components": "^28.4.1",
|
package/es/bar/Bar.vue.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { defineComponent as e, computed as a, createElementBlock as n, openBlock as c } from "vue";
|
|
2
|
-
const s = { class: "chart-components" }, m = /* @__PURE__ */ e({
|
|
3
|
-
name: "TdsReportBar",
|
|
4
|
-
__name: "Bar",
|
|
5
|
-
props: {
|
|
6
|
-
data: {}
|
|
7
|
-
},
|
|
8
|
-
setup(t) {
|
|
9
|
-
const o = t;
|
|
10
|
-
return console.log(o.data, 444444444), a(() => o.data.options), (r, p) => (c(), n("div", s, " 111111111111111111111 "));
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
export {
|
|
14
|
-
m as default
|
|
15
|
-
};
|
package/es/bar/Bar.vue2.js
DELETED
package/lib/bar/Bar.vue.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n={class:"chart-components"},a=e.defineComponent({name:"TdsReportBar",__name:"Bar",props:{data:{}},setup(o){const t=o;return console.log(t.data,444444444),e.computed(()=>t.data.options),(s,c)=>(e.openBlock(),e.createElementBlock("div",n," 111111111111111111111 "))}});exports.default=a;
|
package/lib/bar/Bar.vue2.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Bar.vue.cjs");exports.default=e.default;
|
|
File without changes
|
|
File without changes
|