🐛支持logo配置png图片

This commit is contained in:
chuzhixin 2020-10-03 12:41:20 +08:00
parent f7e3635070
commit 47a8be74c4
3 changed files with 98 additions and 7 deletions

View File

@ -0,0 +1,94 @@
<template>
<div :class="'logo-container-' + layout">
<router-link to="/">
<!-- 这里是logo变更的位置 -->
<vab-remix-icon v-if="logo" class="logo" :icon-class="logo" />
<span
class="title"
:class="{ 'hidden-xs-only': layout === 'horizontal' }"
:title="title"
>
{{ title }}
</span>
</router-link>
</div>
</template>
<script>
import { mapGetters } from "vuex";
import { logo } from "@/config/settings";
export default {
name: "Logo",
data() {
return {
title: this.$baseTitle,
};
},
computed: {
...mapGetters({
logo: "settings/logo",
layout: "settings/layout",
}),
},
};
</script>
<style lang="scss" scoped>
@mixin container {
position: relative;
height: $base-top-bar-height;
overflow: hidden;
line-height: $base-top-bar-height;
background: $base-menu-background;
}
@mixin logo {
display: inline-block;
width: 32px;
height: 32px;
margin-right: 5px;
color: $base-title-color;
vertical-align: middle;
}
@mixin title {
display: inline-block;
overflow: hidden;
font-size: 20px;
font-weight: 600;
line-height: 55px;
color: $base-title-color;
text-overflow: ellipsis;
white-space: nowrap;
vertical-align: middle;
}
.logo-container-horizontal {
@include container;
.logo {
@include logo;
}
.title {
@include title;
}
}
.logo-container-vertical {
@include container;
height: $base-logo-height;
line-height: $base-logo-height;
text-align: center;
.logo {
@include logo;
}
.title {
@include title;
max-width: calc(#{$base-left-menu-width} - 60px);
}
}
</style>

View File

@ -1,13 +1,13 @@
/**
* @copyright chuzhixin 1204505056@qq.com
* @description 公共布局导出已封装成npm便于此后在线升级当然也存在一定的弊端给开发者自定义增加了一定的困难如果您一定要进行高度自定义请仔细阅读VIP群文档layouts本地化篇
* @description 公共布局导出已封装成npm便于此后在线升级当然也存在一定的弊端给开发者自定义增加了一定的困难如果您一定要进行高度自定义请仔细阅读讨论群文档layouts本地化篇
*/
export { default as ColorfullIcon } from "zx-layouts/ColorfullIcon";
export { default as RemixIcon } from "zx-layouts/RemixIcon";
export { default as VabDrag } from "zx-layouts/Drag";
export { default as VabPermissions } from "zx-layouts/Permissions";
export { default as VabQueryForm } from "zx-layouts/VabQueryForm/export";
export { default as Logo } from "zx-layouts/Logo";
export { default as Logo } from "./Logo";
export { default as Avatar } from "zx-layouts/Avatar";
export { default as Ad } from "./Ad";
export { default as AppMain } from "zx-layouts/AppMain";

View File

@ -35,7 +35,7 @@
<el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="8">
<el-card>
<div slot="header">
VIP群
VIP群自愿原则
<el-button style="float: right; padding: 3px 0" type="text">
100
</el-button>
@ -55,7 +55,7 @@
<el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="8">
<el-card>
<div slot="header">
开源版授权 商业用途 完全自定义版权
开源版不保留MIT协议变更作者自愿原则
<el-button style="float: right; padding: 3px 0" type="text">
299
</el-button>
@ -63,9 +63,6 @@
<div>
<ul>
<li>支持以上所有特权不包含VIP群</li>
<li>
可随意变更版权但仅限自己团队使用禁止恶意传播禁止二次售卖
</li>
<li>包含开源基础版授权与开源集成版授权</li>
<li>永久更新</li>
<li>提供低价外包合作机会</li>