Skip to content

Commit 01a2d00

Browse files
committed
Update index.jsx
1 parent 2c1e8b5 commit 01a2d00

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/ve-table/src/colgroup/index.jsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ export default {
88
required: true,
99
},
1010
},
11+
methods: {
12+
getValByUnit(item) {
13+
// 解决使用 _realTimeWidth 在多表头下宽度计算异常的问题
14+
return getValByUnit(
15+
item._realTimeWidth ? item._realTimeWidth : item.width,
16+
);
17+
},
18+
},
1119
render() {
1220
return (
1321
<colgroup>
@@ -16,7 +24,7 @@ export default {
1624
<col
1725
key={item.key}
1826
style={{
19-
width: getValByUnit(item._realTimeWidth),
27+
width: this.getValByUnit(item),
2028
}}
2129
/>
2230
);

0 commit comments

Comments
 (0)