coolcare-lite-scada-component 2.0.34 → 2.0.35

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.
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import { memo } from 'react';
3
- import { Tooltip } from 'antd';
4
3
  import { getValueByExpression, reactShapeNodeAreEqual } from "../utils";
5
4
  import { usePointWatch, useEleEventHandle } from "../../hooks";
6
5
  import styles from "./index.css";
@@ -35,34 +34,46 @@ var ElePointImageComponent = function ElePointImageComponent(_ref) {
35
34
  }
36
35
  });
37
36
  var pointData = usePointWatch(configPoint, payload === null || payload === void 0 ? void 0 : (_payload$mittMeta2 = payload.mittMeta) === null || _payload$mittMeta2 === void 0 ? void 0 : _payload$mittMeta2.namespace);
38
- var tooltipTitle = null;
39
- if (!configPoint) {
40
- tooltipTitle = '未绑定点位';
41
- } else {
42
- var _pointData$value, _pointData$unit;
43
- tooltipTitle = /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, "\u70B9\u4F4D\u540D\u79F0\uFF1A", (pointData === null || pointData === void 0 ? void 0 : pointData.pointName) || '-'), /*#__PURE__*/React.createElement("div", null, "\u70B9\u4F4D\u503C\uFF1A", (_pointData$value = pointData === null || pointData === void 0 ? void 0 : pointData.value) !== null && _pointData$value !== void 0 ? _pointData$value : '-', " ", (_pointData$unit = pointData === null || pointData === void 0 ? void 0 : pointData.unit) !== null && _pointData$unit !== void 0 ? _pointData$unit : '-'), /*#__PURE__*/React.createElement("div", null, "\u66F4\u65B0\u65F6\u95F4\uFF1A", (pointData === null || pointData === void 0 ? void 0 : pointData.updateTime) || '-'));
44
- }
45
- return /*#__PURE__*/React.createElement(Tooltip, {
46
- title: tooltipTitle
47
- }, /*#__PURE__*/React.createElement("div", {
48
- onClick: function onClick(e) {
49
- return eventHandles.current.onClick(e);
50
- },
51
- onContextMenu: function onContextMenu(e) {
52
- return eventHandles.current.onContextMenu(e);
53
- },
54
- onMouseEnter: function onMouseEnter(e) {
55
- return eventHandles.current.onMouseEnter(e);
56
- },
57
- onMouseLeave: function onMouseLeave(e) {
58
- return eventHandles.current.onMouseLeave(e);
59
- },
60
- className: styles.wrap
61
- }, (payload === null || payload === void 0 ? void 0 : payload.imgSrc) ? /*#__PURE__*/React.createElement("img", {
62
- className: styles.img,
63
- src: getImageSrc(payload.imgSrc, pointData === null || pointData === void 0 ? void 0 : pointData.value, configPoint === null || configPoint === void 0 ? void 0 : configPoint.expressions),
64
- draggable: false,
65
- alt: ""
66
- }) : null));
37
+
38
+ // let tooltipTitle = null;
39
+ // if (!configPoint) {
40
+ // tooltipTitle = '未绑定点位';
41
+ // } else {
42
+ // tooltipTitle = (
43
+ // <div>
44
+ // <div>点位名称:{pointData?.pointName || '-'}</div>
45
+ // <div>
46
+ // 点位值:{pointData?.value ?? '-'} {pointData?.unit ?? '-'}
47
+ // </div>
48
+ // <div>更新时间:{pointData?.updateTime || '-'}</div>
49
+ // </div>
50
+ // );
51
+ // }
52
+
53
+ return (
54
+ /*#__PURE__*/
55
+ // <Tooltip title={tooltipTitle}>
56
+ React.createElement("div", {
57
+ onClick: function onClick(e) {
58
+ return eventHandles.current.onClick(e);
59
+ },
60
+ onContextMenu: function onContextMenu(e) {
61
+ return eventHandles.current.onContextMenu(e);
62
+ },
63
+ onMouseEnter: function onMouseEnter(e) {
64
+ return eventHandles.current.onMouseEnter(e);
65
+ },
66
+ onMouseLeave: function onMouseLeave(e) {
67
+ return eventHandles.current.onMouseLeave(e);
68
+ },
69
+ className: styles.wrap
70
+ }, (payload === null || payload === void 0 ? void 0 : payload.imgSrc) ? /*#__PURE__*/React.createElement("img", {
71
+ className: styles.img,
72
+ src: getImageSrc(payload.imgSrc, pointData === null || pointData === void 0 ? void 0 : pointData.value, configPoint === null || configPoint === void 0 ? void 0 : configPoint.expressions),
73
+ draggable: false,
74
+ alt: ""
75
+ }) : null)
76
+ // </Tooltip>
77
+ );
67
78
  };
68
79
  export default /*#__PURE__*/memo(ElePointImageComponent, reactShapeNodeAreEqual);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coolcare-lite-scada-component",
3
- "version": "2.0.34",
3
+ "version": "2.0.35",
4
4
  "scripts": {
5
5
  "start": "umi dev",
6
6
  "build:prod": "UMI_ENV=prod umi build",