<template>
  <div>
    <div class="breadcrumb-component absolete">
      <span class="breadcrumb-iconfont">
        <i class="iconfont icon-dangqianweizhi"></i>
      </span>
      <a-breadcrumb class="breadcrumb" separator=">">
        <a-breadcrumb-item v-for="(item, index) in breadcrumbData" :key="index">
          <a :class="{ activeBread: index === 0 }" @click="goUrl(item.url)">{{
            item.name
          }}</a>
        </a-breadcrumb-item>
      </a-breadcrumb>
    </div>
    <div class="breadcrumb-component"></div>
  </div>
</template>

<script>
export default {
  name: "",
  props: {
    breadcrumbData: {
      type: Array,
      default() {
        return [];
      },
    },
  },
  methods: {
    goUrl(url) {
      this.$router.push({
        path: url,
      });
    },
  },
};
</script>

<style lang="less" scoped>
.breadcrumb-component {
  position: relative;
  height: 68px;
  .breadcrumb-iconfont {
    position: absolute;
    line-height: 56px;
    color: @primary-color;
    margin-left: 10px;
  }
  .breadcrumb {
    height: 56px;
    margin-left: 30px;
    line-height: 56px;
  }
}
.absolete {
  position: absolute;
  width: calc(100% + 24px);
  left: -12px;
  top: -12px;
  border-bottom: solid 12px #eef1f4;
  background: #fff;
  z-index: 1;
}
.activeBread {
  color: @primary-color;
}
</style>
