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