MastersDetail.vue 1.89 KB
<!--
 * @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>