<template>
  <div class="content">
    <div class="content-top">
      <span class="first-menu-name menu-item" :class="menuName.length==1 ? 'menu-name': ''">{{menuName[0]}}</span>
      <span v-show="menuName[1]" class="arrow">></span>
      <span class="menu-item" :class="menuName.length==2 ? 'menu-name': ''">{{menuName[1]}}</span>
      <span v-show="menuName[2]" class="arrow">></span>
      <span class="menu-item" :class="menuName.length==3 ? 'menu-name': ''">{{menuName[2]}}</span>
    </div>
    <router-view class="content-wrap"></router-view>
  </div>
</template>
<script>
export default {
  name: "Content",
  components:{
  },
  data() {
    return {
      menuName: []
    };
  },
  watch: {
      '$route' (to, from) {     
        this.menuName = JSON.parse(sessionStorage.getItem('menuNameArr'))
      }
    },
  mounted() {
    this.menuName = JSON.parse(sessionStorage.getItem('menuNameArr'))
  },
  methods: {
   
  }
};
</script>
<style scoped lang="stylus">
.content {
  width: 100%;
  height: 100%;
  background: #060D2C;
  overflow: hidden;
}
.content-top {
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 10;
  background: #06214D;
  font-size: 14px;
}
.first-menu-name {
  border-left: 3px solid #0185EA;
  padding-left: 6px;
  margin-left: 15px;
  color: #F5F5F5;
}
.arrow {
  margin: 0 10px;
  color: #F5F5F5;
}
.menu-item {
  color: #F5F5F5;
}
.menu-name {
  color: #4FAFF9;
  margin-right: 10px;
  text-decoration: underline;
}
.content-wrap {
  padding: 10px;
  padding-right: 5px;
  // background: red;
}
</style>