<!--
 * @Author: 曹捷
 * @Date: 2021-01-10 16:22:35
 * @LastEditors: 曹捷
 * @LastEditTime: 2022-01-06 11:29:59
 * @Description: fileContent
-->
<template>
  <span v-if="icon">
    <!-- <svg-icon class="menu-icon p-r-5" :icon-class="icon" /> -->
    <span class="icon iconfont menu-icon p-r-5 " :class="iconName"></span>

  </span>
  <span v-if="title" slot="title">{{ title }}</span>
</template>

<script>
export default {
  name: 'MenuItem',
  functional: true,
  props: {
    icon: {
      type: String,
      default: ''
    },
    title: {
      type: String,
      default: ''
    }
  },
  computed: {
    iconName () {
      return `icon-${this.icon}`
    }
  }
}
</script>
<style lang="less">
.menu-icon {
  font-size: 18px;
}
</style>
