<template>
  <nav>
    <ul class="app-tab-nav">
      <li v-for="(item, index) in list" :key="index" :class="{ 'is-active': item.value === active }">
        <nuxt-link :to="item.path">{{ item.name }}</nuxt-link>
      </li>
    </ul>
  </nav>
</template>

<script>
export default {
  props: { list: { type: Array, default: () => [] }, active: { type: String } },
  data() {
    return {}
  }
}
</script>

<style lang="scss">
.app-tab-nav {
  display: flex;
  overflow-x: scroll;
  &::-webkit-scrollbar{
    display: none;
  }
  li {
    margin-left: 0.3rem;
    font-size: 0.14rem;
    line-height: 0.38rem;
    color: #333;
    a{
      white-space: nowrap;
    }
    &.is-active {
      border-bottom: 0.02rem solid #aa1941;
    }
  }
}
</style>
