<!--
 * @Descripttion:
 * @version:
 * @Author: 王三华
 * @Date: 2023-09-07 15:52:04
-->
<!--
 * @Descripttion:
 * @version:
 * @Author: kBank
 * @Date: 2022-10-24 10:45:39
-->
<template>
  <div class="topbox">
    <div
      class="levelList_i"
      :class="tabActive == item.path ? 'act' : ''"
      v-for="(item, index) in topList"
      :key="index"
      @click.prevent="handleLink(item)"
      v-show="item.changed"
    >
      {{ item.name }}
      <!-- <i
        v-show="isMouse == item.path && isMouse != tabActive"
        @click.prevent="delItem(item.path)"
        class="el-icon-error cha"
      ></i> -->
      <!-- <div class="li" :class="tabActive == item.path ? 'act1' : ''"></div> -->
    </div>
  </div>
</template>

<script>
export default {
  name: "topBar",
  props: {
    topList: {
      type: Array,
    },
    moren:{
        type:String
    }
  },
  data() {
    return {
      tabActive: this.moren,
    };
  },
  methods: {
    handleLink(item) {
      this.tabActive = item.path;
        this.$router.push({
          path:item.path
        });
    },
  },
};
</script>

<style scoped lang="scss">
.topbox {
  align-items: center;
  // height:74px;
  padding: 0px 0 3px 0;
  display: flex;
//   background: skyblue;
  .levelList_i {
    padding: 4px 15px;
    margin-left: 20px;
    position: relative;
    cursor: pointer;
    min-width: 88px;
    // height: 28px;
    border-radius: 17px;
    border: 1px solid #cccccc;
    font-size: 12px;
    font-family: MicrosoftYaHei;
    text-align: center;
    // line-height: 28px;
  }
}
.act {
  color: #FFFFFF;
  background: #C8161D;

}
.act1 {
  border-bottom: 3px solid #1890ff !important;
}
.cha {
  font-size: 16px;
  color: #606266;
  position: absolute;
  top: 10px;
}
.li {
  width: 40px;
  margin: 0 auto;
  border-bottom: 3px solid transparent;
}
</style>
