- 后台全面引入 Naive UI 组件库,统一 UI 规范 - 前台 usePublicApi 切换到 API 调用(GET /api/content/[key]) - 前后台数据源统一(site_content 表) - 产品线统一管理(tour/camp/course 三套编辑器) - 产品数据归一化(itinerary/faq/pricing 格式统一) - 表单提交 API 改写入 submissions 表 - 新增 submissions 标记已读 API - site-content PUT 支持 upsert - 修复前台 bug(stories 路由冲突、占位符警告、selector breadcrumb) - 消除 PageHero 类型警告(useSEO reactive 修复) - 25 个前台页面全部 HTTP 200,展示效果不变 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
176 行
3.6 KiB
Vue
176 行
3.6 KiB
Vue
<template>
|
||
<section class="section section--gray">
|
||
<div class="container">
|
||
<CommonSectionTitle :title="title" :subtitle="subtitle" />
|
||
<div class="timeline-wrapper">
|
||
<div class="timeline">
|
||
<div v-for="v in timeline" :key="v.version" class="version-block">
|
||
<div class="version-dot" :class="{ 'version-dot--first': v.version === timeline[0].version }"></div>
|
||
<div class="version-header">
|
||
<span class="version-tag">{{ v.version }}</span>
|
||
<span class="version-date">{{ v.date }}</span>
|
||
</div>
|
||
<h4 class="version-title">{{ v.title }}</h4>
|
||
<ul class="change-list">
|
||
<li
|
||
v-for="(c, i) in v.changes"
|
||
:key="i"
|
||
:class="'change-' + c.type"
|
||
>{{ c.text }}</li>
|
||
</ul>
|
||
<div v-if="expandedVersion === v.version" class="version-reason">
|
||
{{ v.reason }}
|
||
</div>
|
||
<button
|
||
class="reason-toggle"
|
||
@click="expandedVersion = expandedVersion === v.version ? '' : v.version"
|
||
>
|
||
{{ expandedVersion === v.version ? '收起' : '为什么这样改?' }}
|
||
</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</template>
|
||
|
||
<script setup>
|
||
defineProps({
|
||
timeline: { type: Array, required: true },
|
||
title: { type: String, default: '历史版本' },
|
||
subtitle: { type: String, default: 'V1到V8的完整迭代记录' },
|
||
})
|
||
|
||
const expandedVersion = ref('')
|
||
</script>
|
||
|
||
<style lang="less" scoped>
|
||
.timeline-wrapper {
|
||
max-width: 800px;
|
||
margin: 0 auto;
|
||
}
|
||
|
||
.timeline {
|
||
position: relative;
|
||
padding-left: 24px;
|
||
|
||
&::before {
|
||
content: '';
|
||
position: absolute;
|
||
left: 3px;
|
||
top: 8px;
|
||
bottom: 8px;
|
||
width: 1px;
|
||
background: linear-gradient(180deg, @color-primary, @color-border);
|
||
}
|
||
}
|
||
|
||
.version-block {
|
||
position: relative;
|
||
padding-bottom: @space-xl;
|
||
|
||
&:last-child {
|
||
padding-bottom: 0;
|
||
}
|
||
}
|
||
|
||
.version-dot {
|
||
position: absolute;
|
||
left: -24px;
|
||
top: 6px;
|
||
width: 7px;
|
||
height: 7px;
|
||
border-radius: 50%;
|
||
background: @color-border;
|
||
}
|
||
|
||
.version-dot--first {
|
||
background: @color-primary;
|
||
}
|
||
|
||
.version-header {
|
||
display: flex;
|
||
align-items: baseline;
|
||
gap: @space-sm;
|
||
margin-bottom: @space-xs;
|
||
}
|
||
|
||
.version-tag {
|
||
font-size: @font-size-lg;
|
||
font-weight: @font-weight-bold;
|
||
color: @color-text-primary;
|
||
}
|
||
|
||
.version-date {
|
||
font-size: @font-size-sm;
|
||
color: @color-text-muted;
|
||
}
|
||
|
||
.version-title {
|
||
font-size: @font-size-base;
|
||
font-weight: @font-weight-medium;
|
||
color: @color-text-secondary;
|
||
margin: 0 0 @space-md;
|
||
}
|
||
|
||
.change-list {
|
||
list-style: none;
|
||
padding: 0;
|
||
margin: 0 0 @space-sm;
|
||
}
|
||
|
||
.change-list li {
|
||
font-size: @font-size-sm;
|
||
line-height: @line-height-loose;
|
||
color: @color-text-secondary;
|
||
padding-left: 18px;
|
||
position: relative;
|
||
|
||
&::before {
|
||
position: absolute;
|
||
left: 0;
|
||
font-size: 12px;
|
||
font-weight: @font-weight-bold;
|
||
}
|
||
}
|
||
|
||
.change-add::before {
|
||
content: '+';
|
||
color: @color-primary;
|
||
}
|
||
|
||
.change-remove::before {
|
||
content: '−';
|
||
color: @color-text-muted;
|
||
}
|
||
|
||
.change-update::before {
|
||
content: '△';
|
||
color: @color-accent;
|
||
}
|
||
|
||
.version-reason {
|
||
font-size: @font-size-sm;
|
||
color: @color-text-muted;
|
||
line-height: @line-height-loose;
|
||
padding: @space-md @space-lg;
|
||
background: @color-bg-white;
|
||
border-radius: @border-radius-sm;
|
||
border-left: 3px solid @color-primary;
|
||
margin-bottom: @space-xs;
|
||
}
|
||
|
||
.reason-toggle {
|
||
background: none;
|
||
border: none;
|
||
color: @color-primary;
|
||
font-size: @font-size-xs;
|
||
cursor: pointer;
|
||
padding: 0;
|
||
|
||
&:hover {
|
||
text-decoration: underline;
|
||
}
|
||
}
|
||
</style>
|