Skip to content

Commit 41e6cc0

Browse files
committed
fix tooltip bug
1 parent c13466e commit 41e6cc0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

components/tooltip/Tooltip.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ export default {
148148
render (h) {
149149
const { $props, $data, $slots } = this
150150
const { prefixCls, openClassName, getPopupContainer } = $props
151-
const children = ($slots.default || []).filter(c => c.tag || c.text.trim() !== '')
151+
let children = ($slots.default || []).filter(c => c.tag || c.text.trim() !== '')
152+
children = children.length === 1 ? children[0] : children
152153
let sVisible = $data.sVisible
153154
// Hide tooltip when there is no title
154155
if (!hasProp(this, 'visible') && this.isNoTitle()) {

0 commit comments

Comments
 (0)