mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-18 12:34:25 +08:00
Revert "fix(space): vnode reuse problem caused by filtering out comment vnodes of slot (#5150)"
This reverts commit 597fd57c49
.
This commit is contained in:
parent
597fd57c49
commit
731325a3d7
@ -32,8 +32,7 @@
|
||||
- Fix `n-tree`'s `TreeOption`'s `checkboxDisabled` prop doesn't work when `check-on-click` is `true`.
|
||||
- Fix rapid clicks on `n-date-input`'s buttons triggering a text select for the rest of the website.
|
||||
- Fix `n-auto-complete`'s autocomplete menu's unexpected open when clicking the clear icon with the input not focused, closes [#4658](https://github.com/tusen-ai/naive-ui/issues/4658).
|
||||
- Fix `n-input`'s `on-keyup` prop type, closes [#5101](https://github.com/tusen-ai/naive-ui/issues/5101).
|
||||
- Fix `n-space` vnode reuse problem caused by filtering out comment vnodes of slot, closes [#5136](https://github.com/tusen-ai/naive-ui/issues/5136).
|
||||
- Fix `n-input`'s `on-keyup` prop type, closes [#5101](https://github.com/tusen-ai/naive-ui/issues/5101)
|
||||
|
||||
### Features
|
||||
|
||||
|
@ -33,7 +33,6 @@
|
||||
- 修复 `n-date-input` 的按钮快速点击时网站其余文本会被选中
|
||||
- 修复 `n-auto-complete` 在未聚焦状态下点击清除按钮时补全菜单意外打开的问题,关闭 [#4658](https://github.com/tusen-ai/naive-ui/issues/4658)
|
||||
- 修复 `n-input` 属性 `on-keyup` 类型,关闭 [#5101](https://github.com/tusen-ai/naive-ui/issues/5101)
|
||||
- 修复 `n-space` 插槽过滤了注释节点导致节点复用问题,关闭 [#5136](https://github.com/tusen-ai/naive-ui/issues/5136)
|
||||
|
||||
### Features
|
||||
|
||||
|
@ -30,8 +30,7 @@ export function flatten (
|
||||
flatten(vNode.children, filterCommentNode, result)
|
||||
}
|
||||
// rawSlot
|
||||
} else {
|
||||
if (vNode.type === Comment && filterCommentNode) return
|
||||
} else if (vNode.type !== Comment) {
|
||||
result.push(vNode)
|
||||
}
|
||||
})
|
||||
|
@ -123,7 +123,7 @@ export default defineComponent({
|
||||
wrapItem,
|
||||
internalUseGap
|
||||
} = this
|
||||
const children = flatten(getSlot(this), false)
|
||||
const children = flatten(getSlot(this))
|
||||
if (!children.length) return null
|
||||
const horizontalMargin = `${margin.horizontal}px`
|
||||
const semiHorizontalMargin = `${margin.horizontal / 2}px`
|
||||
|
Loading…
Reference in New Issue
Block a user