<template>
|
<div class="list-container w-full h-full">
|
<el-scrollbar>
|
<el-row :gutter="20">
|
<el-col :span="6" v-for="item in dataList">
|
<el-card shadow="hover" class="list-card cursor-pointer" :body-style="{ padding: 0 }" @click="itemClick(item)">
|
<div class="img-container w-full">
|
<img src="@/assets/image/list-card-bg.jpg" class="w-full">
|
</div>
|
<div class="item-info p-3">
|
<div class="info-title font-bold">{{ item.title }}</div>
|
<div class="info-teacher flex text-sm text-gray-500">
|
<div class="info-label">主讲:</div>
|
<div class="info-text">{{ item.teacher }}</div>
|
</div>
|
<div class="info-time flex text-sm text-gray-500">
|
<div class="info-label">开始时间:</div>
|
<div class="info-text">{{ item.startTime }}</div>
|
</div>
|
<div class="info-time flex text-sm text-gray-500">
|
<div class="info-label">结束时间:</div>
|
<div class="info-text">{{ item.endTime }}</div>
|
</div>
|
</div>
|
</el-card>
|
</el-col>
|
</el-row>
|
</el-scrollbar>
|
</div>
|
</template>
|
|
<script setup>
|
import { ref } from 'vue';
|
import { Timer } from '@element-plus/icons-vue';
|
import { useRouter } from 'vue-router';
|
const router = useRouter();
|
|
const dataList = ref([
|
{
|
title: '测试1',
|
startTime: '2024-6-13 8:00',
|
endTime: '2024-6-13 8:00',
|
teacher: '测试测试',
|
roomName: 'test'
|
}
|
])
|
|
|
const itemClick = (item) => {
|
if(window.electron) {
|
window.electron.openNewWindow();
|
}
|
}
|
|
</script>
|
|
<style lang="scss" scoped>
|
.item {
|
width: 100%;
|
min-height: 120px;
|
}
|
|
.bottom-item {
|
margin-right: 30px;
|
}
|
|
.img-container {
|
object-fit: cover;
|
object-position: center;
|
width: 100%;
|
max-height: 160px;
|
overflow: hidden;
|
}
|
|
.list-card {
|
border-radius: 10px;
|
}
|
</style>
|