react-phone-apps/.blueprint/modules/shared-utils.md
lanrtop a0929de768 chore: 初始化项目结构与蓝图
- 配置 pnpm workspace monorepo 基础结构
- 初始化 .blueprint/ 蓝图:6 个业务模块、21 张任务卡
- 目标:Z Fold 6 折叠屏不动产物品摸底统计 App(React Native + Expo)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 15:23:39 +09:00

37 lines
1.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: shared-utils
name: 共享工具函数库
area: shared
status: concept
---
## 概述
跨 app 复用的纯函数工具集,以 packages/utils 形式发布到 workspace 内部。不依赖 React可在任何环境使用。
## 任务卡
### 💭 搭建工具库骨架
- status: concept
- complexity: S
- files: packages/utils/package.json, packages/utils/src/index.ts
- acceptance: packages/utils 可被 workspace 内任意包通过 @repo/utils 引入,导出类型声明文件
### 💭 格式化工具集
- status: concept
- complexity: S
- files: packages/utils/src/format.ts
- acceptance: 提供日期格式化、数字格式化(货币/百分比)、手机号脱敏等常用函数,每个函数有单元测试
### 💭 本地存储工具
- status: concept
- complexity: S
- files: packages/utils/src/storage.ts
- acceptance: 封装 localStorage/sessionStorage支持 JSON 序列化和过期时间TypeScript 泛型推导
### 💭 HTTP 请求工具
- status: concept
- complexity: M
- files: packages/utils/src/request.ts
- acceptance: 基于 fetch 封装,支持请求/响应拦截器、统一错误处理、超时控制,返回类型安全的 Promise