Commit 20b0f684 by zhengjie

新增网站logo显示,文件位于views/layout/components/Sidebar/index.vue

parent 779d7554
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1555468036837" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1314" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M977.066667 352 977.066667 352l-234.666667 213.333333 0 0C736 571.733333 725.333333 576 714.666667 576c-10.666667 0-19.2-4.266667-25.6-8.533333l0 0-192-149.333333 0 0c-10.666667-8.533333-17.066667-19.2-17.066667-34.133333 0-23.466667 19.2-42.666667 42.666667-42.666667 10.666667 0 19.2 4.266667 25.6 8.533333l0 0 164.266667 128 209.066667-189.866667 0 0c8.533333-6.4 17.066667-10.666667 27.733333-10.666667 23.466667 0 42.666667 19.2 42.666667 42.666667C992 332.8 985.6 343.466667 977.066667 352zM522.666667 256c-70.4 0-128-57.6-128-128 0-70.4 57.6-128 128-128s128 57.6 128 128C650.666667 198.4 593.066667 256 522.666667 256zM522.666667 85.333333c-23.466667 0-42.666667 19.2-42.666667 42.666667s19.2 42.666667 42.666667 42.666667 42.666667-19.2 42.666667-42.666667S546.133333 85.333333 522.666667 85.333333zM396.8 539.733333l234.666667 149.333333 0 0c12.8 8.533333 19.2 21.333333 19.2 36.266667 0 21.333333-17.066667 40.533333-38.4 42.666667l0 0-179.2 19.2L166.4 1013.333333l0 0C157.866667 1019.733333 149.333333 1024 138.666667 1024c-23.466667 0-42.666667-19.2-42.666667-42.666667 0-8.533333 2.133333-14.933333 6.4-21.333333l0 0 234.666667-405.333333 0 0c6.4-12.8 21.333333-21.333333 36.266667-21.333333C381.866667 533.333333 390.4 535.466667 396.8 539.733333L396.8 539.733333zM298.666667 789.333333l89.6-76.8 0 0c6.4-4.266667 14.933333-8.533333 23.466667-8.533333l0 0 72.533333-8.533333-96-59.733333L298.666667 789.333333zM302.933333 360.533333 302.933333 360.533333 138.666667 426.666667l78.933333 128 0 0c4.266667 6.4 6.4 14.933333 6.4 23.466667 0 23.466667-19.2 42.666667-42.666667 42.666667-14.933333 0-27.733333-8.533333-36.266667-19.2l0 0-106.666667-170.666667 0 0c-4.266667-6.4-6.4-14.933333-6.4-23.466667 0-17.066667 10.666667-34.133333 27.733333-40.533333l0 0 213.333333-85.333333c0 0 0 0 0 0l0 0 0 0c4.266667-2.133333 10.666667-2.133333 14.933333-2.133333 23.466667 0 42.666667 19.2 42.666667 42.666667C330.666667 337.066667 320 354.133333 302.933333 360.533333z" p-id="1315" fill="#e6e6e6"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1555466208830" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1499" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M640 192c53.02 0 96-42.98 96-96S693.02 0 640 0s-96 42.98-96 96 42.98 96 96 96zM323.38 634.94l-29.6 69.04H160c-35.34 0-64 28.66-64 64s28.66 64 64 64h154.9c38.5 0 73.16-22.88 88.22-58.18l17.58-41.04-21.34-12.6c-34.64-20.46-60.12-50.74-75.98-85.22zM864 447.98h-88.06l-52.12-106.5c-25-51.1-70.9-88.46-123.56-101.88l-142.16-42.28c-56.6-13.6-115.54-1.1-161.68 34.28l-79.34 60.82c-28.06 21.5-33.38 61.66-11.84 89.72s61.68 33.32 89.72 11.84l79.38-60.82c15.34-11.78 34.88-16 50.54-12.28l29.4 8.74-74.92 174.78c-25.24 58.96-2.62 128.02 52.6 160.62l169.96 100.34-54.94 175.46c-10.56 33.72 8.22 69.62 41.94 80.18 6.38 2 12.82 2.96 19.16 2.96 27.22 0 52.46-17.54 61.04-44.9l63.28-202.12c11.82-41.54-5.78-86.16-43.28-108.78l-122.48-72.28 62.62-156.56 40.54 82.86c16 32.68 49.84 53.78 86.22 53.78H864c35.34 0 64-28.66 64-64s-28.66-63.98-64-63.98z" p-id="1500" fill="#8a8a8a"></path></svg>
\ No newline at end of file
......@@ -124,3 +124,14 @@ a:hover {
line-height: 32px;
border-radius: 16px;
}
.logo-con{
height: 60px;
padding: 12px 0px 0px;
img{
height: 35px;
width: 138px;
display: block;
margin: 0 auto;
}
}
......@@ -13,7 +13,6 @@
<script>
import { Navbar, Sidebar, AppMain, TagsView } from './components'
import ResizeMixin from './mixin/ResizeHandler'
export default {
name: 'Layout',
components: {
......
......@@ -9,6 +9,15 @@
text-color="#bfcbd9"
active-text-color="#409EFF"
>
<!-- 修改logo -->
<el-menu-item :class="{'submenu-title-noDropdown':isCollapse}" index="99999999" style="pointer-events: none;">
<!-- 缩小时显示的logo,可以自定义,这里直接使用图标库中的 -->
<svg-icon v-if="isCollapse" icon-class="run" />
<!--正常状态下显示的-->
<div class="logo-con">
<img :src="logoImg">
</div>
</el-menu-item>
<sidebar-item v-for="route in permission_routers" :key="route.path" :item="route" :base-path="route.path"/>
</el-menu>
</el-scrollbar>
......@@ -17,9 +26,14 @@
<script>
import { mapGetters } from 'vuex'
import SidebarItem from './SidebarItem'
import logoImg from '@/assets/logo/logo.png'
export default {
components: { SidebarItem },
data() {
return {
logoImg: logoImg
}
},
computed: {
...mapGetters([
'permission_routers',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment