dlt-for-react 2.1.6 → 2.1.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.
package/README.md CHANGED
@@ -14,9 +14,12 @@ npm publish
14
14
 
15
15
  ##### 版本修改记录
16
16
 
17
+ #### V2.1.7—2024 年 6 月 12 日
18
+ 1. 解决升级echarts5.0版本 部分api不兼容的问题
19
+
17
20
  #### V2.1.6—2024 年 6 月 4 日
18
21
 
19
- 1. 更新echart版本
22
+ 1. 更新echart5.0版本
20
23
  2. 去除echarts/map/js/china
21
24
  3. 优化handleMenus方法
22
25
 
@@ -24,9 +24,9 @@ var _core = require('echarts-for-react/lib/core');
24
24
 
25
25
  var _core2 = _interopRequireDefault(_core);
26
26
 
27
- var _echarts = require('echarts/lib/echarts');
27
+ var _echarts = require('echarts');
28
28
 
29
- var _echarts2 = _interopRequireDefault(_echarts);
29
+ var echarts = _interopRequireWildcard(_echarts);
30
30
 
31
31
  require('echarts/lib/chart/line');
32
32
 
@@ -58,6 +58,8 @@ require('echarts/lib/component/polar');
58
58
 
59
59
  require('echarts/lib/component/geo');
60
60
 
61
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
62
+
61
63
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
62
64
 
63
65
  //地理坐标系组件
@@ -91,23 +93,26 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
91
93
  // import 'echarts/lib/chart/sankey';
92
94
  // import 'echarts/lib/chart/boxplot';
93
95
  // import 'echarts/lib/chart/candlestick';
94
- //echarts 基础配置,必须引入
96
+ // 5.0.0 版本以上
95
97
  /* 按需引入echarts */
96
98
  //折线图
97
99
  //柱状图
98
100
  //饼图
99
101
  //散点图
100
102
  //雷达图
103
+
104
+ // import echarts from 'echarts/lib/echarts'
101
105
  var KyECharts = function KyECharts(_ref) {
102
- var className = _ref.className,
106
+ var style = _ref.style,
107
+ className = _ref.className,
103
108
  notMerge = _ref.notMerge,
104
109
  lazyUpdate = _ref.lazyUpdate,
105
- props = (0, _objectWithoutProperties3.default)(_ref, ['className', 'notMerge', 'lazyUpdate']);
110
+ props = (0, _objectWithoutProperties3.default)(_ref, ['style', 'className', 'notMerge', 'lazyUpdate']);
106
111
 
107
112
  return _react2.default.createElement(_core2.default, (0, _extends3.default)({
108
113
  style: { width: '100%', height: '100%' },
109
114
  className: (0, _classnames2.default)('ky-echarts', className),
110
- echarts: _echarts2.default,
115
+ echarts: echarts,
111
116
  notMerge: notMerge,
112
117
  lazyUpdate: lazyUpdate
113
118
  }, props));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dlt-for-react",
3
- "version": "2.1.6",
3
+ "version": "2.1.8",
4
4
  "description": "dlt for react",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {