<template>
  <div id="header">
    <div class="logo">青浦一张图</div>
    <div class="userdropdown">
        <User />
    </div>
    <div class="menu">
      <ul class="menu_ul">
        <li
          v-for="item in $store.state.menuList"
          :key="item.path"
          :class="{ active: $route.path == item.path }"
          @click="$router.push(item.path)"
        >
          {{ item.label }}
        </li>
      </ul>
    </div>
    
    <el-dialog v-model="dialogLoginVisible" width="500">
      <Login :close="closeLoginDialog" />
    </el-dialog>

  </div>
</template>

<script>
import User from "@/components/user/user.vue";
export default {
  components: {
    User,
  },
  data() {
    return {
    };
  },
  mounted() {},
  methods: {
  },
};
</script>

<style lang="less" scoped>
#header {
  width: 100vw;
  height: 70px;
  background: linear-gradient(180deg, #2c2f74, #494d98);
  color: #ffffff;
  margin: 0 auto;
  .logo {
    display: inline-block;
    height: 70px;
    width: 200px;
    text-align: center;
    line-height: 70px;
    font-size: 24px;
  }

  .menu {
    display: inline-block;
    float: right;
    .menu_ul {
      li {
        display: inline-block;
        height: 50px;
        width: fit-content;
        line-height: 50px;
        text-align: center;
        cursor: pointer;
        margin: 10px 20px;
        font-size: 20px;
        font-weight: bold;
      }

      li:hover {
        color: #00bbff;
      }

      li.active {
        color: #00bbff;
      }
    }
  }
}
.userdropdown {
    float: right;
    width: 150px;
    display: flex;
    align-items: center;
    height: 70px;
    justify-content: center;
    cursor: pointer;
    border: 0;
}
</style>
