Navbar.vue 1.16 KB
<template>
  <div class="navbar" :class="slideClass">
    <logo />
    <Menu class="main-menu" />
    <NavbarRight />
  </div>
</template>
<script>
import { mapState } from 'vuex'
import Logo from './Logo'
import Menu from './menu'
import NavbarRight from '../components/NavbarRight'
export default {
  components: { Logo, Menu, NavbarRight },
  computed: {
    ...mapState({
      slideClass: state => state.settings.slideClass,
    })
  }
}
</script>
<style lang="scss" scoped>
@import "~@/styles/variables.scss";

.navbar {
  height: $headerHeight;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid #dcdfe6;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  .main-menu {
    flex: 1;
    overflow: hidden;
    height: $headerHeight;
  }

  &.lightWhite {
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  &.dark {
    background: #161618;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);

    ::v-deep .right-menu .right-menu-item {
      color: rgba(255, 255, 255, 0.85);
    }
  }

  ::v-deep .right-menu {
    margin-left: auto;
    float: none;
    height: $headerHeight;
    flex-shrink: 0;
  }
}
</style>