搭建前端工程骨架(Vite + Vue 3 + TypeScript + Element Plus)

未关闭
#9 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

@linuxsuren-fs 已经在做这个了。

开始于 2026年11月14日。

  • #21 来自 @linuxsuren-fs —— 未关闭

评估

难度
4/5
预计耗时
3-5 天
新手友好度
20/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
typescript, vite

调研方向

Read the frontend architecture in #5 and the overall plan in #1, then inspect the existing web/ directory and the linked pull request #21 to see what is already underway. The issue lists the expected files and behaviors, including api.ts, stores/, style.css, and router.ts; completion requires the stated build check, a login page available through pnpm dev, and /api/me integration with #8.

由索引模型根据 Issue 内容生成。

描述

help wanted P0

Background

TickFlow 前端基座。前端架构见 #5,总体方案见 #1。本 issue 只落地工程骨架与通用层,不实现业务页面。

Technical requirement

  • 位置 web/,Vite + Vue 3 + TypeScript + Element Plus(+ @element-plus/icons-vue);
  • package.json scripts 仅 dev / build / preview;开发期 Vite proxy 把 /api 转发到后端;
  • 落地 #5 的目录结构与通用层:
    • api.ts:单文件 fetch 封装(15s 超时、ApiError(code)、{data} 解包、token 存取、401 跳登录);
    • stores/:me、tenant(品牌 / 主题注入)、notifications(未读数)模块级 reactive store;
    • style.css:全局设计令牌(--color-*、--space-*、中文字体栈)与基础样式;
    • router.ts + 登录页骨架 + 三大区(portal / console / admin)空布局与登录守卫(vue-router 引入以 #5 中 @LinuxSuRen 的确认为准);
  • 组件规范:<script setup lang="ts">,ref 优先,派生值 computed,定时器 / 监听器 onUnmounted 清理;
  • 极简依赖:除选型表列出的依赖外,新增任何依赖需在 PR 中说明理由。

Expect

  • vue-tsc -b && vite build 通过;pnpm dev 可打开登录页骨架;
  • 与 #8 的后端联调 /api/me(可先返回 mock 结构)。

Potential TODO list

  • Vite + Vue 3 + TS 工程初始化
  • api.ts 封装与错误码映射表骨架
  • 设计令牌 style.css
  • 登录页 + 路由骨架 + 登录守卫
  • me / tenant store 与主题注入

依赖

#5 评审通过(vue-router 待确认)。

主要语言
没有语言数据
星标
0
派生
1
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

LinuxSuRen/tick-flow 的其他 Issue

查看 LinuxSuRen/tick-flow 的全部 Issue

相似的 Issue

更多 DevTools Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。