hfn-components 0.2.6 → 0.2.7

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 (77) hide show
  1. package/component.ts +13 -0
  2. package/defaults.ts +5 -0
  3. package/index.ts +6 -0
  4. package/make-installer.ts +17 -0
  5. package/package.json +1 -1
  6. package/plugin.ts +1 -0
  7. package/dist/index.css +0 -1
  8. package/es/_virtual/_plugin-vue_export-helper.mjs +0 -9
  9. package/es/component.d.ts +0 -3
  10. package/es/component.mjs +0 -10
  11. package/es/components/chart/index.d.ts +0 -171
  12. package/es/components/chart/index.mjs +0 -7
  13. package/es/components/chart/src/HtChart.d.ts +0 -65
  14. package/es/components/chart/src/HtChart.mjs +0 -77
  15. package/es/components/chart/src/HtChart.vue.d.ts +0 -177
  16. package/es/components/chart/src/HtChart.vue.mjs +0 -91
  17. package/es/components/chart/src/HtChart.vue2.mjs +0 -109
  18. package/es/components/chart/src/chartConfig.d.ts +0 -7
  19. package/es/components/chart/src/chartConfig.mjs +0 -88
  20. package/es/components/chart/style/index.d.ts +0 -1
  21. package/es/components/chart/style/index.mjs +0 -1
  22. package/es/components/elTable/index.d.ts +0 -770
  23. package/es/components/elTable/index.mjs +0 -7
  24. package/es/components/elTable/src/columnDeal.vue.d.ts +0 -38
  25. package/es/components/elTable/src/columnDeal.vue.mjs +0 -35
  26. package/es/components/elTable/src/columnDeal.vue2.mjs +0 -19
  27. package/es/components/elTable/src/elTable.d.ts +0 -38
  28. package/es/components/elTable/src/elTable.mjs +0 -30
  29. package/es/components/elTable/src/elTable.vue.d.ts +0 -769
  30. package/es/components/elTable/src/elTable.vue.mjs +0 -56
  31. package/es/components/elTable/src/elTable.vue2.mjs +0 -29
  32. package/es/components/htTarget/index.d.ts +0 -748
  33. package/es/components/htTarget/index.mjs +0 -6
  34. package/es/components/htTarget/src/htTarget.vue.d.ts +0 -747
  35. package/es/components/htTarget/src/htTarget.vue.mjs +0 -27
  36. package/es/components/htTarget/src/htTarget.vue2.mjs +0 -31
  37. package/es/components/index.d.ts +0 -3
  38. package/es/components/index.mjs +0 -5
  39. package/es/components/table/HtTable.d.ts +0 -142
  40. package/es/components/table/HtTable.mjs +0 -136
  41. package/es/components/table/HtTable.vue.d.ts +0 -1847
  42. package/es/components/table/HtTable.vue.mjs +0 -449
  43. package/es/components/table/HtTable.vue2.mjs +0 -124
  44. package/es/components/table/index.d.ts +0 -1845
  45. package/es/components/table/index.mjs +0 -7
  46. package/es/constants/index.d.ts +0 -3
  47. package/es/constants/index.mjs +0 -3
  48. package/es/constants/key.d.ts +0 -1
  49. package/es/constants/key.mjs +0 -3
  50. package/es/constants/table.d.ts +0 -117
  51. package/es/constants/table.mjs +0 -140
  52. package/es/constants/target.d.ts +0 -4
  53. package/es/constants/target.mjs +0 -16
  54. package/es/css/index.css +0 -59
  55. package/es/defaults.d.ts +0 -4
  56. package/es/defaults.mjs +0 -7
  57. package/es/index.d.ts +0 -5
  58. package/es/index.mjs +0 -11
  59. package/es/make-installer.d.ts +0 -4
  60. package/es/make-installer.mjs +0 -14
  61. package/es/plugin.d.ts +0 -2
  62. package/es/plugin.mjs +0 -3
  63. package/es/utils/chart.d.ts +0 -7
  64. package/es/utils/chart.mjs +0 -172
  65. package/es/utils/common.d.ts +0 -3
  66. package/es/utils/common.mjs +0 -15
  67. package/es/utils/index.d.ts +0 -4
  68. package/es/utils/index.mjs +0 -4
  69. package/es/utils/table.d.ts +0 -2
  70. package/es/utils/table.mjs +0 -31
  71. package/es/utils/tool.d.ts +0 -2
  72. package/es/utils/tool.mjs +0 -42
  73. package/global.d.ts +0 -14
  74. package/theme-chalk/ht-chart.css +0 -1
  75. package/theme-chalk/index.css +0 -1
  76. package/theme-chalk/src/chart.scss +0 -53
  77. package/theme-chalk/src/index.scss +0 -1
@@ -1,109 +0,0 @@
1
- import { defineComponent, shallowRef, ref, reactive, watch } from 'vue';
2
- import { BASIC_CHART_CONFIG } from './chartConfig.mjs';
3
- import { chartProps } from './HtChart.mjs';
4
- import cloneDeep from 'lodash.clonedeep';
5
- import { setEchartXAxis, setEchartYAxis, setEchartTooltip, legendEnterOperate, legendLeaveOperate } from '../../../utils/chart.mjs';
6
- import * as echarts from 'echarts/core';
7
-
8
- var _sfc_main = /* @__PURE__ */ defineComponent({
9
- __name: "HtChart",
10
- props: chartProps,
11
- setup(__props, { expose: __expose }) {
12
- __expose();
13
- const props = __props;
14
- const myChart = shallowRef();
15
- const isEmpty = ref(false);
16
- const echartOptions = reactive(cloneDeep(BASIC_CHART_CONFIG));
17
- watch(
18
- () => props.chartData,
19
- (val) => {
20
- echartOptions.series = cloneDeep(val);
21
- drawGraph();
22
- },
23
- {
24
- deep: true
25
- }
26
- );
27
- watch(
28
- () => props.watchResize,
29
- () => {
30
- chartResize();
31
- }
32
- );
33
- watch(
34
- () => props.lineColor,
35
- (val) => {
36
- if (val && val.length > 0) {
37
- echartOptions.color = props.lineColor;
38
- console.log(props.lineColor);
39
- if (myChart.value) {
40
- echartInit();
41
- }
42
- }
43
- },
44
- { deep: true, immediate: true }
45
- );
46
- const drawGraph = () => {
47
- if (props.lineColor && props.lineColor.length > 0) {
48
- echartOptions.color = props.lineColor;
49
- }
50
- setEchartXAxis(echartOptions, props.chartType, props.xAxisData);
51
- setEchartYAxis(echartOptions, props);
52
- setEchartTooltip(echartOptions, props);
53
- lengedDeal();
54
- echartInit();
55
- };
56
- const lengedDeal = () => {
57
- allLegend.value = [];
58
- props.chartData.forEach((item, index) => {
59
- const data = {
60
- name: item.name,
61
- isShow: true,
62
- lineType: item.type,
63
- color: echartOptions.color[index % echartOptions.color.length]
64
- };
65
- allLegend.value.push(data);
66
- });
67
- };
68
- const echartInit = () => {
69
- setTimeout(() => {
70
- if (!myChart.value) {
71
- const ele = document.getElementById(props.chartId);
72
- myChart.value = echarts.init(ele, null, { devicePixelRatio: 2, locale: "ZH" });
73
- }
74
- myChart.value.setOption(echartOptions, true);
75
- }, 200);
76
- };
77
- const chartResize = () => {
78
- myChart.value.resize();
79
- };
80
- const allLegend = ref([]);
81
- const noData = ref(false);
82
- const legendStatus = (item, index) => {
83
- const status = !item.isShow;
84
- allLegend.value[index].isShow = status;
85
- if (allLegend.value.every((item2) => item2.isShow === false)) {
86
- noData.value = true;
87
- } else {
88
- noData.value = false;
89
- }
90
- myChart.value.dispatchAction({
91
- type: "legendToggleSelect",
92
- name: item.name
93
- });
94
- };
95
- const legendEnter = (index) => {
96
- legendEnterOperate(echartOptions, allLegend.value[index].name);
97
- myChart.value.setOption(echartOptions);
98
- };
99
- const legendLeave = () => {
100
- legendLeaveOperate(echartOptions);
101
- myChart.value.setOption(echartOptions);
102
- };
103
- const __returned__ = { props, myChart, isEmpty, echartOptions, drawGraph, lengedDeal, echartInit, chartResize, allLegend, noData, legendStatus, legendEnter, legendLeave };
104
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
105
- return __returned__;
106
- }
107
- });
108
-
109
- export { _sfc_main as default };
@@ -1,7 +0,0 @@
1
- import * as echarts from 'echarts/core';
2
- import type { BarSeriesOption, LineSeriesOption } from 'echarts/charts';
3
- import type { TitleComponentOption, TooltipComponentOption, GridComponentOption, DatasetComponentOption } from 'echarts/components';
4
- import type { ComposeOption } from 'echarts/core';
5
- export type ECOption = ComposeOption<BarSeriesOption | LineSeriesOption | TitleComponentOption | TooltipComponentOption | GridComponentOption | DatasetComponentOption>;
6
- export default echarts;
7
- export declare const BASIC_CHART_CONFIG: any;
@@ -1,88 +0,0 @@
1
- import * as echarts from 'echarts/core';
2
- export { echarts as default };
3
- import { BarChart, LineChart } from 'echarts/charts';
4
- import { TitleComponent, TooltipComponent, GridComponent, LegendComponent, DatasetComponent, TransformComponent } from 'echarts/components';
5
- import { LabelLayout, UniversalTransition } from 'echarts/features';
6
- import { CanvasRenderer } from 'echarts/renderers';
7
-
8
- echarts.use([
9
- TitleComponent,
10
- TooltipComponent,
11
- GridComponent,
12
- LegendComponent,
13
- DatasetComponent,
14
- TransformComponent,
15
- BarChart,
16
- LineChart,
17
- LabelLayout,
18
- UniversalTransition,
19
- CanvasRenderer
20
- ]);
21
- const BASIC_CHART_CONFIG = {
22
- title: {
23
- text: "",
24
- // top: '5%',
25
- left: "0%",
26
- textStyle: {
27
- fontSize: 12,
28
- color: "rgba(0,0,0,0.7)",
29
- fontWeight: "normal"
30
- }
31
- },
32
- // 图例
33
- legend: {
34
- left: "0%",
35
- show: false
36
- },
37
- xAxis: {},
38
- yAxis: {},
39
- grid: {
40
- // top: '12%',
41
- top: "8%",
42
- left: "3%",
43
- right: "3%",
44
- bottom: "1%",
45
- containLabel: true
46
- },
47
- // 线条颜色
48
- color: [
49
- "#C13431",
50
- "#1E85D2",
51
- "#FD984F",
52
- "#63B9BB",
53
- "#BBB162",
54
- "#AE76C1",
55
- "#5E92F6",
56
- "#F5BC32",
57
- "#DA8484",
58
- "#41982E",
59
- "#437095",
60
- "#8060A7",
61
- "#7D0A0D",
62
- "#572AFF",
63
- "#2BE8F8",
64
- "#FF1493",
65
- "#E066FF",
66
- "#27408B",
67
- "#5191A3",
68
- "#D5634C",
69
- "#92d6fd",
70
- "#b92e2d",
71
- "#187bc9",
72
- "#90bae0",
73
- "#187bc9",
74
- "#0070C9",
75
- "#5470c6",
76
- "#91cc75",
77
- "#fac858",
78
- "#ee6666",
79
- "#73c0de",
80
- "#3ba272",
81
- "#fc8452",
82
- "#9a60b4",
83
- "#ea7ccc"
84
- ],
85
- series: []
86
- };
87
-
88
- export { BASIC_CHART_CONFIG };
@@ -1 +0,0 @@
1
- import 'hfn-components/theme-chalk/src/chart.scss';
@@ -1 +0,0 @@
1
- import 'hfn-components/theme-chalk/src/chart.scss';