menuItem.vue 581 字节
Newer Older
Mr.奇淼('s avatar
Mr.奇淼( 已提交
1
<template>
Mr.奇淼('s avatar
Mr.奇淼( 已提交
2
  <el-menu-item :index="routerInfo.name">
3
    <el-icon v-if="routerInfo.meta.icon">
P
piexlmax 已提交
4 5
      <component :is="routerInfo.meta.icon" />
    </el-icon>
6
    <template #title>
P
piexlmax 已提交
7
      <span class="gva-menu-item-title">{{ routerInfo.meta.title }}</span>
8
    </template>
9
  </el-menu-item>
Mr.奇淼('s avatar
Mr.奇淼( 已提交
10 11 12 13 14 15 16
</template>

<script>
export default {
  name: 'MenuItem',
}
</script>
17 18 19 20 21 22 23 24 25 26 27 28

<script setup>
defineProps({
  routerInfo: {
    default: function() {
      return null
    },
    type: Object
  }
})
</script>

P
piexlmax 已提交
29
<style lang="scss" scoped>
周雪 已提交
30 31 32
// .gva-menu-item-title {
//   min-width: 160px;
// }
P
piexlmax 已提交
33
</style>