We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 142f007 commit 1b6eb19Copy full SHA for 1b6eb19
packages/ve-table/src/colgroup/index.jsx
@@ -7,13 +7,24 @@ export default {
7
type: Array,
8
required: true,
9
},
10
+ enableColumnResize: {
11
+ type: Boolean,
12
+ required: true,
13
+ },
14
15
methods: {
16
getValByUnit(item) {
- // 解决使用 _realTimeWidth 在多表头下宽度计算异常的问题
- return getValByUnit(
- item._realTimeWidth ? item._realTimeWidth : item.width,
- );
17
+ const { enableColumnResize } = this;
18
+
19
+ let width;
20
+ // 开启 column resize
21
+ if (enableColumnResize) {
22
+ // 解决使用 _realTimeWidth 在多表头下宽度计算异常的问题
23
+ width = item._realTimeWidth ? item._realTimeWidth : item.width;
24
+ } else {
25
+ width = item.width;
26
+ }
27
+ return getValByUnit(width);
28
29
30
render() {
0 commit comments