<!--
 * @Author: 纪泽龙 jizelong@qq.com
 * @Date: 2026-01-12 14:23:40
 * @LastEditors: 纪泽龙 jizelong@qq.com
 * @LastEditTime: 2026-01-15 14:38:19
 * @FilePath: /huaxindd-web/src/views/Ind2/components/Bottom.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div class="bottom">
    <div class="l" v-if="left != 0" @click="left += 152"></div>
    <div
      class="r"
      v-if="left != -(itemArr.length - 3) * 152"
      @click="left -= 152"
    ></div>

    <div class="container">
      <div class="container-scroll" :style="{ left: left + 'px' }">
        <div
          class="item"
          :class="{ active: active == item }"
          v-for="item in itemArr"
          :key="item"
          @click="active = item"
        >
          <div class="text">{{ item }}</div>
          <div class="ac" :class="{ active: active == item }"></div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "",
  data() {
    return {
      left: 0,
      changeW: 152,
      itemArr: ["1", "2", "3", "4", "5", "6"],
      active: "",
    };
  },
  methods: {},
};
</script>
<style lang="scss" scoped>
.bottom {
  position: absolute;
  bottom: 10px;
  left: 50%;
  margin-left: -343px;
  width: 686px;
  height: 50px;
  // display: flex;
  // justify-content: space-between;
  background: url("~@/assets/bigwindowImg/ind3Img/bigBg.png") no-repeat center center;
  display: flex;
  align-items: center;
  .l,
  .r {
    position: absolute;
    cursor: pointer;
    transition: all 0.5s;
    top: 18px;

    &:hover {
      opacity: 0.8;
    }
  }
  .l {
    left: 88px;
    width: 20px;
    height: 14px;
    background: url("~@/assets/bigwindowImg/ind3Img/l.png") no-repeat center center;
  }
  .r {
    right: 88px;
    width: 20px;
    height: 14px;
    background: url("~@/assets/bigwindowImg/ind3Img/r.png") no-repeat center center;
  }
  .container {
    width: 432px;
    height: 28px;
    // background: red;
    margin: 0 auto;
    overflow: hidden;

    .container-scroll {
      position: relative;
      // left: 0;
      transition: all 0.5s;

      display: flex;
      // width: 1000px;
      .item {
        flex-shrink: 0;
        width: 128px;
        height: 28px;
        margin-right: 24px;
        position: relative;
        text-align: center;
        line-height: 28px;
        background: url("~@/assets/bigwindowImg/ind3Img/boxbg.png") no-repeat center center;
        color: #fff;
        font-size: 14px;
        cursor: pointer;
        &.active {
          background: rgba(0, 0, 0, 0);
        }
        .text {
          position: absolute;
          width: 100%;
          height: 100%;
          text-align: center;
          line-height: 28px;
          left: 0;
          top: 0;
          z-index: 99;
        }
        .active {
          width: 128px;
          height: 28px;
          background: url("~@/assets/bigwindowImg/ind3Img/active.png") no-repeat center
            center;
          position: absolute;
          top: 0;
          left: 0;
          // transition: all 0.5s;
          opacity: .8;
        }

      }
    }
  }
}
</style>
