码农齐齐齐
2022-09-09 89946abb222981e075e52feb8a01e937f322db5b
src/views/layout/components/Header/index.vue
@@ -1,32 +1,40 @@
<template>
  <!-- 头部 -->
  <el-header>
    <!-- 展开控制按钮 -->
     <!-- <hamburger :is-active="opened" class="hamburger-container" @toggleClick="toggleSideBar" /> -->
     <!-- 右侧菜单 -->
    <div class="header-title">
      <div class="bell">
        <el-icon class="el-icon-bell" style="color: white"></el-icon>
  <div>
    <!-- 头部 -->
    <el-header>
      <!-- 右侧菜单 -->
      <div class="header-title">
        <div class="bell">
          <el-icon class="el-icon-bell" style="color: white"></el-icon>
        </div>
        <div class="userinfo">
          <div class="avatar"></div>
          <span class="username">admin</span>
        </div>
        <div class="loginout" @click="loginout">退出登录</div>
      </div>
      <div class="userinfo">
        <div class="avatar"></div>
        <span class="username">admin</span>
      </div>
      <div class="loginout">退出登录</div>
    </div>
  </el-header>
    </el-header>
    <NavBar />
  </div>
</template>
<script>
import hamburger from "@/components/hamburger"
import hamburger from "@/components/hamburger";
import NavBar from "../NavBar";
export default {
  data(){
  data() {
    return {
      opened:false
    }
      opened: false,
    };
  },
  components:{
    hamburger
  components: {
    hamburger,
    NavBar,
  },
  methods:{
    loginout(){
      this.$router.push({path:"/login"})
    }
  }
};
</script>