MastersDetail.vue
1.89 KB
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!--
* @Date: 2025-10-30 20:00:25
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-10-31 14:50:05
* @FilePath: /stdj_h5/src/views/MastersDetail.vue
* @Description: 文件描述
-->
<template>
<div class="masters-detail-container">
<section class="single-list">
<div class="item-card">
<img
:src="item.src"
:alt="item.title"
class="item-image"
/>
<div class="item-content">
<h3 class="item-title">{{ item.title }}</h3>
<p class="item-text">{{ item.description }}</p>
</div>
</div>
</section>
</div>
</template>
<script setup>
import { ref } from 'vue'
import { useTitle } from '@vueuse/core';
useTitle('三師七證 - 詳情')
const item = ref({
src: 'https://via.placeholder.com/300x400?text=三師七證',
title: '三師七證 - 詳情',
description: '三師七證是三師七證的詳情,包含三師七證的所有內容。'
})
</script>
<style scoped>
.masters-detail-container {
padding: 1.5rem;
background: #F2EBDB;
min-height: 100vh; /* 背景至少覆盖整个视口高度 */
width: 100%;
box-sizing: border-box;
}
.single-list {
display: flex;
flex-direction: column;
gap: 1rem;
margin-bottom: 1rem;
}
.item-card {
position: relative;
background: #fff;
border: 2px solid #6B4102;
overflow: hidden;
transition: transform 0.2s ease;
padding: 0.5rem;
}
.item-image {
width: 100%;
height: auto;
display: block;
}
.item-content {
padding: 0.5rem;
}
.item-title {
font-size: 1.2rem;
font-weight: 600;
color: #333;
line-height: 1.4;
margin-bottom: 0.5rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.item-text {
font-size: 1rem;
color: #666;
line-height: 1.4;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
</style>