<template>
  <div class="cxt">
    <page-header v-if="action && !custom"></page-header>
    <router-view :key="$route.fullPath"/>
  </div>

</template>
<script>
import PageHeader from "./components/PageHeader"

export default {
  name: "",
  components: {
    PageHeader
  },
  data() {
    return {
      action:false
    }
  },
  computed: {
    im() {
      return this.$route.meta.im
    },

    custom(){
      return this.$route.meta.custom
    },
    activity() {
      return this.$route.meta.activity
    }
  },
  watch: {
        $route(to, from) {
            console.log("to:::::::::::",to)
            // to 和 from 都是 路由信息对象
            if(to.path=='/login'){
                this.action = false
            }else{
              this.action = true
            }
  
        } 
}
}
</script>
<style>
#nav {
  padding: 30px;
}

#nav a {
  font-weight: bold;
  color: #2c3e50;
}

#nav a.router-link-exact-active {
  color: #42b983;
}
ul {
  padding-inline-start: 0px;
}

ul li {
  list-style-type: none;
}
.mr10 {
  margin-right: 10px;
}
* {
  margin: 0;
  padding: 0;
}
html,
body {
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
}
.cxt {
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.fontE1 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fontE2 {
  display: -webkit-box;
  word-break: break-all;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
}

::-webkit-scrollbar-track {
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
  background-color: rgba(246, 248, 250, 0.3);
}
::-webkit-scrollbar {
  width: 8px;
  background-color: #fff;
}
::-webkit-scrollbar-track-piece {
  background-color: #fff;
}
::-webkit-scrollbar:horizontal {
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background-color: #ccd0d8;
  border-radius: 4px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}
.btn{
  cursor:pointer;
  background-color: #5379F9;
  padding: 6px;
  margin-right: 5px;
  color: #fff;
  border-radius:5px;
}
</style>
<style lang="less" >
.el-select__popper {
  .el-select-dropdown {
    position: initial;
    border: none;
    margin: 0;
  }
}
</style>
<style>
@import "./assets/css/style.less";
</style>
