Some checks failed
Check / lint (push) Has been cancelled
Check / typecheck (push) Has been cancelled
Check / build (build, 18.x, ubuntu-latest) (push) Has been cancelled
Check / build (build, 18.x, windows-latest) (push) Has been cancelled
Check / build (build:app, 18.x, ubuntu-latest) (push) Has been cancelled
Check / build (build:app, 18.x, windows-latest) (push) Has been cancelled
Check / build (build:mp-weixin, 18.x, ubuntu-latest) (push) Has been cancelled
Check / build (build:mp-weixin, 18.x, windows-latest) (push) Has been cancelled
82 lines
2.3 KiB
Markdown
82 lines
2.3 KiB
Markdown
# Chat App
|
|
|
|
一个基于 Vue 3 + UniApp 的跨平台聊天应用。
|
|
|
|
A cross-platform chat application based on Vue 3 and UniApp.
|
|
|
|
## 技术栈 (Tech Stack)
|
|
|
|
- Vue 3
|
|
- UniApp
|
|
- Pinia
|
|
- TypeScript
|
|
- TMUI 组件库
|
|
- Wot Design Uni 组件库
|
|
- UnoCSS - 原子化 CSS 引擎
|
|
- Vite - 下一代前端构建工具
|
|
|
|
## 功能特性 (Features)
|
|
|
|
- 跨平台支持 (Cross-platform Support):
|
|
- H5
|
|
- App (iOS/Android)
|
|
|
|
- 核心功能 (Core Features):
|
|
- 即时通讯 (Real-time Communication)
|
|
- 群聊/私聊 (Group/Private Chat)
|
|
- 消息通知 (Message Notifications)
|
|
- 用户管理 (User Management)
|
|
- 文件传输 (File Transfer)
|
|
- 表情包支持 (Emoji Support)
|
|
## 开发环境搭建 (Development Setup)
|
|
|
|
1. 安装依赖 (Install Dependencies):
|
|
```bash
|
|
pnpm install
|
|
```
|
|
|
|
2. 环境运行 (Run Development Server):
|
|
```bash
|
|
# 测试环境
|
|
pnpm run test:h5
|
|
|
|
# 生产环境
|
|
pnpm run prod:h5
|
|
```
|
|
|
|
3. 打包构建 (Build for Production):
|
|
```bash
|
|
# 测试构建
|
|
pnpm run build:h5:test
|
|
|
|
# 生产构建
|
|
pnpm run build:h5:prod
|
|
```
|
|
|
|
## 项目结构 (Project Structure)
|
|
|
|
```
|
|
├── src/ # 源代码目录
|
|
│ ├── api/ # API 接口定义
|
|
│ ├── components/ # 公共组件
|
|
│ ├── pages/ # 页面文件
|
|
│ ├── static/ # 静态资源
|
|
│ ├── store/ # 状态管理
|
|
│ │ ├── auth/ # 认证相关状态
|
|
│ │ └── modules/ # 其他模块状态
|
|
│ ├── styles/ # 全局样式
|
|
│ ├── types/ # TypeScript 类型定义
|
|
│ └── utils/ # 工具函数
|
|
├── env/ # 环境变量配置
|
|
│ ├── .env.dev # 开发环境配置
|
|
│ └── .env.prod # 生产环境配置
|
|
├── public/ # 公共静态资源
|
|
├── .editorconfig # 编辑器配置
|
|
├── .npmrc # npm 配置
|
|
├── index.html # 入口 HTML
|
|
├── package.json # 项目依赖配置
|
|
├── tsconfig.json # TypeScript 配置
|
|
├── uno.config.js # UnoCSS 配置
|
|
├── vite.config.js # Vite 配置
|
|
└── README.md # 项目说明文档
|
|
``` |