<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>
卡片cart
最新推荐文章于 2025-04-28 19:53:22 发布