Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [Bug]: menu菜单,当收起菜单时(collapsed),展开菜单项不显示子菜单 #1934

Open
wujisui opened this issue Feb 13, 2025 · 0 comments

Comments

@wujisui
Copy link

wujisui commented Feb 13, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant