feat: 实现双前端架构 - Blazor+Known 和 Vue3

Task 4.3 更新 - 双前端项目:

1. Blazor + Known 3.5.7 (管理端):
   - 添加 Known 3.5.7 NuGet 包
   - 更新 Program.cs 配置 Known 服务
   - 保留 Blazor Server 架构

2. Vue3 + Element Plus (用户端):
   - 创建 CodePlay.Web Vue3 项目
   - 基于 vue-next-admin 风格设计
   - 技术栈:Vue 3.4 + TypeScript + Vite 5
   - 集成 Element Plus UI 组件库
   - 使用 Pinia 状态管理
   - 配置 Vue Router 路由
   - 实现 Converter 代码转换页面
   - 配置反向代理到后端 API (端口 5000)

项目结构:
- CodePlay.WebUI/ - Blazor + Known 管理端
- CodePlay.Web/ - Vue3 + Element Plus 用户端
- CodePlay.Web/ - 包含完整的 Vue3 项目结构
  - src/views/Converter.vue - 主转换页面
  - src/router/ - 路由配置
  - src/App.vue - 根组件
  - 支持 npm run dev 启动开发服务器

前端特性:
- 响应式布局 (El-Row/El-Col)
- 代码编辑器 (双栏对比)
- 语言选择器
- 验证轮次配置
- TODO 和问题列表展示
- 一键复制结果
- 实时错误提示
Co-authored-by: monkeycode-ai <monkeycode-ai@chaitin.com>
This commit is contained in:
monkeycode-ai
2026-06-03 08:39:48 +00:00
parent 4ed56f46e2
commit 78caed7b21
22 changed files with 480 additions and 394 deletions
+4
View File
@@ -4,6 +4,10 @@
<ProjectReference Include="..\CodePlay.Core\CodePlay.Core.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Known" Version="3.5.7" />
</ItemGroup>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
+4
View File
@@ -1,5 +1,6 @@
using CodePlay.WebUI.Components;
using CodePlay.Core.Services;
using Known.Extensions;
var builder = WebApplication.CreateBuilder(args);
@@ -10,6 +11,9 @@ builder.Services.AddRazorComponents()
// 注册核心转换服务
builder.Services.AddSingleton<ConversionService>();
// 添加 Known 服务
builder.Services.AddKnown();
var app = builder.Build();
// Configure the HTTP request pipeline.