UNPKG

dareway-rui

Version:

84 lines (78 loc) 2.43 kB
'use strict'; var _interopRequireDefault = require('@babel/runtime/helpers/interopRequireDefault'); Object.defineProperty(exports, '__esModule', { value: true }); exports.ButtonsColumnConfigGenerator = ButtonsColumnConfigGenerator; var _HeaderCell = _interopRequireDefault(require('./HeaderCell')); var _BodyCell = _interopRequireDefault(require('./BodyCell')); function ButtonsColumnConfigGenerator( sortable, onSort, col, updateCurrentRowNum, syncCellValue, gridReadonly, resizable, onResize ) { var name = col.name, head = col.head, headBold = col.headBold, headFontColor = col.headFontColor, headOblique = col.headOblique, bodyAlign = col.bodyAlign, bodyBold = col.bodyBold, bodyFontColor = col.bodyFontColor, bodyOblique = col.bodyOblique, hidden = col.hidden, width = col.width, children = col.children; var columnObj = { title: head, dataIndex: name, width: width, onHeaderCell: function onHeaderCell(column) { return { HeaderCell: _HeaderCell.default, // name name: name, // head head: head, headBold: headBold, headFontColor: headFontColor, headOblique: headOblique, // 只读、必填、隐藏 hidden: hidden, // 宽度 width: width, // 列拖动 resizable: resizable, onResize: onResize }; }, onCell: function onCell(record, index) { return { BodyCell: _BodyCell.default, // name name: name, // body bodyAlign: bodyAlign, bodyBold: bodyBold, bodyFontColor: bodyFontColor, bodyOblique: bodyOblique, // 只读、必填、隐藏 hidden: hidden, // 宽度 width: width, // 字标签 children: children, // rowNumber rowNumber: index + 1, updateCurrentRowNum: updateCurrentRowNum }; } }; return columnObj; } //@ sourceMappingURL=AntdColumnConfigGenerator.js.map