react-phone-apps/.blueprint/modules/category-management.md
lanrtop 3dbc6f0ff5 refactor: 标记点序号显示、布局叠加方式及照片选择器重构
- 标记点角标从物品数量改为按楼层顺序编号,角标背景色跟随标记颜色
- FoldableLayout 改为绝对定位叠加布局,移除 LayoutAnimation(解决 Android 地图渲染空白及卡顿)
- PhotoPicker 拆分为拍照/选图两个独立按钮;选图改用 expo-document-picker 绕过三星 Photo Picker 崩溃问题
- AndroidManifest 移除手动 FileProvider 声明(改由 Expo 插件自动注入)
- 同步更新蓝图文档:新增 category-management 模块、补全各模块已完成任务卡

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 02:17:34 +09:00

32 lines
1.5 KiB
Markdown
Raw 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: category-management
name: 物品分类管理
area: rn-app
status: done
---
## 概述
独立的「设置」Tab允许用户自定义物品分类标签增删改。分类数据存储在 SQLite categories 表,通过全局 CategoriesContext 供物品表单实时使用,替代原有硬编码枚举。
## 任务卡
### ✅ 分类数据库表与 CRUD
- status: done
- complexity: S
- files: apps/property-survey/src/db/categories.ts, apps/property-survey/src/db/schema.ts, apps/property-survey/src/db/database.ts
- acceptance: categories 表含 id / name / sort_order 三列;提供 getCategories / insertCategory / updateCategory / deleteCategory 四个函数App 首次启动时写入「家具、家电、电子、车辆、其他」五个默认分类
### ✅ 全局分类 Context
- status: done
- complexity: S
- files: apps/property-survey/src/features/settings/CategoriesContext.tsx, apps/property-survey/app/_layout.tsx
- acceptance: CategoriesProvider 在根布局包裹全树useCategories() 返回 `{ categories, reload }`categories 在分类增删改后自动刷新,物品表单的分类 chip 同步更新
### ✅ 设置页 UI分类增删改
- status: done
- complexity: M
- files: apps/property-survey/app/settings.tsx
- depends: category-management
- acceptance: 底部 Tab 新增「设置」入口列表展示当前所有分类支持点击铅笔图标内联重命名TextInput + 确认/取消);底部固定新增输入框 + 按钮;删除时弹确认框,说明已登记物品的分类标签不受影响