fix(data-table): selection column's width is collapsed when it is set to fixed, closes #1283

This commit is contained in:
07akioni 2021-10-05 02:11:22 +08:00
parent 1e5c6d0fa6
commit 84d2950dd8
3 changed files with 5 additions and 1 deletions

View File

@ -28,6 +28,7 @@
- Fix `n-upload`'s `show-preview-button` prop not workingcloses [#1238](https://github.com/TuSimple/naive-ui/issues/1238).
- Fix `n-date-picker`'s `date` type of `action` validate error.
- Fix `n-data-table` throws error when using `selection` and `summary` together, closes [#1276](https://github.com/TuSimple/naive-ui/issues/1276).
- Fix `n-data-table` selection column's width is collapsed when it is set to fixed, closes [#1283](https://github.com/TuSimple/naive-ui/issues/1283).
## 2.19.3 (2021-09-28)

View File

@ -28,6 +28,7 @@
- 修复 `n-upload``show-preview-button` 属性失效,关闭 [#1238](https://github.com/TuSimple/naive-ui/issues/1238)
- 修复 `n-date-picker``date` 类型的 `action` 验证错误
- 修复 `n-data-table``selection``summary` 一起使用时报错,关闭 [#1276](https://github.com/TuSimple/naive-ui/issues/1276)
- 修复 `n-data-table` 勾选列的宽度在设为 fixed 时候塌陷,关闭 [#1283](https://github.com/TuSimple/naive-ui/issues/1283)
## 2.19.3 (2021-09-28)

View File

@ -45,8 +45,10 @@ export function getFlagOfOrder (order: SortOrder): SortOrderFlag {
export function createCustomWidthStyle (
column: TableBaseColumn | TableSelectionColumn | TableExpandColumn
): CSSProperties {
const width = pxfy(getColWidth(column))
return {
width: pxfy(getColWidth(column))
width,
minWidth: width
}
}