mirror of https://github.com/ElemeFE/element
Table: fix cell width when colspan is grater than 1 (#15196)
parent
5ecf4c2895
commit
9ac51576e6
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue