Skip to content

Commit

Permalink
fix(space): is shown when it has no children, closes #1605
Browse files Browse the repository at this point in the history
  • Loading branch information
07akioni committed Nov 18, 2021
1 parent cbaea28 commit b1eb17d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
### Fixes

- Fix the default value of the `suffix` internal component's `loading` property.
- Fix `n-space` is shown when it has no children, closes [#1605](https://github.com/TuSimple/naive-ui/issues/1605).

## 2.20.3 (2021-11-15)

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
### Fixes

- 修复 `suffix` 内部组件 `loading` 属性的默认值
- 修复 `n-space` 没有子节点的时候还被展示,关闭 [#1605](https://github.com/TuSimple/naive-ui/issues/1605).

## 2.20.3 (2021-11-15)

Expand Down
1 change: 1 addition & 0 deletions src/space/src/Space.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export default defineComponent({
mergedClsPrefix
} = this
const children = flatten(getSlot(this))
if (!children.length) return null
const horizontalMargin = `${margin.horizontal}px`
const semiHorizontalMargin = `${margin.horizontal / 2}px`
const verticalMargin = `${margin.vertical}px`
Expand Down

0 comments on commit b1eb17d

Please sign in to comment.