@topdatasec/report 1.0.6 → 1.0.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.
Files changed (105) hide show
  1. package/dist/index.iife.js +1 -1
  2. package/dist/index.js +790 -245
  3. package/dist/index.umd.cjs +1 -1
  4. package/dist/style.css +1 -1
  5. package/es/_virtual/_plugin-vue_export-helper.js +9 -0
  6. package/es/bar/Bar.vue.js +6 -8
  7. package/es/components.d.ts +2 -0
  8. package/es/components.js +6 -2
  9. package/es/config/Config.css +1 -0
  10. package/es/config/Config.d.ts +2 -0
  11. package/es/config/Config.vue.js +7 -0
  12. package/es/config/Config.vue2.js +207 -0
  13. package/es/config/index.d.ts +14 -0
  14. package/es/config/index.js +6 -0
  15. package/es/index.js +26 -22
  16. package/es/line/Line.d.ts +5 -0
  17. package/es/line/Line.vue.js +20 -0
  18. package/es/line/Line.vue2.js +4 -0
  19. package/es/line/index.d.ts +15 -0
  20. package/es/line/index.js +6 -0
  21. package/es/pie/Pie.d.ts +5 -0
  22. package/es/pie/index.d.ts +15 -0
  23. package/es/report/Report.d.ts +7 -0
  24. package/es/report/index.d.ts +17 -0
  25. package/es/select/Select.d.ts +9 -0
  26. package/es/select/index.d.ts +25 -0
  27. package/es/settingCharts/SettingCharts.d.ts +5 -0
  28. package/es/settingCharts/index.d.ts +14 -0
  29. package/es/settingFilter/index.d.ts +15 -0
  30. package/es/settingFilter/settingFilter.d.ts +5 -0
  31. package/es/settingTable/SettingTable.d.ts +2 -0
  32. package/es/settingTable/index.d.ts +14 -0
  33. package/es/settingText/index.d.ts +15 -0
  34. package/es/settingText/settingText.d.ts +5 -0
  35. package/es/settingTitle/index.d.ts +14 -0
  36. package/es/settingTitle/settingTitle.d.ts +2 -0
  37. package/es/stores/interface/index.d.ts +18 -0
  38. package/es/stores/modules/report.d.ts +35 -0
  39. package/es/stores/modules/report.js +45 -0
  40. package/es/table/Table.d.ts +5 -0
  41. package/es/table/index.d.ts +15 -0
  42. package/es/text/Text.d.ts +5 -0
  43. package/es/text/index.d.ts +15 -0
  44. package/es/time/Time.d.ts +9 -0
  45. package/es/time/index.d.ts +25 -0
  46. package/es/utils/api.d.ts +12 -0
  47. package/es/utils/api.js +9 -0
  48. package/es/utils/chartsOption.d.ts +298 -0
  49. package/es/utils/chartsOption.js +187 -0
  50. package/es/utils/data.d.ts +4 -0
  51. package/es/utils/data.js +101 -0
  52. package/es/utils/index.d.ts +2 -0
  53. package/es/utils/index.js +82 -79
  54. package/es/utils/type.js +1 -1
  55. package/lib/_virtual/_plugin-vue_export-helper.cjs +1 -0
  56. package/lib/bar/Bar.vue.cjs +1 -1
  57. package/lib/components.cjs +1 -1
  58. package/lib/components.d.ts +2 -0
  59. package/lib/config/Config.css +1 -0
  60. package/lib/config/Config.d.ts +2 -0
  61. package/lib/config/Config.vue.cjs +1 -0
  62. package/lib/config/Config.vue2.cjs +1 -0
  63. package/lib/config/index.cjs +1 -0
  64. package/lib/config/index.d.ts +14 -0
  65. package/lib/index.cjs +1 -1
  66. package/lib/line/Line.d.ts +5 -0
  67. package/lib/line/Line.vue.cjs +1 -0
  68. package/lib/line/Line.vue2.cjs +1 -0
  69. package/lib/line/index.cjs +1 -0
  70. package/lib/line/index.d.ts +15 -0
  71. package/lib/pie/Pie.d.ts +5 -0
  72. package/lib/pie/index.d.ts +15 -0
  73. package/lib/report/Report.d.ts +7 -0
  74. package/lib/report/index.d.ts +17 -0
  75. package/lib/select/Select.d.ts +9 -0
  76. package/lib/select/index.d.ts +25 -0
  77. package/lib/settingCharts/SettingCharts.d.ts +5 -0
  78. package/lib/settingCharts/index.d.ts +14 -0
  79. package/lib/settingFilter/index.d.ts +15 -0
  80. package/lib/settingFilter/settingFilter.d.ts +5 -0
  81. package/lib/settingTable/SettingTable.d.ts +2 -0
  82. package/lib/settingTable/index.d.ts +14 -0
  83. package/lib/settingText/index.d.ts +15 -0
  84. package/lib/settingText/settingText.d.ts +5 -0
  85. package/lib/settingTitle/index.d.ts +14 -0
  86. package/lib/settingTitle/settingTitle.d.ts +2 -0
  87. package/lib/stores/interface/index.d.ts +18 -0
  88. package/lib/stores/modules/report.cjs +1 -0
  89. package/lib/stores/modules/report.d.ts +35 -0
  90. package/lib/table/Table.d.ts +5 -0
  91. package/lib/table/index.d.ts +15 -0
  92. package/lib/text/Text.d.ts +5 -0
  93. package/lib/text/index.d.ts +15 -0
  94. package/lib/time/Time.d.ts +9 -0
  95. package/lib/time/index.d.ts +25 -0
  96. package/lib/utils/api.cjs +1 -0
  97. package/lib/utils/api.d.ts +12 -0
  98. package/lib/utils/chartsOption.cjs +1 -0
  99. package/lib/utils/chartsOption.d.ts +298 -0
  100. package/lib/utils/data.cjs +1 -0
  101. package/lib/utils/data.d.ts +4 -0
  102. package/lib/utils/index.cjs +1 -1
  103. package/lib/utils/index.d.ts +2 -0
  104. package/lib/utils/type.cjs +1 -1
  105. package/package.json +9 -4
@@ -0,0 +1,187 @@
1
+ import "echarts";
2
+ const n = "rgba(51, 51, 51, 0.15)", r = "rgba(51, 51, 51, 1)", c = 12, m = (a = !1) => {
3
+ const t = {
4
+ // top: '2%',
5
+ left: "3%",
6
+ right: "3%",
7
+ bottom: "2%",
8
+ containLabel: !0
9
+ };
10
+ return a && (t.top = "5%"), t;
11
+ }, e = [
12
+ "46, 145, 255",
13
+ "48, 212, 183",
14
+ "108, 108, 255",
15
+ "109, 237, 124",
16
+ "128, 218, 236",
17
+ "58, 200, 218",
18
+ "146, 218, 89",
19
+ "118, 218, 218",
20
+ "143, 192, 244",
21
+ "192, 192, 145",
22
+ "153, 136, 204",
23
+ "212, 217, 230",
24
+ "124, 186, 255",
25
+ "209, 182, 225",
26
+ "255, 197, 84",
27
+ "249, 140, 106",
28
+ "246, 179, 82",
29
+ "100, 161, 206",
30
+ "246, 175, 159",
31
+ "238, 97, 97"
32
+ ], f = (a = [
33
+ {
34
+ name: "数据1",
35
+ value: 63
36
+ },
37
+ {
38
+ name: "数据2",
39
+ value: 45
40
+ },
41
+ {
42
+ name: "数据3",
43
+ value: 43
44
+ }
45
+ ], t = { name: "name", value: "value" }) => {
46
+ const i = (o = "rgba(46, 145, 255, 0.7)", s = "rgba(46, 145, 255, 0.2)") => ({
47
+ color: {
48
+ type: "linear",
49
+ x: 0,
50
+ y: 0,
51
+ x2: 0,
52
+ y2: 1,
53
+ colorStops: [
54
+ {
55
+ offset: 0,
56
+ color: o
57
+ },
58
+ {
59
+ offset: 0.8,
60
+ color: s
61
+ }
62
+ ]
63
+ }
64
+ }), l = a.map((o) => o[t.value]);
65
+ return {
66
+ // 提示框组件
67
+ tooltip: {
68
+ trigger: "item"
69
+ //触发类型,axis:坐标轴触发
70
+ },
71
+ // 图例组件
72
+ // legend: {
73
+ // type: 'plain', //plain:普通图例;scroll:可滚动翻页的图例。当图例数量较多时使。
74
+ // show: true,
75
+ // },
76
+ grid: m(),
77
+ title: {
78
+ show: !0,
79
+ text: "样例数据",
80
+ textStyle: {
81
+ color: "#333",
82
+ fontSize: 18
83
+ },
84
+ x: 10,
85
+ y: 10
86
+ },
87
+ // x 轴设置
88
+ xAxis: [
89
+ {
90
+ type: "category",
91
+ nameGap: 8,
92
+ // X轴名称与轴线之间的距离
93
+ nameRotate: 0,
94
+ // 坐标轴名称旋转
95
+ axisLabel: {
96
+ color: r,
97
+ // X轴类目名称样式
98
+ rotate: 0
99
+ // X轴类目名称旋转角度
100
+ },
101
+ axisLine: {
102
+ //X轴轴线设置
103
+ show: !0,
104
+ lineStyle: {
105
+ color: n,
106
+ width: 1
107
+ }
108
+ },
109
+ axisTick: { show: !1 },
110
+ // X轴刻度相关设置
111
+ splitLine: { show: !1 },
112
+ // 横向分隔线
113
+ data: a.map((o) => o[t.name])
114
+ }
115
+ ],
116
+ // y轴设置
117
+ yAxis: [
118
+ {
119
+ type: "value",
120
+ min: 0,
121
+ // 坐标轴刻度最小值
122
+ position: "left",
123
+ nameTextStyle: {
124
+ fontSize: c,
125
+ color: r,
126
+ fontWeight: "bold"
127
+ },
128
+ axisLine: { show: !1 },
129
+ // y轴轴线设置
130
+ axisTick: { show: !1 },
131
+ // 刻度设置
132
+ splitLine: { show: !1 },
133
+ // 纵向分隔线
134
+ axisLabel: {
135
+ color: r,
136
+ // y轴刻度标签
137
+ formatter: "{value}",
138
+ inside: !1
139
+ // 刻度标签是否朝内,默认朝外
140
+ }
141
+ }
142
+ ],
143
+ series: [
144
+ {
145
+ type: "bar",
146
+ barWidth: 15,
147
+ barGap: "0%",
148
+ itemStyle: i(`rgba(${e[0]}, 0.7)`, `rgba(${e[0]}, 0.2)`),
149
+ data: l,
150
+ label: {
151
+ show: !0,
152
+ // 显示标签
153
+ position: "top",
154
+ // 标签位置
155
+ color: "inherit",
156
+ // 标签颜色
157
+ lineHeight: 24
158
+ // 行高
159
+ }
160
+ },
161
+ {
162
+ // 柱底圆片
163
+ name: "",
164
+ type: "pictorialBar",
165
+ symbolSize: [15, 10],
166
+ //调整截面形状
167
+ symbolOffset: [0, 5],
168
+ itemStyle: i(`rgba(${e[0]}, 0.7)`, `rgba(${e[0]}, 0.2)`),
169
+ data: l
170
+ },
171
+ {
172
+ // 柱顶圆片
173
+ name: "",
174
+ type: "pictorialBar",
175
+ symbolSize: [15, 10],
176
+ //调整截面形状
177
+ symbolOffset: [0, -5],
178
+ symbolPosition: "end",
179
+ itemStyle: i(`rgba(${e[0]}, 0.9)`, `rgba(${e[0]}, 1)`),
180
+ data: l
181
+ }
182
+ ]
183
+ };
184
+ };
185
+ export {
186
+ f as chartsBar
187
+ };
@@ -0,0 +1,4 @@
1
+ import { ContentType } from '../stores/interface';
2
+ export declare const normalValue: any[];
3
+ export declare const componentModelList: ContentType[];
4
+ export declare const normalValueFn: (type: string) => any;
@@ -0,0 +1,101 @@
1
+ import { getUniId as t } from "./index.js";
2
+ import { chartsBar as n } from "./chartsOption.js";
3
+ const e = [
4
+ { key: "assets", name: "资产名称" },
5
+ { key: "type", name: "资产类型" },
6
+ { key: "data", name: "资产数据" }
7
+ ], a = [
8
+ { assets: "name1", type: "type1", data: "data1" },
9
+ { assets: "name2", type: "type2", data: "data2" },
10
+ { assets: "name3", type: "type3", data: "data3" }
11
+ ], o = [
12
+ { data: [{ name: "默认数据", value: 180 }], label: "name1" },
13
+ { data: [{ name: "默认数据", value: 311 }], label: "name2" },
14
+ { data: [{ name: "默认数据", value: 42 }], label: "name3" },
15
+ { data: [{ name: "默认数据", value: 32391 }], label: "name4" }
16
+ ], d = [
17
+ {
18
+ type: "report-select",
19
+ label: "资产:",
20
+ value: "0",
21
+ data: [
22
+ {
23
+ label: "全部",
24
+ data: "0"
25
+ },
26
+ {
27
+ label: "10.10.2.20_root",
28
+ data: "743dbb32-8a41-4990-9d76-48925b000a93"
29
+ },
30
+ {
31
+ label: "10.10.4.206_sysdba",
32
+ data: "23193788-c895-47a8-8123-65799540394c"
33
+ },
34
+ {
35
+ label: "10.10.4.26_root@/root/files/",
36
+ data: "bb7b07c9-b96b-4caf-ac76-bb45ae849844"
37
+ }
38
+ ],
39
+ uri: "/da/report/sens/get_asset_all",
40
+ id: t()
41
+ },
42
+ {
43
+ type: "range-time",
44
+ data: [
45
+ {
46
+ start_time: "2024-08-20 19:49:34",
47
+ end_time: "2024-09-12 19:49:34"
48
+ }
49
+ ],
50
+ id: t()
51
+ },
52
+ {
53
+ type: "h1",
54
+ data: "报表名称",
55
+ options: {
56
+ size: 24,
57
+ color: "rgba(0,0,0,0.85)",
58
+ fontWeight: 500,
59
+ letterSpacing: 0,
60
+ textIndent: 0,
61
+ textAlign: "left"
62
+ },
63
+ id: t()
64
+ },
65
+ {
66
+ type: "h2",
67
+ data: "一级标题",
68
+ name: "一级标题",
69
+ options: {
70
+ size: 18,
71
+ color: " rgba(0, 0, 0, 0.85)",
72
+ fontWeight: 500,
73
+ letterSpacing: 0,
74
+ textIndent: 0,
75
+ textAlign: "left"
76
+ },
77
+ id: t()
78
+ },
79
+ {
80
+ type: "report-table",
81
+ data: a,
82
+ showColumn: e,
83
+ name: "表格",
84
+ options: {
85
+ showColumn: {
86
+ assets: !0,
87
+ type: !0,
88
+ data: !0
89
+ },
90
+ border: !0,
91
+ showHeader: !0,
92
+ stripe: !1
93
+ },
94
+ rp_item_uuid: "",
95
+ id: t()
96
+ }
97
+ ];
98
+ n();
99
+ export {
100
+ d as normalValue
101
+ };
@@ -39,3 +39,5 @@ export declare function useResizeObserver(target: Ref | Ref[] | HTMLElement | HT
39
39
  start: () => void;
40
40
  };
41
41
  export declare function useSlotsExist(slotsName?: string | string[]): any;
42
+ export declare const getUniId: () => string;
43
+ export declare const deepClone: <T>(obj: T | T[]) => any;
package/es/utils/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { onMounted as x, onUnmounted as N, ref as f, computed as g, toValue as E, watch as L, onBeforeUnmount as w, useSlots as O, reactive as R, getCurrentInstance as k, Comment as U, Text as V } from "vue";
1
+ import { onMounted as x, onUnmounted as T, ref as f, computed as h, toValue as S, watch as L, onBeforeUnmount as w, useSlots as H, reactive as R, getCurrentInstance as k, Comment as U, Text as V } from "vue";
2
2
  function j(e = Date.now(), n = "YYYY-MM-DD HH:mm:ss") {
3
3
  try {
4
4
  let t;
@@ -7,8 +7,8 @@ function j(e = Date.now(), n = "YYYY-MM-DD HH:mm:ss") {
7
7
  throw new Error("Invalid date");
8
8
  } else
9
9
  t = e;
10
- const r = (c, s = 2) => String(c).padStart(s, "0"), o = (c) => {
11
- switch (c) {
10
+ const r = (i, s = 2) => String(i).padStart(s, "0"), o = (i) => {
11
+ switch (i) {
12
12
  case "YYYY":
13
13
  return r(t.getFullYear());
14
14
  case "YY":
@@ -36,7 +36,7 @@ function j(e = Date.now(), n = "YYYY-MM-DD HH:mm:ss") {
36
36
  case "SSS":
37
37
  return r(t.getMilliseconds(), 3);
38
38
  default:
39
- return c;
39
+ return i;
40
40
  }
41
41
  };
42
42
  return n.replace(/(YYYY|YY|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS)/g, o);
@@ -44,39 +44,39 @@ function j(e = Date.now(), n = "YYYY-MM-DD HH:mm:ss") {
44
44
  return console.error("Error formatting date:", t), "";
45
45
  }
46
46
  }
47
- function P(e, n = 2, t = ",", r = ".", o, c) {
47
+ function J(e, n = 2, t = ",", r = ".", o, i) {
48
48
  typeof e != "number" && typeof e != "string" && console.warn("Expected value to be of type number or string"), typeof n != "number" && console.warn("Expected precision to be of type number");
49
49
  const s = Number(e);
50
50
  if (isNaN(s) || !isFinite(s))
51
51
  return "";
52
52
  if (s === 0)
53
53
  return s.toFixed(n);
54
- let l = s.toFixed(n);
54
+ let c = s.toFixed(n);
55
55
  if (typeof t == "string" && t !== "") {
56
- const [i, d] = l.split(".");
57
- l = i.replace(/(\d)(?=(\d{3})+$)/g, "$1" + t) + (d ? r + d : "");
56
+ const [l, d] = c.split(".");
57
+ c = l.replace(/(\d)(?=(\d{3})+$)/g, "$1" + t) + (d ? r + d : "");
58
58
  }
59
- return (o || "") + l + (c || "");
59
+ return (o || "") + c + (i || "");
60
60
  }
61
- function W(e, n = 0, t = !1) {
61
+ function P(e, n = 0, t = !1) {
62
62
  let r = null;
63
63
  function o(s) {
64
64
  if (r || (r = s), s - r >= n) {
65
65
  try {
66
66
  e();
67
- } catch (i) {
68
- console.error("Error executing rafTimeout function:", i);
67
+ } catch (l) {
68
+ console.error("Error executing rafTimeout function:", l);
69
69
  }
70
- t && (r = s, c.id = requestAnimationFrame(o));
70
+ t && (r = s, i.id = requestAnimationFrame(o));
71
71
  } else
72
- c.id = requestAnimationFrame(o);
72
+ i.id = requestAnimationFrame(o);
73
73
  }
74
- const c = {
74
+ const i = {
75
75
  id: requestAnimationFrame(o)
76
76
  };
77
- return c;
77
+ return i;
78
78
  }
79
- function $(e) {
79
+ function W(e) {
80
80
  e && e.id && typeof e.id == "number" ? cancelAnimationFrame(e.id) : console.warn("cancelRaf received an invalid id:", e);
81
81
  }
82
82
  function q(e, n = 300) {
@@ -95,14 +95,14 @@ function I(e, n = 300) {
95
95
  }, n);
96
96
  };
97
97
  }
98
- function Z(e, n) {
98
+ function $(e, n) {
99
99
  if (Number.isNaN(e) || Number.isNaN(n))
100
100
  throw new Error("Both num1 and num2 must be valid numbers.");
101
101
  const t = e % 1 !== 0, r = n % 1 !== 0;
102
102
  if (!t && !r)
103
103
  return e + n;
104
- const o = String(e).split(".")[1] ?? "", c = String(n).split(".")[1] ?? "", s = Math.max(o.length, c.length), l = Math.pow(10, s), i = e.toFixed(s), d = n.toFixed(s);
105
- return (+i.replace(".", "") + +d.replace(".", "")) / l;
104
+ const o = String(e).split(".")[1] ?? "", i = String(n).split(".")[1] ?? "", s = Math.max(o.length, i.length), c = Math.pow(10, s), l = e.toFixed(s), d = n.toFixed(s);
105
+ return (+l.replace(".", "") + +d.replace(".", "")) / c;
106
106
  }
107
107
  function C(e, n) {
108
108
  if (!e) {
@@ -113,15 +113,15 @@ function C(e, n) {
113
113
  try {
114
114
  fetch(e).then((r) => {
115
115
  r.ok ? r.blob().then((o) => {
116
- const c = URL.createObjectURL(o), s = document.createElement("a");
117
- s.href = c, s.download = t, document.body.appendChild(s), s.click(), document.body.removeChild(s), URL.revokeObjectURL(c);
116
+ const i = URL.createObjectURL(o), s = document.createElement("a");
117
+ s.href = i, s.download = t, document.body.appendChild(s), s.click(), document.body.removeChild(s), URL.revokeObjectURL(i);
118
118
  }) : console.error("请求文件失败,状态码:", r.status);
119
119
  });
120
120
  } catch (r) {
121
121
  console.error("文件下载失败:", r);
122
122
  }
123
123
  }
124
- function G() {
124
+ function Z() {
125
125
  const e = document.documentElement;
126
126
  e.classList.toggle("dark"), e.classList.contains("dark") ? e.style.colorScheme = "dark" : e.style.colorScheme = "light";
127
127
  }
@@ -133,26 +133,26 @@ function z() {
133
133
  }
134
134
  function A(e) {
135
135
  const n = z();
136
- return g(() => (n.value, !!e()));
136
+ return h(() => (n.value, !!e()));
137
137
  }
138
- function J(e, n, t) {
139
- x(() => e.addEventListener(n, t)), N(() => e.removeEventListener(n, t));
138
+ function G(e, n, t) {
139
+ x(() => e.addEventListener(n, t)), T(() => e.removeEventListener(n, t));
140
140
  }
141
141
  function K(e, n, t = {}) {
142
142
  const r = A(() => window && "MutationObserver" in window), o = f(!1);
143
- let c;
144
- const s = g(() => {
145
- const a = E(e);
146
- return a ? Array.isArray(a) ? a.map((m) => E(m)).filter((m) => m) : [a] : [];
147
- }), l = () => {
148
- c && (c.disconnect(), c = void 0);
149
- }, i = () => {
150
- r.value && s.value.length && !o.value && (c = new MutationObserver(n), s.value.forEach((a) => c.observe(a, t)));
143
+ let i;
144
+ const s = h(() => {
145
+ const a = S(e);
146
+ return a ? Array.isArray(a) ? a.map((m) => S(m)).filter((m) => m) : [a] : [];
147
+ }), c = () => {
148
+ i && (i.disconnect(), i = void 0);
149
+ }, l = () => {
150
+ r.value && s.value.length && !o.value && (i = new MutationObserver(n), s.value.forEach((a) => i.observe(a, t)));
151
151
  };
152
152
  L(
153
153
  () => s.value,
154
154
  () => {
155
- l(), i();
155
+ c(), l();
156
156
  },
157
157
  {
158
158
  immediate: !0,
@@ -161,28 +161,28 @@ function K(e, n, t = {}) {
161
161
  }
162
162
  );
163
163
  const d = () => {
164
- o.value = !0, l();
164
+ o.value = !0, c();
165
165
  }, v = () => {
166
- o.value = !1, i();
166
+ o.value = !1, l();
167
167
  };
168
- return w(() => l()), {
168
+ return w(() => c()), {
169
169
  stop: d,
170
170
  start: v
171
171
  };
172
172
  }
173
173
  function X(e = window, n = 0, t, r) {
174
- const o = f(0), c = f(0), s = f(0), l = f(0), i = f(!1), d = f(!1), v = f(!1), a = f(!1), m = f(!1), S = f(0), y = f(0);
175
- function T(u) {
176
- i.value = !0;
174
+ const o = f(0), i = f(0), s = f(0), c = f(0), l = f(!1), d = f(!1), v = f(!1), a = f(!1), m = f(!1), E = f(0), y = f(0);
175
+ function N(u) {
176
+ l.value = !0;
177
177
  const p = u.target.documentElement ?? u.target;
178
- o.value = p.scrollLeft, s.value = p.scrollTop, d.value = o.value < S.value, v.value = o.value > S.value, a.value = s.value < y.value, m.value = s.value > y.value, S.value = o.value, y.value = s.value, M(u), t && t(u);
178
+ o.value = p.scrollLeft, s.value = p.scrollTop, d.value = o.value < E.value, v.value = o.value > E.value, a.value = s.value < y.value, m.value = s.value > y.value, E.value = o.value, y.value = s.value, M(u), t && t(u);
179
179
  }
180
- const Y = q(T, n);
181
- function H(u) {
182
- i.value && (i.value = !1, d.value = !1, v.value = !1, a.value = !1, m.value = !1, r && r(u));
180
+ const Y = q(N, n);
181
+ function O(u) {
182
+ l.value && (l.value = !1, d.value = !1, v.value = !1, a.value = !1, m.value = !1, r && r(u));
183
183
  }
184
- const M = I(H, n + 200), F = g(() => {
185
- const u = E(e);
184
+ const M = I(O, n + 200), F = h(() => {
185
+ const u = S(e);
186
186
  return u || null;
187
187
  });
188
188
  L(
@@ -190,8 +190,8 @@ function X(e = window, n = 0, t, r) {
190
190
  (u, p) => {
191
191
  var b;
192
192
  if (p && D(p), u) {
193
- const h = ((b = u == null ? void 0 : u.document) == null ? void 0 : b.documentElement) || (u == null ? void 0 : u.documentElement) || u;
194
- c.value = h.scrollWidth - h.clientWidth, l.value = h.scrollHeight - h.clientHeight, h.addEventListener("scroll", Y), h.addEventListener("scrollend", M);
193
+ const g = ((b = u == null ? void 0 : u.document) == null ? void 0 : b.documentElement) || (u == null ? void 0 : u.documentElement) || u;
194
+ i.value = g.scrollWidth - g.clientWidth, c.value = g.scrollHeight - g.clientHeight, g.addEventListener("scroll", Y), g.addEventListener("scrollend", M);
195
195
  }
196
196
  },
197
197
  {
@@ -204,15 +204,15 @@ function X(e = window, n = 0, t, r) {
204
204
  const p = ((b = u == null ? void 0 : u.document) == null ? void 0 : b.documentElement) || (u == null ? void 0 : u.documentElement) || u;
205
205
  p.removeEventListener("scroll", Y), p.removeEventListener("scrollend", M);
206
206
  }
207
- return w(() => D(F.value)), { x: o, xScrollMax: c, y: s, yScrollMax: l, isScrolling: i, left: d, right: v, top: a, bottom: m };
207
+ return w(() => D(F.value)), { x: o, xScrollMax: i, y: s, yScrollMax: c, isScrolling: l, left: d, right: v, top: a, bottom: m };
208
208
  }
209
209
  function _() {
210
210
  const e = f(0), n = f(0);
211
211
  let t = performance.now();
212
- const r = 10, o = (c) => {
212
+ const r = 10, o = (i) => {
213
213
  if (n.value++, n.value >= r) {
214
- const s = c - t;
215
- e.value = Math.round(1e3 / (s / r)), t = c, n.value = 0;
214
+ const s = i - t;
215
+ e.value = Math.round(1e3 / (s / r)), t = i, n.value = 0;
216
216
  }
217
217
  requestAnimationFrame(o);
218
218
  };
@@ -233,18 +233,18 @@ function Q(e) {
233
233
  function ee(e, n, t = {}) {
234
234
  const r = A(() => window && "ResizeObserver" in window);
235
235
  let o;
236
- const c = f(!1), s = g(() => {
237
- const a = E(e);
238
- return a ? Array.isArray(a) ? a.map((m) => E(m)).filter((m) => m) : [a] : [];
239
- }), l = () => {
236
+ const i = f(!1), s = h(() => {
237
+ const a = S(e);
238
+ return a ? Array.isArray(a) ? a.map((m) => S(m)).filter((m) => m) : [a] : [];
239
+ }), c = () => {
240
240
  o && (o.disconnect(), o = void 0);
241
- }, i = () => {
242
- r.value && s.value.length && !c.value && (o = new ResizeObserver(n), s.value.forEach((a) => o.observe(a, t)));
241
+ }, l = () => {
242
+ r.value && s.value.length && !i.value && (o = new ResizeObserver(n), s.value.forEach((a) => o.observe(a, t)));
243
243
  };
244
244
  L(
245
245
  () => s.value,
246
246
  () => {
247
- l(), i();
247
+ c(), l();
248
248
  },
249
249
  {
250
250
  immediate: !0,
@@ -253,48 +253,51 @@ function ee(e, n, t = {}) {
253
253
  }
254
254
  );
255
255
  const d = () => {
256
- c.value = !0, l();
256
+ i.value = !0, c();
257
257
  }, v = () => {
258
- c.value = !1, i();
258
+ i.value = !1, l();
259
259
  };
260
- return w(() => l()), {
260
+ return w(() => c()), {
261
261
  stop: d,
262
262
  start: v
263
263
  };
264
264
  }
265
265
  function te(e = "default") {
266
- const n = O(), t = (r) => {
266
+ const n = H(), t = (r) => {
267
267
  var s;
268
- const o = (s = n[r]) == null ? void 0 : s.call(n), c = (l) => {
269
- if (l.type === U || Array.isArray(l.children) && !l.children.length)
268
+ const o = (s = n[r]) == null ? void 0 : s.call(n), i = (c) => {
269
+ if (c.type === U || Array.isArray(c.children) && !c.children.length)
270
270
  return !1;
271
- if (l.type !== V)
271
+ if (c.type !== V)
272
272
  return !0;
273
- if (typeof l.children == "string")
274
- return l.children.trim() !== "";
273
+ if (typeof c.children == "string")
274
+ return c.children.trim() !== "";
275
275
  };
276
- return o && (o != null && o.length) ? o.some((i) => c(i)) : !1;
276
+ return o && (o != null && o.length) ? o.some((l) => i(l)) : !1;
277
277
  };
278
278
  if (Array.isArray(e)) {
279
279
  const r = R({});
280
280
  return e.forEach((o) => {
281
- const c = g(() => t(o));
282
- r[o] = c;
281
+ const i = h(() => t(o));
282
+ r[o] = i;
283
283
  }), r;
284
284
  } else
285
- return g(() => t(e));
285
+ return h(() => t(e));
286
286
  }
287
+ const ne = () => (/* @__PURE__ */ new Date()).getTime().toString(36) + "-" + Math.random().toString(36).substring(2, 9), re = (e) => JSON.parse(JSON.stringify(e));
287
288
  export {
288
- Z as add,
289
- $ as cancelRaf,
289
+ $ as add,
290
+ W as cancelRaf,
290
291
  j as dateFormat,
291
292
  I as debounce,
293
+ re as deepClone,
292
294
  C as downloadFile,
293
- P as formatNumber,
294
- W as rafTimeout,
295
+ J as formatNumber,
296
+ ne as getUniId,
297
+ P as rafTimeout,
295
298
  q as throttle,
296
- G as toggleDark,
297
- J as useEventListener,
299
+ Z as toggleDark,
300
+ G as useEventListener,
298
301
  _ as useFps,
299
302
  Q as useMediaQuery,
300
303
  z as useMounted,
package/es/utils/type.js CHANGED
@@ -1,7 +1,7 @@
1
1
  const l = (n) => {
2
2
  const t = n;
3
3
  return t.install = function(e) {
4
- e.component(t.__name, n);
4
+ e.component(t.name, n);
5
5
  }, n;
6
6
  };
7
7
  export {
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=(e,o)=>{const t=e.__vccOpts||e;for(const[r,s]of o)t[r]=s;return t};exports.default=u;
@@ -1 +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;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r={class:"chart-components"},a=e.defineComponent({name:"TdsReportBar",__name:"Bar",props:{data:{}},setup(o){const t=o,n=e.computed(()=>t.data.options);return(c,p)=>{const s=e.resolveComponent("TdsChart");return e.openBlock(),e.createElementBlock("div",r,[e.createVNode(s,{option:n.value},null,8,["option"])])}}});exports.default=a;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bar/index.cjs");exports.TdsReportBar=e.default;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bar/index.cjs"),t=require("./config/index.cjs"),r=require("./line/index.cjs");exports.TdsReportBar=e.default;exports.TdsReportConfig=t.default;exports.TdsReportLine=r.default;
@@ -1,2 +1,4 @@
1
1
  export type { Props as TdsReportBarProps } from './bar';
2
2
  export { default as TdsReportBar } from './bar';
3
+ export { default as TdsReportConfig } from './config';
4
+ export { default as TdsReportLine } from './line';
@@ -0,0 +1 @@
1
+ [data-v-9d35239c] .el-color-picker{width:95%}[data-v-9d35239c] .el-color-picker .el-color-picker__trigger{width:100%;top:1px}[data-v-9d35239c] .el-input-number{width:95%}.sub-title[data-v-9d35239c]{color:#555;font-size:12px;padding-left:5px;height:20px;line-height:20px;margin-bottom:10px}.switch-label[data-v-9d35239c]{color:#555;font-size:14px;margin-right:10px;margin-bottom:10px}[data-v-9d35239c] .el-collapse-item__header{background-color:#fafafa;padding-left:15px;height:42px;border-bottom:1px solid #ebeef5}[data-v-9d35239c] .el-collapse-item__content{padding-top:10px;padding-bottom:10px;padding-left:10px}[data-v-9d35239c] .el-collapse-item__content .el-descriptions__cell{padding:1px 0 0 15px}.el-collapse[data-v-9d35239c]{border-right:1px solid var(--el-border-color-lighter);border-left:1px solid var(--el-border-color-lighter)}
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Config.vue2.cjs");;/* empty css */const t=require("../_virtual/_plugin-vue_export-helper.cjs"),u=t.default(e.default,[["__scopeId","data-v-9d35239c"]]);exports.default=u;