aldehyde 0.2.493 → 0.2.495

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 (138) hide show
  1. package/lib/controls/icon-selector/icon/phonenode-menu-icon/iconfont.css +63 -63
  2. package/lib/draw-canvas-edit/components/asset-bar/index.less +35 -35
  3. package/lib/draw-canvas-edit/components/main-header/index.less +23 -23
  4. package/lib/layout2/page.d.ts +2 -1
  5. package/lib/layout2/page.d.ts.map +1 -1
  6. package/lib/layout2/page.js +19 -8
  7. package/lib/layout2/page.js.map +1 -1
  8. package/lib/layout2/type/layout-type.d.ts +1 -0
  9. package/lib/layout2/type/layout-type.d.ts.map +1 -1
  10. package/lib/lowcode-components/base-table/index.less +61 -61
  11. package/lib/lowcode-components/base-text/index.less +19 -19
  12. package/lib/lowcode-components/column-chart/index.js +2 -2
  13. package/lib/lowcode-components/column-chart/index.js.map +1 -1
  14. package/lib/lowcode-components/data-number/index.less +10 -10
  15. package/lib/lowcode-components/date-time/index.less +4 -4
  16. package/lib/lowcode-components/four-angle-glow-border/index.less +49 -49
  17. package/lib/lowcode-components/line-bar-chart/index.d.ts.map +1 -1
  18. package/lib/lowcode-components/line-bar-chart/index.js +6 -2
  19. package/lib/lowcode-components/line-bar-chart/index.js.map +1 -1
  20. package/lib/lowcode-components/line-chart/index.d.ts.map +1 -1
  21. package/lib/lowcode-components/line-chart/index.js +6 -2
  22. package/lib/lowcode-components/line-chart/index.js.map +1 -1
  23. package/lib/lowcode-components/lowcode-view/component/font/FontGlobal.css +26 -26
  24. package/lib/lowcode-components/lowcode-view/component/screen-fit/index.less +13 -13
  25. package/lib/lowcode-components/text-scroller/index.less +28 -28
  26. package/lib/module/ltmpl-table.d.ts +7 -0
  27. package/lib/module/ltmpl-table.d.ts.map +1 -1
  28. package/lib/module/ltmpl-table.js +12 -16
  29. package/lib/module/ltmpl-table.js.map +1 -1
  30. package/lib/routable/dtmpl-route.d.ts.map +1 -1
  31. package/lib/routable/dtmpl-route.js +8 -2
  32. package/lib/routable/dtmpl-route.js.map +1 -1
  33. package/lib/routable/import-route.d.ts.map +1 -1
  34. package/lib/routable/import-route.js +9 -1
  35. package/lib/routable/import-route.js.map +1 -1
  36. package/lib/routable/ltmpl-route.d.ts.map +1 -1
  37. package/lib/routable/ltmpl-route.js +13 -6
  38. package/lib/routable/ltmpl-route.js.map +1 -1
  39. package/lib/routable/splitview-ltmpl-route.d.ts.map +1 -1
  40. package/lib/routable/splitview-ltmpl-route.js +11 -10
  41. package/lib/routable/splitview-ltmpl-route.js.map +1 -1
  42. package/lib/routable/ttmpl-route.d.ts.map +1 -1
  43. package/lib/routable/ttmpl-route.js +9 -2
  44. package/lib/routable/ttmpl-route.js.map +1 -1
  45. package/lib/table/act-table.d.ts +1 -0
  46. package/lib/table/act-table.d.ts.map +1 -1
  47. package/lib/table/act-table.js +31 -9
  48. package/lib/table/act-table.js.map +1 -1
  49. package/lib/table/page-chart.js +1 -1
  50. package/lib/table/page-chart.js.map +1 -1
  51. package/lib/table/row-table.d.ts +6 -0
  52. package/lib/table/row-table.d.ts.map +1 -1
  53. package/lib/table/row-table.js +21 -6
  54. package/lib/table/row-table.js.map +1 -1
  55. package/lib/tmpl/interface.d.ts +1 -0
  56. package/lib/tmpl/interface.d.ts.map +1 -1
  57. package/lib/tree/act-tree.d.ts +1 -0
  58. package/lib/tree/act-tree.d.ts.map +1 -1
  59. package/lib/tree/act-tree.js +6 -7
  60. package/lib/tree/act-tree.js.map +1 -1
  61. package/lib/tree/tree-utils.d.ts +1 -1
  62. package/lib/tree/tree-utils.d.ts.map +1 -1
  63. package/lib/tree/tree-utils.js +4 -4
  64. package/lib/tree/tree-utils.js.map +1 -1
  65. package/lib/units/index.d.ts +4 -0
  66. package/lib/units/index.d.ts.map +1 -1
  67. package/lib/units/index.js +10 -3
  68. package/lib/units/index.js.map +1 -1
  69. package/package.json +1 -1
  70. package/src/aldehyde/controls/icon-selector/icon/phonenode-menu-icon/iconfont.css +63 -63
  71. package/src/aldehyde/controls/icon-selector/icon/phonenode-menu-icon/iconfont.json +93 -93
  72. package/src/aldehyde/draw-canvas-edit/components/asset-bar/index.less +35 -35
  73. package/src/aldehyde/draw-canvas-edit/components/asset-bar/index.tsx +110 -110
  74. package/src/aldehyde/draw-canvas-edit/components/main-header/index.less +23 -23
  75. package/src/aldehyde/draw-canvas-edit/components/main-header/index.tsx +263 -263
  76. package/src/aldehyde/draw-canvas-edit/components/render/draws/index.ts +7 -7
  77. package/src/aldehyde/draw-canvas-edit/components/render/graphs/base-graph.ts +241 -241
  78. package/src/aldehyde/draw-canvas-edit/components/render/graphs/circle.ts +699 -699
  79. package/src/aldehyde/draw-canvas-edit/components/render/graphs/curve.ts +500 -500
  80. package/src/aldehyde/draw-canvas-edit/components/render/graphs/index.ts +5 -5
  81. package/src/aldehyde/draw-canvas-edit/components/render/graphs/line.ts +493 -493
  82. package/src/aldehyde/draw-canvas-edit/components/render/graphs/rect.ts +680 -680
  83. package/src/aldehyde/draw-canvas-edit/components/render/handlers/drag-handlers.ts +68 -68
  84. package/src/aldehyde/draw-canvas-edit/components/render/handlers/graph-handlers.ts +113 -113
  85. package/src/aldehyde/draw-canvas-edit/components/render/handlers/index.ts +9 -9
  86. package/src/aldehyde/draw-canvas-edit/components/render/handlers/key-move-handlers.ts +49 -49
  87. package/src/aldehyde/draw-canvas-edit/components/render/handlers/link-handlers.ts +45 -45
  88. package/src/aldehyde/draw-canvas-edit/components/render/handlers/shutcut-handlers.ts +45 -45
  89. package/src/aldehyde/draw-canvas-edit/components/render/handlers/text-handlers.ts +81 -81
  90. package/src/aldehyde/draw-canvas-edit/components/render/handlers/zoom-handlers.ts +59 -59
  91. package/src/aldehyde/draw-canvas-edit/components/render/tools/align-tool.ts +89 -89
  92. package/src/aldehyde/draw-canvas-edit/components/render/tools/asset-tool.ts +154 -154
  93. package/src/aldehyde/draw-canvas-edit/components/render/tools/link-tool.ts +222 -222
  94. package/src/aldehyde/draw-canvas-edit/components/render/tools/z-index-tool.ts +224 -224
  95. package/src/aldehyde/draw-canvas-edit/components/render/utils/a-star.ts +116 -116
  96. package/src/aldehyde/draw-canvas-edit/components/render/utils/bezier-scene-func.ts +72 -72
  97. package/src/aldehyde/draw-canvas-edit/components/setting-form/imag-upload.tsx +119 -119
  98. package/src/aldehyde/layout2/page.tsx +17 -9
  99. package/src/aldehyde/layout2/type/layout-type.ts +1 -0
  100. package/src/aldehyde/layout4/imgs/user.svg +26 -26
  101. package/src/aldehyde/lowcode-components/base-color-block/index.tsx +31 -31
  102. package/src/aldehyde/lowcode-components/base-table/index.less +61 -61
  103. package/src/aldehyde/lowcode-components/base-text/index.less +19 -19
  104. package/src/aldehyde/lowcode-components/column-chart/index.tsx +2 -2
  105. package/src/aldehyde/lowcode-components/data-number/index.less +10 -10
  106. package/src/aldehyde/lowcode-components/date-time/index.less +4 -4
  107. package/src/aldehyde/lowcode-components/date-time/index.tsx +64 -64
  108. package/src/aldehyde/lowcode-components/four-angle-glow-border/index.less +49 -49
  109. package/src/aldehyde/lowcode-components/four-angle-glow-border/index.tsx +53 -53
  110. package/src/aldehyde/lowcode-components/line-bar-chart/index.tsx +5 -2
  111. package/src/aldehyde/lowcode-components/line-chart/index.tsx +5 -2
  112. package/src/aldehyde/lowcode-components/lowcode-view/component/abstract-controller.ts +64 -64
  113. package/src/aldehyde/lowcode-components/lowcode-view/component/abstract-definition.ts +77 -77
  114. package/src/aldehyde/lowcode-components/lowcode-view/component/abstract-designer-loader.ts +36 -36
  115. package/src/aldehyde/lowcode-components/lowcode-view/component/component-container.tsx +91 -91
  116. package/src/aldehyde/lowcode-components/lowcode-view/component/font/FontGlobal.css +26 -26
  117. package/src/aldehyde/lowcode-components/lowcode-view/component/group-layer/controller.ts +36 -36
  118. package/src/aldehyde/lowcode-components/lowcode-view/component/group-layer/definition.ts +53 -53
  119. package/src/aldehyde/lowcode-components/lowcode-view/component/group-layer/index.tsx +15 -15
  120. package/src/aldehyde/lowcode-components/lowcode-view/component/layer-builder.tsx +98 -98
  121. package/src/aldehyde/lowcode-components/lowcode-view/component/screen-fit/index.less +13 -13
  122. package/src/aldehyde/lowcode-components/lowcode-view/component/screen-fit/index.tsx +121 -121
  123. package/src/aldehyde/lowcode-components/placeholder-component/index.tsx +81 -81
  124. package/src/aldehyde/lowcode-components/text-scroller/index.less +28 -28
  125. package/src/aldehyde/lowcode-components/text-scroller/index.tsx +173 -173
  126. package/src/aldehyde/module/ltmpl-table.tsx +14 -15
  127. package/src/aldehyde/routable/dtmpl-route.tsx +14 -8
  128. package/src/aldehyde/routable/import-route.tsx +12 -5
  129. package/src/aldehyde/routable/ltmpl-route.tsx +14 -9
  130. package/src/aldehyde/routable/splitview-ltmpl-route.tsx +11 -8
  131. package/src/aldehyde/routable/ttmpl-route.tsx +13 -8
  132. package/src/aldehyde/table/act-table.tsx +28 -9
  133. package/src/aldehyde/table/page-chart.tsx +1 -1
  134. package/src/aldehyde/table/row-table.tsx +29 -6
  135. package/src/aldehyde/tmpl/interface.tsx +1 -0
  136. package/src/aldehyde/tree/act-tree.tsx +8 -6
  137. package/src/aldehyde/tree/tree-utils.tsx +4 -4
  138. package/src/aldehyde/units/index.tsx +11 -3
@@ -1,62 +1,62 @@
1
- .base-table {
2
- width: 100%;
3
- height: 100%;
4
- overflow: hidden;
5
-
6
- .base-table-empty {
7
- width: 100%;
8
- height: 100%;
9
- display: flex;
10
- justify-content: center;
11
- align-items: center;
12
- }
13
-
14
- table {
15
- width: 100%;
16
- text-align: center;
17
- table-layout: fixed;
18
- /* 关键:合并相邻边框,消除双线 */
19
- border-collapse: collapse;
20
- margin-top: -2px;
21
-
22
- thead {
23
- position: relative;
24
- z-index: 1;
25
-
26
- th {
27
- padding: 0 4px;
28
- }
29
- }
30
-
31
-
32
- .scroll-body {
33
- overflow: hidden;
34
- animation: scroll 10s linear infinite;
35
-
36
- td {
37
- padding: 0 4px;
38
- overflow: hidden;
39
- white-space: nowrap;
40
- text-overflow: ellipsis;
41
- }
42
- }
43
- }
44
-
45
- table:hover {
46
- .scroll-body {
47
- animation-play-state: paused !important;
48
- }
49
- }
50
-
51
- }
52
-
53
-
54
- @keyframes scroll {
55
- 0% {
56
- transform: translateY(0);
57
- }
58
-
59
- 100% {
60
- transform: translateY(-100%);
61
- }
1
+ .base-table {
2
+ width: 100%;
3
+ height: 100%;
4
+ overflow: hidden;
5
+
6
+ .base-table-empty {
7
+ width: 100%;
8
+ height: 100%;
9
+ display: flex;
10
+ justify-content: center;
11
+ align-items: center;
12
+ }
13
+
14
+ table {
15
+ width: 100%;
16
+ text-align: center;
17
+ table-layout: fixed;
18
+ /* 关键:合并相邻边框,消除双线 */
19
+ border-collapse: collapse;
20
+ margin-top: -2px;
21
+
22
+ thead {
23
+ position: relative;
24
+ z-index: 1;
25
+
26
+ th {
27
+ padding: 0 4px;
28
+ }
29
+ }
30
+
31
+
32
+ .scroll-body {
33
+ overflow: hidden;
34
+ animation: scroll 10s linear infinite;
35
+
36
+ td {
37
+ padding: 0 4px;
38
+ overflow: hidden;
39
+ white-space: nowrap;
40
+ text-overflow: ellipsis;
41
+ }
42
+ }
43
+ }
44
+
45
+ table:hover {
46
+ .scroll-body {
47
+ animation-play-state: paused !important;
48
+ }
49
+ }
50
+
51
+ }
52
+
53
+
54
+ @keyframes scroll {
55
+ 0% {
56
+ transform: translateY(0);
57
+ }
58
+
59
+ 100% {
60
+ transform: translateY(-100%);
61
+ }
62
62
  }
@@ -1,20 +1,20 @@
1
-
2
- .base-text-component {
3
- --stroke-color: #000000;
4
- --stroke-width: 0;
5
-
6
- height: 100%;
7
- display: flex;
8
- -webkit-text-stroke-color: var(--stroke-color);
9
- -webkit-text-stroke-width: var(--stroke-width);
10
- stroke-color: var(--stroke-color);
11
- stroke-width: var(--stroke-width);
12
-
13
- input {
14
- outline: none;
15
- width: 100%;
16
- background-color: rgba(255, 222, 173, 0);
17
- text-align: center;
18
- border: none;
19
- }
1
+
2
+ .base-text-component {
3
+ --stroke-color: #000000;
4
+ --stroke-width: 0;
5
+
6
+ height: 100%;
7
+ display: flex;
8
+ -webkit-text-stroke-color: var(--stroke-color);
9
+ -webkit-text-stroke-width: var(--stroke-width);
10
+ stroke-color: var(--stroke-color);
11
+ stroke-width: var(--stroke-width);
12
+
13
+ input {
14
+ outline: none;
15
+ width: 100%;
16
+ background-color: rgba(255, 222, 173, 0);
17
+ text-align: center;
18
+ border: none;
19
+ }
20
20
  }
@@ -89,7 +89,7 @@ const handleData = (data: { config: { [key: string]: string }, value: { [key: st
89
89
  vLength: vNames.length,
90
90
  isMarkLine: true,
91
91
  name: config[r],
92
- data: value.map((v) => [v["d1"], v[r]]),
92
+ data: value.map((v) => [v["d1"], (v[r])?.split("@R@")[1] || v[r]]),
93
93
  }))
94
94
  ]
95
95
  } : {
@@ -268,7 +268,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
268
268
  const temData = isDesignMode && !data?.length ? defDatas[componentType] || [] : data;
269
269
  option.barMaxWidth = barMaxWidth;
270
270
  option.grid = grid;
271
- option.legend = { ...legend, ...legends[legend?.position] };
271
+ option.legend = { ...legend, ...legends[legend?.position], data: temData?.filter((item: any) => !item.isMarkLine).map((r: any) => r.name) };
272
272
  option.tooltip = { trigger: "axis", ...tooltip };
273
273
  option.xAxis = { ...option.xAxis, ...xAxis, axisTick: { show: xAxis?.axisLine?.show } };
274
274
  option.yAxis = { ...option.yAxis, ...yAxis };
@@ -1,11 +1,11 @@
1
- .data-number-component {
2
- --stroke-color: #000000;
3
- --stroke-width: 0;
4
-
5
- height: 100%;
6
- display: flex;
7
- -webkit-text-stroke-color: var(--stroke-color);
8
- -webkit-text-stroke-width: var(--stroke-width);
9
- stroke-color: var(--stroke-color);
10
- stroke-width: var(--stroke-width);
1
+ .data-number-component {
2
+ --stroke-color: #000000;
3
+ --stroke-width: 0;
4
+
5
+ height: 100%;
6
+ display: flex;
7
+ -webkit-text-stroke-color: var(--stroke-color);
8
+ -webkit-text-stroke-width: var(--stroke-width);
9
+ stroke-color: var(--stroke-color);
10
+ stroke-width: var(--stroke-width);
11
11
  }
@@ -1,5 +1,5 @@
1
- .date-time-component {
2
- width: 100%;
3
- height: 100%;
4
- display: flex;
1
+ .date-time-component {
2
+ width: 100%;
3
+ height: 100%;
4
+ display: flex;
5
5
  }
@@ -1,65 +1,65 @@
1
- import React, { ForwardedRef, forwardRef, useEffect, useImperativeHandle, useRef, useState } from 'react';
2
- import dayjs from "dayjs";
3
- import './index.less';
4
-
5
- export interface DateTimeComponentStyle {
6
- fontSize?: number;
7
- color?: string;
8
- fontFamily?: string;
9
- fontWeight?: number;
10
- alignItems?: string;
11
- justifyContent?: string;
12
- letterSpacing?: string;
13
- formatType?: string;
14
- }
15
-
16
- export interface DateTimeComponentProps {
17
- style?: DateTimeComponentStyle;
18
- }
19
-
20
- export interface DateTimeComponentRef {
21
- updateConfig: (newConfig: DateTimeComponentProps) => void;
22
- setEventHandler: (eventMap: Record<string, Function>) => void;
23
- destroy: () => void;
24
- }
25
-
26
- const defFormatType = "YYYY年MM月DD日 HH时mm分ss秒";
27
-
28
- const DateTimeComponent = forwardRef((props: DateTimeComponentProps, ref: ForwardedRef<DateTimeComponentRef>) => {
29
- const [config, setConfig] = useState<DateTimeComponentProps>({ ...props });
30
- const [datetime, setDateTime] = useState<string>(dayjs().format(config.style?.formatType || defFormatType));
31
- const timeRef = useRef<NodeJS.Timeout | null>(null);
32
- const eventHandlerMap = useRef<Record<string, Function>>({});
33
-
34
- const handleClearInterval = () => {
35
- timeRef.current && clearInterval(timeRef.current);
36
- timeRef.current = null;
37
- }
38
-
39
- useEffect(() => {
40
- timeRef.current = setInterval(() => {
41
- setDateTime(dayjs().format(config.style?.formatType || defFormatType));
42
- }, 1000);
43
- return () => {
44
- handleClearInterval();
45
- }
46
- }, []);
47
-
48
-
49
- useImperativeHandle(ref, () => ({
50
- updateConfig: (newConfig) => setConfig({ ...newConfig }),
51
- setEventHandler: (eventMap) => eventHandlerMap.current = eventMap,
52
- destroy: () => {
53
- handleClearInterval();
54
- }
55
- }));
56
-
57
-
58
- return (
59
- <div className="date-time-component" style={{ ...(config?.style || {}) }}>
60
- {datetime}
61
- </div>
62
- );
63
- });
64
-
1
+ import React, { ForwardedRef, forwardRef, useEffect, useImperativeHandle, useRef, useState } from 'react';
2
+ import dayjs from "dayjs";
3
+ import './index.less';
4
+
5
+ export interface DateTimeComponentStyle {
6
+ fontSize?: number;
7
+ color?: string;
8
+ fontFamily?: string;
9
+ fontWeight?: number;
10
+ alignItems?: string;
11
+ justifyContent?: string;
12
+ letterSpacing?: string;
13
+ formatType?: string;
14
+ }
15
+
16
+ export interface DateTimeComponentProps {
17
+ style?: DateTimeComponentStyle;
18
+ }
19
+
20
+ export interface DateTimeComponentRef {
21
+ updateConfig: (newConfig: DateTimeComponentProps) => void;
22
+ setEventHandler: (eventMap: Record<string, Function>) => void;
23
+ destroy: () => void;
24
+ }
25
+
26
+ const defFormatType = "YYYY年MM月DD日 HH时mm分ss秒";
27
+
28
+ const DateTimeComponent = forwardRef((props: DateTimeComponentProps, ref: ForwardedRef<DateTimeComponentRef>) => {
29
+ const [config, setConfig] = useState<DateTimeComponentProps>({ ...props });
30
+ const [datetime, setDateTime] = useState<string>(dayjs().format(config.style?.formatType || defFormatType));
31
+ const timeRef = useRef<NodeJS.Timeout | null>(null);
32
+ const eventHandlerMap = useRef<Record<string, Function>>({});
33
+
34
+ const handleClearInterval = () => {
35
+ timeRef.current && clearInterval(timeRef.current);
36
+ timeRef.current = null;
37
+ }
38
+
39
+ useEffect(() => {
40
+ timeRef.current = setInterval(() => {
41
+ setDateTime(dayjs().format(config.style?.formatType || defFormatType));
42
+ }, 1000);
43
+ return () => {
44
+ handleClearInterval();
45
+ }
46
+ }, []);
47
+
48
+
49
+ useImperativeHandle(ref, () => ({
50
+ updateConfig: (newConfig) => setConfig({ ...newConfig }),
51
+ setEventHandler: (eventMap) => eventHandlerMap.current = eventMap,
52
+ destroy: () => {
53
+ handleClearInterval();
54
+ }
55
+ }));
56
+
57
+
58
+ return (
59
+ <div className="date-time-component" style={{ ...(config?.style || {}) }}>
60
+ {datetime}
61
+ </div>
62
+ );
63
+ });
64
+
65
65
  export default DateTimeComponent;
@@ -1,50 +1,50 @@
1
- .four-angle-glow {
2
- --fagb-color: #00ebff;
3
- --fagb-width: 2px;
4
- --fagb-length: 8px;
5
- --fagb-radius: 3px;
6
- width: 100%;
7
- height: 100%;
8
- position: relative;
9
-
10
- .angle {
11
- position: absolute;
12
- border: var(--fagb-width) solid var(--fagb-color);
13
- width: var(--fagb-length);
14
- height: var(--fagb-length);
15
- }
16
-
17
- .angle-tl {
18
- margin: -1px 0 0 -1px;
19
- border-right: 0;
20
- border-bottom: 0;
21
- border-top-left-radius: var(--fagb-radius);
22
- }
23
-
24
- .angle-tr {
25
- top: 0;
26
- right: 0;
27
- border-left: 0;
28
- border-bottom: 0;
29
- margin: -1px -1px 0 0;
30
- border-top-right-radius: var(--fagb-radius);
31
- }
32
-
33
- .angle-bl {
34
- bottom: 0;
35
- left: 0;
36
- border-top: 0;
37
- border-right: 0;
38
- margin: 0 0 -1px -1px;
39
- border-bottom-left-radius: var(--fagb-radius);
40
- }
41
-
42
- .angle-br {
43
- bottom: 0;
44
- right: 0;
45
- border-left: 0;
46
- border-top: 0;
47
- margin: 0 -1px -1px 0;
48
- border-bottom-right-radius: var(--fagb-radius);
49
- }
1
+ .four-angle-glow {
2
+ --fagb-color: #00ebff;
3
+ --fagb-width: 2px;
4
+ --fagb-length: 8px;
5
+ --fagb-radius: 3px;
6
+ width: 100%;
7
+ height: 100%;
8
+ position: relative;
9
+
10
+ .angle {
11
+ position: absolute;
12
+ border: var(--fagb-width) solid var(--fagb-color);
13
+ width: var(--fagb-length);
14
+ height: var(--fagb-length);
15
+ }
16
+
17
+ .angle-tl {
18
+ margin: -1px 0 0 -1px;
19
+ border-right: 0;
20
+ border-bottom: 0;
21
+ border-top-left-radius: var(--fagb-radius);
22
+ }
23
+
24
+ .angle-tr {
25
+ top: 0;
26
+ right: 0;
27
+ border-left: 0;
28
+ border-bottom: 0;
29
+ margin: -1px -1px 0 0;
30
+ border-top-right-radius: var(--fagb-radius);
31
+ }
32
+
33
+ .angle-bl {
34
+ bottom: 0;
35
+ left: 0;
36
+ border-top: 0;
37
+ border-right: 0;
38
+ margin: 0 0 -1px -1px;
39
+ border-bottom-left-radius: var(--fagb-radius);
40
+ }
41
+
42
+ .angle-br {
43
+ bottom: 0;
44
+ right: 0;
45
+ border-left: 0;
46
+ border-top: 0;
47
+ margin: 0 -1px -1px 0;
48
+ border-bottom-right-radius: var(--fagb-radius);
49
+ }
50
50
  }
@@ -1,53 +1,53 @@
1
- import './index.less';
2
- import React, { ForwardedRef, forwardRef, useEffect, useImperativeHandle, useRef, useState } from "react";
3
-
4
- export interface FourAngleGlowBorderStyle {
5
- width?: number;
6
- length?: number;
7
- color?: string;
8
- radius?: number;
9
- }
10
-
11
- export interface FourAngleGlowProps {
12
- style?: FourAngleGlowBorderStyle;
13
- }
14
-
15
- export interface FourAngleGlowBorderRef {
16
- updateConfig: (config: FourAngleGlowProps) => void;
17
- }
18
-
19
- const FourAngleGlowBorder = forwardRef((props: FourAngleGlowProps, ref: ForwardedRef<FourAngleGlowBorderRef>) => {
20
- const [config] = useState<FourAngleGlowProps>({ ...props });
21
- const fourAngleGlowRef = useRef<HTMLDivElement | null>(null);
22
-
23
- const updateStyle = (style: FourAngleGlowBorderStyle) => {
24
- const dom = fourAngleGlowRef.current;
25
- if (dom) {
26
- dom.style.setProperty('--fagb-length', `${style?.length}px`);
27
- dom.style.setProperty('--fagb-color', style?.color);
28
- dom.style.setProperty('--fagb-radius', `${style?.radius}px`);
29
- dom.style.setProperty('--fagb-width', `${style?.width}px`);
30
- }
31
- };
32
-
33
- useImperativeHandle(ref, () => ({
34
- updateConfig: (newConfig) => updateStyle({ ...newConfig.style }),
35
- }));
36
-
37
- useEffect(() => {
38
- updateStyle(config.style);
39
- }, []);
40
-
41
- return (
42
- <div className="four-angle-glow" ref={fourAngleGlowRef}>
43
- <span className="angle angle-tl" />
44
- <span className="angle angle-tr" />
45
- <span className="angle angle-bl" />
46
- <span className="angle angle-br" />
47
- </div>
48
- );
49
- })
50
-
51
- export default FourAngleGlowBorder;
52
-
53
-
1
+ import './index.less';
2
+ import React, { ForwardedRef, forwardRef, useEffect, useImperativeHandle, useRef, useState } from "react";
3
+
4
+ export interface FourAngleGlowBorderStyle {
5
+ width?: number;
6
+ length?: number;
7
+ color?: string;
8
+ radius?: number;
9
+ }
10
+
11
+ export interface FourAngleGlowProps {
12
+ style?: FourAngleGlowBorderStyle;
13
+ }
14
+
15
+ export interface FourAngleGlowBorderRef {
16
+ updateConfig: (config: FourAngleGlowProps) => void;
17
+ }
18
+
19
+ const FourAngleGlowBorder = forwardRef((props: FourAngleGlowProps, ref: ForwardedRef<FourAngleGlowBorderRef>) => {
20
+ const [config] = useState<FourAngleGlowProps>({ ...props });
21
+ const fourAngleGlowRef = useRef<HTMLDivElement | null>(null);
22
+
23
+ const updateStyle = (style: FourAngleGlowBorderStyle) => {
24
+ const dom = fourAngleGlowRef.current;
25
+ if (dom) {
26
+ dom.style.setProperty('--fagb-length', `${style?.length}px`);
27
+ dom.style.setProperty('--fagb-color', style?.color);
28
+ dom.style.setProperty('--fagb-radius', `${style?.radius}px`);
29
+ dom.style.setProperty('--fagb-width', `${style?.width}px`);
30
+ }
31
+ };
32
+
33
+ useImperativeHandle(ref, () => ({
34
+ updateConfig: (newConfig) => updateStyle({ ...newConfig.style }),
35
+ }));
36
+
37
+ useEffect(() => {
38
+ updateStyle(config.style);
39
+ }, []);
40
+
41
+ return (
42
+ <div className="four-angle-glow" ref={fourAngleGlowRef}>
43
+ <span className="angle angle-tl" />
44
+ <span className="angle angle-tr" />
45
+ <span className="angle angle-bl" />
46
+ <span className="angle angle-br" />
47
+ </div>
48
+ );
49
+ })
50
+
51
+ export default FourAngleGlowBorder;
52
+
53
+
@@ -72,7 +72,10 @@ const handleData = (data: { config: { [key: string]: string }, value: { [key: st
72
72
  vLength: vNames.length,
73
73
  isMarkLine: true,
74
74
  name: config[r],
75
- data: value.map((v) => [v["d1"], nullSetZero ? (v[r] || 0) : v[r]]),
75
+ data: value.map((v) => {
76
+ const temData = nullSetZero ? (v[r] || 0) : v[r];
77
+ return [v["d1"], (temData)?.split("@R@")[1] || temData];
78
+ }),
76
79
  }))
77
80
  ]
78
81
  } : {
@@ -261,7 +264,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
261
264
  const temData = isDesignMode && !data?.length ? option.series : data;
262
265
  option.barMaxWidth = barMaxWidth;
263
266
  option.grid = grid;
264
- option.legend = { ...legend, ...legends[legend?.position] };
267
+ option.legend = { ...legend, ...legends[legend?.position], data: temData?.filter((item: any) => !item.isMarkLine).map((r: any) => r.name) };
265
268
  option.tooltip = { trigger: "axis", ...tooltip };
266
269
  option.xAxis = { ...option.xAxis, ...xAxis, axisTick: { show: xAxis?.axisLine?.show } };
267
270
  option.yAxis = { ...option.yAxis, ...yAxis };
@@ -67,7 +67,10 @@ const handleData = (data: { config: { [key: string]: string }, value: { [key: st
67
67
  vLength: vNames.length,
68
68
  isMarkLine: true,
69
69
  name: config[r],
70
- data: value.map((v) => [v["d1"], nullSetZero ? (v[r] || 0) : v[r]]),
70
+ data: value.map((v) => {
71
+ const temData = nullSetZero ? (v[r] || 0) : v[r];
72
+ return [v["d1"], (temData)?.split("@R@")[1] || temData];
73
+ }),
71
74
  }))
72
75
  ],
73
76
  } : {
@@ -255,7 +258,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
255
258
  // 编辑态无数据显示默认数据
256
259
  const temData = isDesignMode && !data?.length ? option.series : data;
257
260
  option.grid = grid;
258
- option.legend = { ...legend, ...legends[legend?.position] };
261
+ option.legend = { ...legend, ...legends[legend?.position], data: temData?.filter((item: any) => !item.isMarkLine).map((r: any) => r.name) };
259
262
  option.tooltip = { trigger: "axis", ...tooltip };
260
263
  option.xAxis = { ...option.xAxis, ...xAxis, axisTick: { show: xAxis?.axisLine?.show } };
261
264
  option.yAxis = { ...option.yAxis, ...yAxis };