ant-design-vue/components/menu/demo/SubMenu.vue

13 lines
478 B
Vue
Raw Normal View History

<template functional>
2018-12-13 01:40:41 +00:00
<a-sub-menu v-on="listeners" :key="data.key">
<span slot="title"><a-icon type="mail" /><span>{{data.attrs.menuInfo.title}}</span></span>
<template v-for="item in data.attrs.menuInfo.children">
<a-menu-item v-if="!item.children" :key="item.key">
<a-icon type="pie-chart" />
<span>{{item.title}}</span>
</a-menu-item>
<sub-menu v-else :menuInfo="item" :key="item.key"/>
</template>
</a-sub-menu>
</template>