<template>
  <div class="homeWrap" v-loading="loading">
    <el-container>
      <Menu></Menu>
      <el-main>
        <HeaderCom @setLoding="setLoding" />
        <!-- 主体内容-->
        <div class="">
          <transition name="slide-fade">
            <router-view />
          </transition>
        </div>
      </el-main>
    </el-container>
  </div>
</template>

<script>
import HeaderCom from "@/components/HeaderCom.vue";
import Menu from "./components/Menu";

export default {
  components: {
    Menu,
    HeaderCom,
  },
  data() {
    return {
      loading: false,
    };
  },
  mounted() {},
  created() {},
  methods: {
    setLoding(state) {
      console.log(state);
      this.loading = state;
    },
  },
};
</script>

<style lang="scss" scoped>
.homeWrap {
  height: 100vh;
  .el-container {
    height: 100%;
  }
  .el-main {
    min-width: 800px;
    background-color: #f7f7f8;
    padding: 0;
  }
}

.slide-fade-enter-active {
  transition: all 0.3s ease-out;
}

.slide-fade-leave-active {
  transition: all 0.5s cubic-bezier(1, 0.5, 0.6, 1);
}

.slide-fade-enter-from,
.slide-fade-leave-to {
  transform: translateX(50px);
  opacity: 0;
}
</style>
