Skip to content

Commit 8dd4aee

Browse files
author
huangshuwei
committed
修复表头分组border 不准确问题
1 parent 2054f37 commit 8dd4aee

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

packages/ve-table/src/header/header-th.jsx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,25 @@ export default {
119119
},
120120
// is last column
121121
isLastCloumn() {
122+
let result = false;
123+
122124
const { colgroups, groupColumnItem: column } = this;
123-
return colgroups[colgroups.length - 1].field === column.field;
125+
126+
const lastColumnKey = colgroups[colgroups.length - 1].key;
127+
128+
const keys = column._keys.split("|");
129+
130+
if (keys.length) {
131+
if (keys.length === 1) {
132+
if (keys[0] === lastColumnKey) {
133+
result = true;
134+
}
135+
} else if (keys[keys.length - 2] === lastColumnKey) {
136+
result = true;
137+
}
138+
}
139+
140+
return result;
124141
}
125142
},
126143
methods: {

0 commit comments

Comments
 (0)