| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- <template>
- <section class="product-cards multi-layout">
- <div v-for="(card, index) in cards" :key="index" class="product-card-wrapper">
- <div class="product-card">
- <h3 class="card-title">{{ card.title }}</h3>
- <p class="card-description">{{ card.description }}</p>
- <div class="card-features">
- <span v-for="(feature, idx) in card.features" :key="idx" class="feature-tag">{{ feature }}</span>
- </div>
- <div class="card-actions">
- <button class="btn-primary">更多详情</button>
- <button class="btn-secondary">0元体验</button>
- </div>
- </div>
- <div v-if="index < cards.length - 1" class="divider"></div>
- </div>
- </section>
- </template>
- <script setup>
- defineProps({
- cards: {
- type: Array,
- required: true
- }
- })
- </script>
- <style scoped lang="scss">
- .multi-layout {
- max-width: 1200px;
- min-height: 474px;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .product-card-wrapper {
- display: flex;
- align-items: center;
- }
- .product-card {
- width: 266px;
- height: 336px;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- padding: 30px 0 35px 0;
- .card-title {
- font-family: 'Source Han Sans CN', sans-serif;
- font-size: 20px;
- font-weight: 500;
- line-height: 20px;
- color: #ffffff;
- margin: 0;
- text-align: center;
- }
- .card-description {
- width: 266px;
- color: rgba(255, 255, 255, 0.6);
- font-family: "Source Han Sans CN";
- font-size: 14px;
- font-style: normal;
- font-weight: 400;
- line-height: 24px;
- }
- .card-features {
- width: 266px;
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- .feature-tag {
- font-family: 'Source Han Sans CN', sans-serif;
- font-size: 14px;
- font-weight: 400;
- line-height: 14px;
- color: #9b71ff;
- margin-bottom: 12px;
- &:last-child {
- margin-bottom: 0;
- }
- }
- }
- .card-actions {
- width: 263px;
- display: flex;
- align-items: center;
- margin-top: 20px;
- .btn-primary {
- width: 120px;
- height: 40px;
- border-radius: 8px;
- background: linear-gradient(24.74deg, rgba(163, 157, 255, 1) 0%, rgba(125, 70, 255, 1) 100%);
- border: none;
- font-family: 'Source Han Sans CN', sans-serif;
- font-size: 14px;
- font-weight: 400;
- color: #ffffff;
- cursor: pointer;
- transition: opacity 0.3s ease;
- &:hover {
- opacity: 0.8;
- }
- }
- .btn-secondary {
- width: 120px;
- height: 40px;
- border-radius: 8px;
- border: 1px solid rgba(255, 255, 255, 0.5);
- background: rgba(255, 255, 255, 0.2);
- backdrop-filter: blur(15.2px);
- font-family: 'Source Han Sans CN', sans-serif;
- font-size: 14px;
- font-weight: 400;
- color: #ffffff;
- cursor: pointer;
- margin-left: 23px;
- transition: opacity 0.3s ease;
- &:hover {
- opacity: 0.8;
- }
- }
- }
- }
- .divider {
- width: 1px;
- height: 450px;
- background-color: rgba(255, 255, 255, 0.1);
- margin: 0 65.5px;
- }
- </style>
|