-
Notifications
You must be signed in to change notification settings - Fork 291
Description
Version
"vue-devui": "^1.6.31"
Vue Version
"vue": "^3.3.4"
Link to minimal reproduction
const menu = ref([ { title: '内容一', key: '1', children: [ { title: '子内容1', key: '1-1' }, { title: '子内容2', key: '1-2' }, { title: '子内容3', key: '1-3' } ], }, { title: '内容二', key: '2', children: [ { title: '子内容1', key: '2-1' }, { title: '子内容2', key: '2-2' }, { title: '子内容3', key: '2-3' } ], }, { title: '内容三(默认展开)', key: '3', children: [ { title: '子内容1(禁用)', key: '3-1', }, { title: '子内容2(默认激活)', key: '3-2', }, { title: '子内容3', key: '3-3' } ], }, ])
<d-menu width="300px"> <d-menu-item> <template #icon> <i class="icon-homepage"></i> </template> <span>首页</span> </d-menu-item> <d-sub-menu v-for="(item,index) in menu" :title="item.title" :key="index+1" > <template #icon><i class="icon-system"></i></template> <d-menu-item v-if="item.children.length>0" v-for="(sub,key) in item.children" :key="index+'-'+key"> <template #icon><i class="icon-system"></i></template> {{ sub.title + ' ' + index + '-' + key }} </d-menu-item> </d-sub-menu> </d-menu>
Step to reproduce
给menu设置参数collapsed,菜单只显示图标,但是展开图标的时候却没有子菜单。我用官网的例子测试了也是如此。
What is expected
给menu设置参数collapsed,菜单只显示图标,但是展开图标的时候显示子菜单。
What is actually happening
No response
Any additional comments (optional)
No response