We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
"vue-devui": "^1.6.31"
"vue": "^3.3.4"
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>
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>
给menu设置参数collapsed,菜单只显示图标,但是展开图标的时候却没有子菜单。我用官网的例子测试了也是如此。
给menu设置参数collapsed,菜单只显示图标,但是展开图标的时候显示子菜单。
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
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
The text was updated successfully, but these errors were encountered: