<template>
  <div class="album">
    <scroll-view class="content" scroll-y>
      <div class="filter-box">
        <div class="active">全部</div>
        <div v-for="(v, i) in filterList" :key="i">{{ v.text }}({{ v.value }})</div>
      </div>
      <div class="card-wrap">
        <card v-for="v in 13" :key="v" />
      </div>
    </scroll-view>
    <div class="back">
      <button>返回预订</button>
    </div>
  </div>
</template>

<script setup>
import card from './card.vue';
const filterList = [
  {
    text: '家人',
    value: 183,
  },
  {
    text: '们',
    value: 5,
  },
  {
    text: '谁',
    value: 5,
  },
  {
    text: '懂啊',
    value: 514,
  },
  {
    text: '其他',
    value: 514,
  },
  {
    text: '其他',
    value: 514,
  },
  {
    text: '其他',
    value: 514,
  },
  {
    text: '其他',
    value: 514,
  },
  {
    text: '其他',
    value: 514,
  },
  {
    text: '其他',
    value: 514,
  },
];
</script>

<style lang="scss" scoped>
uni-page-body {
  height: 100%;
}
.album {
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: #f3f3f3;
  .content {
    padding: 10px 5px;
    box-sizing: border-box;
    flex-grow: 1;
    height: 69px;
    .filter-box {
      display: flex;
      background-color: #fff;
      padding: 10px;
      gap: 10px;
      flex-wrap: wrap;
      div {
        padding: 8px;
        color: #3d3d3d;
        font-size: 8px;
        border-radius: 8px;
        background-color: #eeeeee;
      }
      .active {
        color: #fa5151;
        background: rgba(250, 81, 81, 0.2);
      }
    }
    .card-wrap {
      margin-top: 5px;
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 5px;
    }
  }
}
.back {
  background-color: #fff;
  padding: 20px 0 34px;
  box-shadow: 0px -4px 8px 0px rgba(0, 0, 0, 0.12);
  button {
    width: 345px;
    height: 44px;
    border-radius: 34px;
    background-color: #fa5151;
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
  }
}
</style>
