<template>
  <div class="right-row">
    <template v-for="index in data.len">
      <div class="right-item" @click="" style="background-image: url('../assets/adver.jpg')">
<!--        <img src="../assets/adver.jpg" alt=""/>-->
        <div class="item-btn">点击购买</div>
      </div>
    </template>
  </div>
</template>

<script setup lang="ts">
import {AdverRightData} from '../entity/AdverRightData.ts'
import {defineProps} from 'vue'

const props = defineProps({
  data: {
    type: AdverRightData,
    default: () => []
  }
})


</script>

<style scoped lang="scss">
* {
  display: block;
}

.right-row {
  display: flex;

  justify-content: space-between;
  height: 450px;

  .right-item {
    display: flex;
    justify-content: space-between;
    width: 300px;
    height: 450px;

    img {
      margin: 0;
      width: 300px;
    }

    .item-btn {
      position: absolute;
      margin: 350px auto 28px auto;
      background: white;
      width: 168px;
      height: 38px;
      line-height: 38px;
      border-radius: 15px;
    }

    &:hover {
      &::after {
        display: block;
      }
    }

    &::after {
      content: '';
      display: none;
      position: absolute;
      width: 300px;
      height: 450px;
      background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4));

    }

  }
}
</style>