cloudroam
2025-06-06 4d8420e51aa39dd4c8bb49ae98c05aaf2479fcb1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<template>
    <view class="card-container">
      <image class="card-bg" :src="image" mode="aspectFill" />
  
      <view class="card-content">
        <text class="card-title">{{ title }}</text>
        <text class="card-subtitle">{{ subtitle }}</text>
  
        <view class="card-footer">
          <up-icon name="clock" size="20" color="#fff" />
          <text class="card-footer-text">{{ readTime }}</text>
        </view>
      </view>
    </view>
  </template>
  
  <script setup lang="ts">
  
  interface Props {
    image: string;
    title: string;
    subtitle?: string;
    readTime?: string;
  }
  
  const props = defineProps<Props>();
  </script>
  
  <style scoped lang="scss">
  .card-container {
    position: relative;
    width: 100%;
    height: 400rpx;
    border-radius: 20rpx;
    overflow: hidden;
    margin-bottom: 20rpx;
  }
  
  .card-bg {
    width: 100%;
    height: 100%;
    border-radius: 20rpx;
  }
  
  .card-content {
    position: absolute;
    bottom: 20rpx;
    left: 20rpx;
    right: 20rpx;
    color: #fff;
  }
  
  .card-title {
    font-size: 30rpx;
    font-weight: bold;
    margin-bottom: 10rpx;
    display: block;
  }
  
  .card-subtitle {
    font-size: 24rpx;
    opacity: 0.85;
    display: block;
    margin-bottom: 20rpx;
  }
  
  .card-footer {
    display: flex;
    align-items: center;
  }
  
  .card-footer-text {
    font-size: 22rpx;
    margin-left: 8rpx;
    opacity: 0.9;
  }
  </style>