1.2 KiB
1.2 KiB
1. 类型
- 1.1
src/types/crud.ts:JsonSchema/JsonSchemaProperty/TableColumn/PageResult/PageQuery 类型
2. 基础组件(src/components/ty-*.vue,自动导入)
- 2.1
ty-schema-form:按 JSON Schema 渲染字段(select/switch/input-number/password/textarea/input)+ 校验 + expose validate/resetFields + readOnly/showOn - 2.2
ty-search-form:行内搜索 + 查询/重置 - 2.3
ty-table:列配置(text/tag/datetime/formatter)+ 分页 +#actions操作列插槽 - 2.4
ty-form-dialog:弹窗 + schema 表单 + 校验提交(v-model:visible + mode)
3. 整页组件
- 3.1
ty-crud:组合搜索/工具栏/表格/弹窗/删除,props 传 columns/searchSchema/formSchema/list/create/update/remove,#row-actions插槽扩展
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 下可验收