Przeglądaj źródła

:bug:支持logo配置png图片

chuzhixin 4 lat temu
rodzic
commit
47a8be74c4

+ 94 - 0
src/layouts/components/Logo/index.vue

@@ -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>

+ 2 - 2
src/layouts/components/index.js

@@ -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";

+ 2 - 5
src/views/vab/more/index.vue

@@ -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>