Table: fix cell width when colspan is grater than 1 (#15196)

pull/15207/head
hetech 2019-04-22 13:19:20 +08:00 committed by GitHub
parent 5ecf4c2895
commit 9ac51576e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -88,11 +88,15 @@ export default {
if (!rowspan || !colspan) { if (!rowspan || !colspan) {
return ''; return '';
} else { } else {
const columnData = { ...column };
if (colspan !== 1) {
columnData.realWidth = columnData.realWidth * colspan;
}
const data = { const data = {
store: this.store, store: this.store,
_self: this.context || this.table.$vnode.context, _self: this.context || this.table.$vnode.context,
column: columnData,
row, row,
column,
$index $index
}; };
if (cellIndex === this.firstDefaultColumnIndex && treeNode) { if (cellIndex === this.firstDefaultColumnIndex && treeNode) {