@ucloud-fe/react-components 1.3.9 → 1.3.13

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.
@@ -86,7 +86,8 @@ var TransferMenu = /*#__PURE__*/function (_PureComponent) {
86
86
  (0, _newArrowCheck2.default)(this, _this3);
87
87
  return /*#__PURE__*/_react.default.createElement(_Menu.default.Item, {
88
88
  key: item.key,
89
- itemKey: item.key
89
+ itemKey: item.key,
90
+ disabled: item.disabled
90
91
  }, renderItem ? renderItem(item) : item.label);
91
92
  }.bind(this))));
92
93
  }.bind(this);
@@ -233,6 +233,7 @@ var ExpandableTable = /*#__PURE__*/function (_React$Component) {
233
233
  prefixCls: "".concat(prefixCls, "-expanded-row"),
234
234
  indentSize: indentSize,
235
235
  indent: indent,
236
+ index: index,
236
237
  fixed: fixed,
237
238
  components: components,
238
239
  expandedRow: true
@@ -37,7 +37,19 @@ declare class Table extends React.Component<any, any, any> {
37
37
  }>;
38
38
  columnManager: ColumnManager;
39
39
  saveRef: (name: any) => (node: any) => void;
40
- components: any;
40
+ components: {
41
+ table: any;
42
+ header: {
43
+ wrapper: any;
44
+ row: any;
45
+ cell: any;
46
+ };
47
+ body: {
48
+ wrapper: any;
49
+ row: any;
50
+ cell: any;
51
+ };
52
+ };
41
53
  };
42
54
  };
43
55
  getRowKey: (record: any, index: any) => any;
@@ -31,8 +31,6 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
31
31
 
32
32
  var _miniStore = require("mini-store");
33
33
 
34
- var _merge = _interopRequireDefault(require("lodash/merge"));
35
-
36
34
  var _componentClasses = _interopRequireDefault(require("component-classes"));
37
35
 
38
36
  var _reactLifecyclesCompat = require("react-lifecycles-compat");
@@ -151,24 +149,27 @@ var Table = /*#__PURE__*/function (_React$Component) {
151
149
  (0, _createClass2.default)(Table, [{
152
150
  key: "getChildContext",
153
151
  value: function getChildContext() {
152
+ var _components$header, _components$header2, _components$header3, _components$body, _components$body2, _components$body3;
153
+
154
+ var components = this.props.components || {};
154
155
  return {
155
156
  table: {
156
157
  props: this.props,
157
158
  columnManager: this.columnManager,
158
159
  saveRef: this.saveRef,
159
- components: (0, _merge.default)({
160
- table: 'table',
160
+ components: {
161
+ table: components.table || 'table',
161
162
  header: {
162
- wrapper: 'thead',
163
- row: 'tr',
164
- cell: 'th'
163
+ wrapper: ((_components$header = components.header) === null || _components$header === void 0 ? void 0 : _components$header.wrapper) || 'thead',
164
+ row: ((_components$header2 = components.header) === null || _components$header2 === void 0 ? void 0 : _components$header2.row) || 'tr',
165
+ cell: ((_components$header3 = components.header) === null || _components$header3 === void 0 ? void 0 : _components$header3.cell) || 'th'
165
166
  },
166
167
  body: {
167
- wrapper: 'tbody',
168
- row: 'tr',
169
- cell: 'td'
168
+ wrapper: ((_components$body = components.body) === null || _components$body === void 0 ? void 0 : _components$body.wrapper) || 'tbody',
169
+ row: ((_components$body2 = components.body) === null || _components$body2 === void 0 ? void 0 : _components$body2.row) || 'tr',
170
+ cell: ((_components$body3 = components.body) === null || _components$body3 === void 0 ? void 0 : _components$body3.cell) || 'td'
170
171
  }
171
- }, this.props.components)
172
+ }
172
173
  }
173
174
  };
174
175
  }
@@ -208,7 +208,8 @@ var TableRow = /*#__PURE__*/function (_React$Component) {
208
208
  className: rowClassName
209
209
  }, rowProps, {
210
210
  style: style,
211
- "data-row-key": rowKey
211
+ "data-row-key": rowKey,
212
+ "data-row-index": index
212
213
  }), cells);
213
214
  }
214
215
  }], [{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ucloud-fe/react-components",
3
- "version": "1.3.9",
3
+ "version": "1.3.13",
4
4
  "title": "UCloud react components",
5
5
  "description": "UCloud react components",
6
6
  "keywords": [
@@ -81,7 +81,8 @@
81
81
  "react-transition-group": "^2.4.0",
82
82
  "resize-observer-polyfill": "^1.5.1",
83
83
  "shallowequal": "^1.0.2",
84
- "warning": "^3.0.0"
84
+ "warning": "^3.0.0",
85
+ "z-use-drag": "^1.2.2"
85
86
  },
86
87
  "devDependencies": {
87
88
  "@babel/cli": "^7.11.6",