@easyv/charts 1.5.16 → 1.5.17

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.
@@ -116,11 +116,15 @@ var Chart = /*#__PURE__*/(0, _react.memo)(function (_ref2) {
116
116
  };
117
117
  }, [id, chartWidth, chartHeight, triggerOnRelative, svg, onEmit]);
118
118
  (0, _react.useEffect)(function () {
119
+ var isAnimation = window.screenConfig ? window.screenConfig.isAnimation : true; //大屏的全局设置是否允许开启动画,false为不允许
120
+
121
+ if (!isAnimation) setActive(false);
122
+
119
123
  var activeHandler = function activeHandler(e) {
120
124
  var _e$dynamicData = e.dynamicData,
121
125
  dynamicData = _e$dynamicData === void 0 ? true : _e$dynamicData; // console.log("当前组件(id="+id+")状态:",dynamicData?"唤醒":"休眠");
122
126
 
123
- setActive(dynamicData);
127
+ isAnimation && setActive(dynamicData);
124
128
  };
125
129
 
126
130
  document.addEventListener("switchActive_".concat(id), activeHandler);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyv/charts",
3
- "version": "1.5.16",
3
+ "version": "1.5.17",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -92,10 +92,12 @@ const Chart = memo(
92
92
  );
93
93
 
94
94
  useEffect(()=>{
95
+ let isAnimation = window.screenConfig?window.screenConfig.isAnimation:true; //大屏的全局设置是否允许开启动画,false为不允许
96
+ if(!isAnimation) setActive(false);
95
97
  const activeHandler=(e)=>{
96
98
  const { dynamicData = true } = e;
97
99
  // console.log("当前组件(id="+id+")状态:",dynamicData?"唤醒":"休眠");
98
- setActive(dynamicData);
100
+ isAnimation && setActive(dynamicData);
99
101
  }
100
102
  document.addEventListener(`switchActive_${id}`,activeHandler);
101
103
  return ()=>{