From 9ac51576e681c96a1ad29f2ff8bc7bd556b645e4 Mon Sep 17 00:00:00 2001 From: hetech Date: Mon, 22 Apr 2019 13:19:20 +0800 Subject: [PATCH] Table: fix cell width when colspan is grater than 1 (#15196) --- packages/table/src/table-body.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/table/src/table-body.js b/packages/table/src/table-body.js index 9976b8810..5f51a9352 100644 --- a/packages/table/src/table-body.js +++ b/packages/table/src/table-body.js @@ -88,11 +88,15 @@ export default { if (!rowspan || !colspan) { return ''; } else { + const columnData = { ...column }; + if (colspan !== 1) { + columnData.realWidth = columnData.realWidth * colspan; + } const data = { store: this.store, _self: this.context || this.table.$vnode.context, + column: columnData, row, - column, $index }; if (cellIndex === this.firstDefaultColumnIndex && treeNode) {