fix: 合计和固定列错位[#540]
This commit is contained in:
parent
ecf0664a3c
commit
f3541dfe03
|
@ -1304,7 +1304,7 @@ var Table = function (_Component) {
|
||||||
}
|
}
|
||||||
// const leftFixedWidth = this.columnManager.getLeftColumnsWidth(this.contentWidth);
|
// const leftFixedWidth = this.columnManager.getLeftColumnsWidth(this.contentWidth);
|
||||||
// const rightFixedWidth = this.columnManager.getRightColumnsWidth(this.contentWidth);
|
// const rightFixedWidth = this.columnManager.getRightColumnsWidth(this.contentWidth);
|
||||||
var expandIconWidth = expandIconAsCell ? 33 : 0;
|
var expandIconWidth = expandIconAsCell ? 32 : 0;
|
||||||
var parStyle = {};
|
var parStyle = {};
|
||||||
if (!fixed) {
|
if (!fixed) {
|
||||||
parStyle = { 'marginLeft': leftFixedWidth + expandIconWidth, 'marginRight': rightFixedWidth };
|
parStyle = { 'marginLeft': leftFixedWidth + expandIconWidth, 'marginRight': rightFixedWidth };
|
||||||
|
|
|
@ -603,8 +603,8 @@ var TableRow = function (_Component) {
|
||||||
expandIndexInThisTable = expandIconColumnIndex;
|
expandIndexInThisTable = expandIconColumnIndex;
|
||||||
}
|
}
|
||||||
for (var i = 0; i < columns.length; i++) {
|
for (var i = 0; i < columns.length; i++) {
|
||||||
if (expandIconAsCell && i === 0 && !showSum) {
|
if (expandIconAsCell && i === 0) {
|
||||||
cells.push(_react2["default"].createElement(
|
showSum ? cells.push(_react2["default"].createElement('td', { width: expandIconCellWidth })) : cells.push(_react2["default"].createElement(
|
||||||
'td',
|
'td',
|
||||||
{
|
{
|
||||||
className: clsPrefix + '-expand-icon-cell ' + isExpandIconAsCell,
|
className: clsPrefix + '-expand-icon-cell ' + isExpandIconAsCell,
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1127,7 +1127,7 @@ class Table extends Component {
|
||||||
}
|
}
|
||||||
// const leftFixedWidth = this.columnManager.getLeftColumnsWidth(this.contentWidth);
|
// const leftFixedWidth = this.columnManager.getLeftColumnsWidth(this.contentWidth);
|
||||||
// const rightFixedWidth = this.columnManager.getRightColumnsWidth(this.contentWidth);
|
// const rightFixedWidth = this.columnManager.getRightColumnsWidth(this.contentWidth);
|
||||||
let expandIconWidth = expandIconAsCell ? 33 : 0;
|
let expandIconWidth = expandIconAsCell ? 32 : 0;
|
||||||
let parStyle = {}
|
let parStyle = {}
|
||||||
if(!fixed){
|
if(!fixed){
|
||||||
parStyle = {'marginLeft':leftFixedWidth + expandIconWidth,'marginRight':rightFixedWidth}
|
parStyle = {'marginLeft':leftFixedWidth + expandIconWidth,'marginRight':rightFixedWidth}
|
||||||
|
|
|
@ -481,7 +481,8 @@ class TableRow extends Component{
|
||||||
expandIndexInThisTable = expandIconColumnIndex
|
expandIndexInThisTable = expandIconColumnIndex
|
||||||
}
|
}
|
||||||
for (let i = 0; i < columns.length; i++) {
|
for (let i = 0; i < columns.length; i++) {
|
||||||
if (expandIconAsCell && i === 0 && !showSum ) {
|
if (expandIconAsCell && i === 0) {
|
||||||
|
showSum ? cells.push(<td width={expandIconCellWidth}></td>) :
|
||||||
cells.push(
|
cells.push(
|
||||||
<td
|
<td
|
||||||
className={`${clsPrefix}-expand-icon-cell ${isExpandIconAsCell}`}
|
className={`${clsPrefix}-expand-icon-cell ${isExpandIconAsCell}`}
|
||||||
|
|
Loading…
Reference in New Issue