自学内容网 自学内容网

若依修改标题太长

 

标题太长,ruoyi-ui\src\layout\components\Sidebar\Logo.vue修改下面11111和22222拼接为标题

<template>
  <div class="sidebar-logo-container" :class="{'collapse':collapse}" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
    <transition name="sidebarLogoFade">
      <router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
        <!-- <img v-if="logo" :src="logo" class="sidebar-logo" /> -->
        <div class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">
          <div class="titie_text">11111</div>
          <div>22222</div>
        </div>
      </router-link>
      <router-link v-else key="expand" class="sidebar-logo-link" to="/">
        <!-- <img v-if="logo" :src="logo" class="sidebar-logo" /> -->
        <div class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">
          <div class="titie_text">11111</div>
          <div>22222</div>
        </div>
      </router-link>
    </transition>
  </div>
</template>

<script>
  import logoImg from '@/assets/logo/logo.png'
  import variables from '@/assets/styles/variables.scss'

  export default {
    name: 'SidebarLogo',
    props: {
      collapse: {
        type: Boolean,
        required: true
      }
    },
    computed: {
      variables() {
        return variables;
      },
      sideTheme() {
        return this.$store.state.settings.sideTheme
      }
    },
    data() {
      return {
        title: '1111122222',
        logo: logoImg
      }
    }
  }
</script>

<style lang="scss" scoped>
  .sidebarLogoFade-enter-active {
    transition: opacity 1.5s;
  }

  .sidebarLogoFade-enter,
  .sidebarLogoFade-leave-to {
    opacity: 0;
  }

  .sidebar-logo-container {
    position: relative;
    width: 100%;
    height: 150px;
    line-height: 50px;
    background: #322b3a;
    text-align: center;
    overflow: hidden;

    & .sidebar-logo-link {
      height: 100%;
      width: 100%;

      & .sidebar-logo {
        width: 26px;
        height: 26px;

        vertical-align: middle;
        margin-right: 12px;
      }

      & .sidebar-title {
        display: inline-block;
        margin: 0;
        margin-top: 60px;
        color: #fff;
        font-weight: 600;
        width: 200px;
        line-height: 25px;
        font-size: 18px;
        font-family: '微软雅黑';
        // font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
        vertical-align: middle;
      }
    }

    &.collapse {
      .sidebar-logo {
        margin-right: 0px;
      }
    }
    .titie_text{
      font-family: '微软雅黑';
      font-weight: bold;
      font-size: 20px;
      height: 40px;
    }
  }
</style>


原文地址:https://blog.csdn.net/lgq1368853532/article/details/140524130

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!