Files
WeChatDataAnalysis/frontend/components/wrapped/shared/WrappedCardShell.vue
2977094657 79da96b2d3 feat(wrapped-ui): 新增年度总结页面与热力图卡片
- 新增 /wrapped PPT 风格滑动浏览(封面 + 卡片页)

- 新增 Card#1 组件与 24×7 周-小时热力图可视化

- 首页新增年度总结入口;useApi 增加 getWrappedAnnual;补充 wrapped 背景纹理
2026-01-30 16:26:52 +08:00

55 lines
1.9 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<div v-if="variant === 'panel'" class="bg-white rounded-2xl border border-[#EDEDED] overflow-hidden">
<div class="px-6 py-5 border-b border-[#F3F3F3]">
<div class="flex items-start justify-between gap-4">
<div>
<div class="text-xs font-semibold tracking-[0.22em] text-[#00000066]">
CARD {{ String(cardId).padStart(2, '0') }}
</div>
<h2 class="mt-2 text-xl font-bold text-[#000000e6]">{{ title }}</h2>
<p v-if="narrative" class="mt-2 text-sm text-[#7F7F7F]">
{{ narrative }}
</p>
</div>
<slot name="badge" />
</div>
</div>
<div class="px-6 py-6">
<slot />
</div>
</div>
<!-- Slide 模式单张卡片占据全页面背景由外层年度总结统一控制 -->
<section v-else class="relative h-full w-full overflow-hidden">
<div class="relative h-full max-w-5xl mx-auto px-6 py-10 sm:px-8 sm:py-12 flex flex-col">
<div class="flex items-start justify-between gap-4">
<div>
<div class="text-xs font-semibold tracking-[0.22em] text-[#00000066]">
CARD {{ String(cardId).padStart(2, '0') }}
</div>
<h2 class="mt-2 text-2xl sm:text-3xl font-bold text-[#000000e6]">{{ title }}</h2>
<p v-if="narrative" class="mt-3 text-sm sm:text-base text-[#7F7F7F] max-w-2xl">
{{ narrative }}
</p>
</div>
<slot name="badge" />
</div>
<div class="mt-6 sm:mt-8 flex-1 flex items-center">
<div class="w-full">
<slot />
</div>
</div>
</div>
</section>
</template>
<script setup>
defineProps({
cardId: { type: Number, required: true },
title: { type: String, required: true },
narrative: { type: String, default: '' },
variant: { type: String, default: 'panel' } // 'panel' | 'slide'
})
</script>