Files
ProxyPool/WebUI/src/components/PageHeader.vue
祀梦 38bd66128b 重构: 迁移后端代码到 app 目录,前端移动到 WebUI,添加完整测试套件
主要变更:
- 后端代码从根目录迁移到 app/ 目录
- 前端代码从 frontend/ 重命名为 WebUI/
- 更新所有导入路径以适配新结构
- 提取公共 API 响应函数到 app/api/common.py
- 精简验证器服务代码
- 更新启动脚本和文档

测试:
- 新增完整测试套件 (tests/)
- 单元测试: 模型、仓库层
- 集成测试: 覆盖所有 22+ API 端点
- E2E 测试: 4个完整工作流场景
- 添加 pytest 配置和测试运行脚本
2026-04-04 13:32:36 +08:00

82 lines
1.4 KiB
Vue

<template>
<el-card class="header-card" shadow="hover">
<h1 class="title">
<el-icon v-if="icon" :size="24" class="title-icon">
<component :is="icon" />
</el-icon>
<span class="title-text">{{ title }}</span>
</h1>
<p v-if="subtitle" class="subtitle">{{ subtitle }}</p>
</el-card>
</template>
<script setup>
/**
* 页面标题组件 - 冷灰紫主题
* @description 统一的页面头部展示
*/
defineProps({
/** 页面标题 */
title: {
type: String,
required: true
},
/** 图标组件或组件名称 */
icon: {
type: [String, Object],
default: null
},
/** 副标题 */
subtitle: {
type: String,
default: ''
}
})
</script>
<style scoped>
.header-card {
margin-bottom: 20px;
border-radius: var(--radius-lg);
background: var(--surface);
border: 1px solid var(--border);
}
.header-card:hover {
border-color: var(--border-light);
}
.title {
display: flex;
align-items: center;
gap: 10px;
margin: 0;
color: var(--text-primary);
font-size: 20px;
font-weight: 600;
letter-spacing: 0.5px;
}
.title-icon {
color: var(--primary);
flex-shrink: 0;
filter: drop-shadow(0 0 8px rgba(146, 124, 255, 0.3));
}
.title-text {
line-height: 1.2;
}
.subtitle {
margin: 8px 0 0;
color: var(--text-muted);
font-size: 14px;
}
@media (max-width: 768px) {
.title {
font-size: 18px;
}
}
</style>