<template>
  <div v-if="currentPaths.length > 0" class="link-titles">
    <span class="breadcrumb-tips">
      <i class="icon icon-home"></i>
      <span>当前所在位置：</span>
    </span>
    <el-breadcrumb class="breadcrumb-list">
      <!-- <el-breadcrumb-item :to="{ path: '/questions/tips' }"
        >首页</el-breadcrumb-item
      > -->
      <el-breadcrumb-item
        v-for="(item, index) in currentPaths"
        :key="item + index"
      >
        {{ item }}
      </el-breadcrumb-item>
    </el-breadcrumb>
  </div>
</template>

<script>
import { mapState } from "vuex";

export default {
  name: "LinkTitles",
  computed: {
    ...mapState(["currentPaths"]),
  },
};
</script>
