mirror of
https://github.com/youzan/vant.git
synced 2025-10-15 23:55:08 +00:00
fix(TreeSelect): should not render empty nav (#4663)
This commit is contained in:
@@ -56,15 +56,17 @@ function TreeSelect(
|
||||
: activeId === id;
|
||||
}
|
||||
|
||||
const Navs = items.map(item => (
|
||||
<SidebarItem
|
||||
dot={item.dot}
|
||||
info={item.info}
|
||||
title={item.text}
|
||||
disabled={item.disabled}
|
||||
class={bem('nav-item')}
|
||||
/>
|
||||
));
|
||||
const Navs = items
|
||||
.filter(item => item.text)
|
||||
.map(item => (
|
||||
<SidebarItem
|
||||
dot={item.dot}
|
||||
info={item.info}
|
||||
title={item.text}
|
||||
disabled={item.disabled}
|
||||
class={bem('nav-item')}
|
||||
/>
|
||||
));
|
||||
|
||||
function Content() {
|
||||
if (slots.content) {
|
||||
|
Reference in New Issue
Block a user