<template>
  <AppCard :title="title">
    <template #header-aside><nuxt-link :to="baseUrl" v-if="baseUrl">查看更多+</nuxt-link></template>
    <div class="project-list">
      <div class="project-item" v-for="(item, index) in list" :key="index">
        <AppLink :data="item"><img :src="item.imgUrl"/></AppLink>
      </div>
    </div>
  </AppCard>
</template>
<script>
import AppCard from '@/components/AppCard.vue'
import AppLink from '@/components/Link.vue'

export default {
  name: 'ProjectCard',
  props: { list: { type: Array, default: () => [] }, title: String, baseUrl: String },
  components: { AppCard, AppLink },
  data() {
    return {}
  }
}
</script>

<style lang="scss">
.project-list {
  padding-bottom: 70px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  row-gap: 20px;
  column-gap: 20px;
}
.project-item {
  background-color: #fff;
  img {
    width: 100%;
  }
  &:hover {
    box-shadow: 0px 1px 24px rgba(0, 0, 0, 0.11);
  }
}
</style>
