<template>
  <el-breadcrumb separator="/">
  <el-breadcrumb-item v-for="(item,index) in breadcrumbList" :key="index" :class="[index===breadcrumbList.length-1?'breadcrumb-item-last':index!==0&&!item.notLink?'breadcrumb-item-pointer':'breadcrumb-item']">
    <svg-icon :icon-class="item.icon" v-if="item.icon"></svg-icon>
    <span v-else @click="handleClickLink(item,index)">{{item.text}}</span>
  </el-breadcrumb-item>
</el-breadcrumb>
</template>

<script>
export default {
  components: {},
  name: "breadcrumb",
  props: ["breadcrumbList"],
  data() {
    return {
      
    };
  },
  watch: {},
  computed: {
  },
  methods: {
    // 点击面包屑 跳转
    handleClickLink(item,index){
        if(index!==0&&index!==this.breadcrumbList.length-1&&!item.notLink){
            // if(!item.url){
                this.$router.go(index-(this.breadcrumbList.length-1))
            // }
        }
    }
  },
  created() {
  },
  mounted() {
  },
  beforeDestroy() {
  },
};
</script>

<style lang="scss" scoped>

</style>