diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index e3aafc826d9..55a96513ce1 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -1,5 +1,13 @@ # CHANGELOG +## NEXT_VERSION + +`xxxx-xx-xx` + +### Fixes + +- Fix `n-descriptions-item`'s prop `label-class` and `content-class` not working, closes [#6290](https://github.com/tusen-ai/naive-ui/issues/6290). + ## 2.41.0 ### Breaking Changes diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index dd6c97db9d9..de6335b368e 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -1,5 +1,13 @@ # CHANGELOG +## NEXT_VERSION + +`xxxx-xx-xx` + +### Fixes + +- 修复 `n-descriptions-item` 的属性 `label-class` 和 `content-class` 不生效, 关闭 [#6290](https://github.com/tusen-ai/naive-ui/issues/6290) + ## 2.41.0 `2025-01-05` diff --git a/src/descriptions/src/Descriptions.tsx b/src/descriptions/src/Descriptions.tsx index 2a787a25e16..2ed636cf6a2 100644 --- a/src/descriptions/src/Descriptions.tsx +++ b/src/descriptions/src/Descriptions.tsx @@ -156,8 +156,6 @@ export default defineComponent({ const children = defaultSlots ? flatten(defaultSlots()) : [] const memorizedLength = children.length const { - contentClass, - labelClass, compitableColumn, labelPlacement, labelAlign, @@ -202,8 +200,12 @@ export default defineComponent({ state.span += itemSpan const labelStyle = props.labelStyle || props['label-style'] || this.labelStyle + const labelClass + = props.labelClass || props['label-class'] || this.labelClass const contentStyle = props.contentStyle || props['content-style'] || this.contentStyle + const contentClass + = props.contentClass || props['content-class'] || this.contentClass if (labelPlacement === 'left') { if (bordered) { state.row.push(