<template functional>
  <a-sub-menu
    v-bind="data.attrs"
    v-on="listeners"
    :key="data.attrs['menu-info'].name"
  >
    <span slot="title">
      <a-icon :type="data.attrs['menu-info'].meta.icon" />
      <span>{{ data.attrs['menu-info'].meta.title }}</span>
    </span>
    <template v-for="item in data.attrs['menu-info'].children">
      <a-menu-item
        v-if="!item.children"
        :key="data.attrs['menu-info'].path+'/'+item.path"
      >
        <span>{{ item.meta.title }}</span>
      </a-menu-item>
      <sub-menu
        v-else
        :menu-info="item"
        :key="item.key"
      />
    </template>
  </a-sub-menu>
</template>
