perf: icon

This commit is contained in:
xiaoxian521
2021-10-22 20:38:19 +08:00
parent 7e6768208d
commit eb8d3ca96e
9 changed files with 81 additions and 39 deletions

View File

@@ -15,6 +15,7 @@ import { algorithm } from "/@/utils/algorithm";
import screenfull from "../screenfull/index.vue";
import { useRoute, useRouter } from "vue-router";
import { storageSession } from "/@/utils/storage";
import Icon from "/@/components/ReIcon/src/Icon.vue";
import { deviceDetection } from "/@/utils/deviceDetection";
import globalization from "/@/assets/svg/globalization.svg";
import { usePermissionStoreHook } from "/@/store/modules/permission";
@@ -117,7 +118,7 @@ onMounted(() => {
<template>
<div class="horizontal-header">
<div class="horizontal-header-left" @click="backHome">
<i class="fa fa-optin-monster"></i>
<Icon svg :width="35" :height="35" content="team-iconshuiyuandi" />
<h4>{{ title }}</h4>
</div>
<el-menu

View File

@@ -1,5 +1,6 @@
<script setup lang="ts">
import { getCurrentInstance } from "vue";
import Icon from "/@/components/ReIcon/src/Icon.vue";
const props = defineProps({
collapse: Boolean
});
@@ -18,8 +19,8 @@ const title =
class="sidebar-logo-link"
to="/"
>
<i class="fa fa-optin-monster"></i>
<h1 class="sidebar-title">{{ title }}</h1>
<Icon svg :width="35" :height="35" content="team-iconshuiyuandi" />
<span class="sidebar-title">{{ title }}</span>
</router-link>
<router-link
v-else
@@ -28,8 +29,8 @@ const title =
class="sidebar-logo-link"
to="/"
>
<i class="fa fa-optin-monster"></i>
<h1 class="sidebar-title">{{ title }}</h1>
<Icon svg :width="35" :height="35" content="team-iconshuiyuandi" />
<span class="sidebar-title">{{ title }}</span>
</router-link>
</transition>
</div>
@@ -39,28 +40,24 @@ const title =
.sidebar-logo-container {
position: relative;
width: 100%;
height: 50px;
height: 48px;
text-align: center;
overflow: hidden;
.sidebar-logo-link {
height: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin-top: 5px;
.sidebar-title {
display: inline-block;
margin: 0;
color: #1890ff;
font-weight: 600;
font-size: 20px;
margin-top: 16px;
margin-top: 10px;
font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
}
.fa-optin-monster {
font-size: 30px;
color: #1890ff;
margin-top: 5px;
}
}
.collapse {