<template>
  <Card title="项目信息">
    <div class="container">
      <div class="list">
        <div class="list-item" v-for="(item, index) in list" :key="index">
          <span class="label">{{ item.name }}</span>
          <span class="value">{{ item.content }}</span>
        </div>
      </div>
    </div>
  </Card>
</template>

<script>
import Card from '../components/Card'
export default {
  components: { Card },
  data: () => ({
    list: [
      { name: '项目位置', content: '测试测试测试测试' },
      { name: '项目位置', content: '测试测试测试测试' },
      { name: '项目位置', content: '测试测试测试测试' },
      { name: '项目位置', content: '测试测试测试测试' },
      { name: '项目位置', content: '测试测试测试测试' },
      { name: '项目位置', content: '测试测试测试测试' },
      { name: '项目位置', content: '测试测试测试测试' },
      { name: '项目位置', content: '测试测试测试测试' },
      { name: '项目位置', content: '测试测试测试测试' },
      { name: '项目位置', content: '测试测试测试测试' }
    ]
  })
}
</script>

<style lang="less" scoped>
.container {
  box-sizing: border-box;
  padding: 16px;
  width: 100%;
  height: 100%;

  .list {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    overflow-y: scroll;

    .list-item {
      display: flex;
      box-sizing: border-box;
      border-left: 4px solid #66d3d8;
      margin-bottom: 5px;
      padding: 10px 0;
      width: 100%;
      background-image: linear-gradient(to right, #3b7589, #212c3e);
      font-size: 12px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.3s;
      white-space: nowrap;

      &:hover {
        padding: 20px 0;
      }

      &:hover .value {
        color: #c2805f;
      }

      &:last-child {
        margin-bottom: 0;
      }

      .label,
      .value {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .label {
        box-sizing: border-box;
        width: 25%;
        padding-left: 20px;
      }

      .value {
        width: 75%;
      }
    }
  }
}
</style>
