Skip to content

Commit

Permalink
Merge pull request #569 from xintaoLi/staging
Browse files Browse the repository at this point in the history
bugfix(table): selection类型列 header-render失效 #559 & 配置化表格hover全选按钮会丢失填…
  • Loading branch information
ielgnaw authored Jul 31, 2024
2 parents a2890d8 + 4ebb53b commit 54f6f5c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,5 +197,8 @@
"vetur": {
"tags": "./bkui-vue2-helper/tags.json",
"attributes": "./bkui-vue2-helper/attributes.json"
},
"engines": {
"node": "<= 16.14"
}
}
14 changes: 8 additions & 6 deletions src/components/table/table-column.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,12 +387,14 @@ export default {
let value = source[prop]
if (value !== undefined) {
if (prop === 'renderHeader') {
if (type === 'selection' && column[prop]) {
// eslint-disable-next-line max-len
console.warn('[Magic Warn][TableColumn]Selection column doesn\'t allow to set render-header function.')
} else {
value = column[prop] || value
}
// if (type === 'selection' && column[prop]) {
// // eslint-disable-next-line max-len
// console.warn('[Magic Warn][TableColumn]Selection column doesn\'t allow to set render-header function.')
// } else {
// value = column[prop] || value
// }

value = column[prop] || value
}
column[prop] = prop === 'className' ? `${column[prop]} ${value}` : value
}
Expand Down
2 changes: 1 addition & 1 deletion src/ui/table.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ $tableDarkHeaderHover: #eaebf0;
&.bk-table-dark-header {
th {
background-color: $tableDarkHeader;
:hover {
.cell:hover {
background-color: $tableDarkHeaderHover
}
}
Expand Down

0 comments on commit 54f6f5c

Please sign in to comment.