卡片cart

<template>
    <div>第二题</div>
    <el-row>
      <el-col
        v-for="(card, index) in cards"
        :key="index"
        :span="5"
        :offset="index > 0 ? 2 : 0"
      >
        <el-card :body-style="{ padding: '0px' }">
          <img
            :src="card.image"
            class="image"
          />
          <div style="padding: 14px">
            <div class="title">
              <span>关联课程资源</span>
              <span>{{ card.resourceCount }}个</span>
            </div>
            <div class="center">
              <span>一级学科类型:{{ card.firstSubject }}</span>
              <span>二级学科类型:{{ card.secondSubject }}</span>
              <span>简介:{{ card.introduction }}</span>
            </div>
            <div class="buttons">
              <el-button type="info" disabled>{{ card.buttonText }}</el-button>
              <el-divider />
            </div>
            <div>
              <el-button type="primary">查看</el-button>
              <el-button type="primary">编辑</el-button>
              <el-button type="primary">删除</el-button>
            </div>
          </div>
        </el-card>
      </el-col>
    </el-row>
  </template>
  
  <script setup>
  import { ref } from 'vue'
  
  const currentDate = ref(new Date())
  
  const cards = [
    {
      image: 'https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png',
      resourceCount: 0,
      firstSubject: '科普教育',
      secondSubject: '信息技术',
      introduction: '英语阅读',
      buttonText: '英语阅读'
    },
    {
      image: 'https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png',
      resourceCount: 0,
      firstSubject: '科普教育',
      secondSubject: '信息技术',
      introduction: '数学计算',
      buttonText: '数学计算'
    }
  ]
  
  </script>
  
  <style lang="scss" scoped>
  .image {
    width: 100%;
    display: block;
  }
  
  .title {
    display: flex;
    justify-content: space-between;
    align-content: center;
  }
  
  .center {
    display: flex;
    flex-direction: column;
  }
  </style>

  • 9
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值