34 lines
646 B
Vue
34 lines
646 B
Vue
|
|
<template>
|
||
|
|
<div>
|
||
|
|
<!--element icon-->
|
||
|
|
<i v-if="icon.includes('el-icon')" class="sub-el-icon" :class="icon"></i>
|
||
|
|
<!---非elemtnt icon-->
|
||
|
|
<SvgIcon v-else :icon="icon"></SvgIcon>
|
||
|
|
<span style="padding-left: 12px">{{ title }}</span>
|
||
|
|
</div>
|
||
|
|
</template>
|
||
|
|
<script setup>
|
||
|
|
import { defineProps } from "vue";
|
||
|
|
import SvgIcon from "../../../components/SvgIcon/index.vue";
|
||
|
|
|
||
|
|
defineProps({
|
||
|
|
title: {
|
||
|
|
type: String,
|
||
|
|
required: true
|
||
|
|
},
|
||
|
|
icon: {
|
||
|
|
type: String,
|
||
|
|
required: true
|
||
|
|
}
|
||
|
|
});
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<style lang="scss" scoped>
|
||
|
|
.el-menu--collapse span {
|
||
|
|
display: block;
|
||
|
|
width: 0px;
|
||
|
|
height: 0px;
|
||
|
|
overflow: hidden;
|
||
|
|
}
|
||
|
|
</style>
|