Cell.js
1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = SummaryCell;
var React = _interopRequireWildcard(require("react"));
var _Cell = _interopRequireDefault(require("../Cell"));
var _TableContext = _interopRequireDefault(require("../context/TableContext"));
function SummaryCell(_ref) {
var className = _ref.className,
index = _ref.index,
children = _ref.children,
colSpan = _ref.colSpan,
rowSpan = _ref.rowSpan,
align = _ref.align;
var _React$useContext = React.useContext(_TableContext.default),
prefixCls = _React$useContext.prefixCls,
fixedInfoList = _React$useContext.fixedInfoList;
var fixedInfo = fixedInfoList[index];
return React.createElement(_Cell.default, Object.assign({
className: className,
index: index,
component: "td",
prefixCls: prefixCls,
record: null,
dataIndex: null,
align: align,
render: function render() {
return {
children: children,
props: {
colSpan: colSpan,
rowSpan: rowSpan
}
};
}
}, fixedInfo));
}