liuyun 60501eac20 chore: archive fe-admin-user-page change + sync user spec to main specs
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-11 13:26:18 +08:00

1.2 KiB
Raw Permalink Blame History

1. 类型

  • 1.1 src/types/crud.ts:JsonSchema/JsonSchemaProperty/TableColumn/PageResult/PageQuery 类型

2. 基础组件(src/components/ty-*.vue,自动导入)

  • 2.1 ty-form:按 JSON Schema 渲染字段(select/switch/input-number/password/textarea/input)+ 校验 + expose validate/resetFields + readOnly/showOn
  • 2.2 ty-search-form:行内搜索 + 折叠/展开(collapseCount 默认 2)+ 查询/重置置右
  • 2.3 ty-table:列配置(text/tag/datetime/formatter)+ 分页 + #actions 操作列插槽
  • 2.4 ty-form-dialog:弹窗 + schema 表单 + 校验提交(v-model:visible + mode)

3. 整页组件

  • 3.1 ty-crud:组合搜索/工具栏/表格/弹窗/删除,操作列数据驱动(actions 内置/自定义),超过 collapseCount 折叠为「更多」

4. 用户管理页

  • 4.1 src/pages/system/user/index.vue:用 ty-crud + JSON Schema + 内联数据(setTimeout)实现搜索/列表/分页/新增/编辑/删除/重置密码
  • 4.2 删除 src/api/user.ts(不建 mock 模块)

5. 验证

  • 5.1 pnpm type-check 与 pnpm build-only 通过
  • 5.2 页面交互(搜索/分页/增删改/重置密码/状态标签)在 dev 下可验收