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

Open
#9 0 comments 0 reactions 0 assignees View on GitHub

@linuxsuren-fs is already working on this.

Since Nov 14, 2026.

  • #21 by @linuxsuren-fs — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
20/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript, vite

Research direction

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.

Written by the indexing model from the issue text.

Description

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 待确认)。

Dominant language
No language data
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from LinuxSuRen/tick-flow

All issues in LinuxSuRen/tick-flow

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.