feat(list): 列表服务端导出 (csv/xlsx/json) + 导出按钮 + 对象级权限门#2114
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
…ermission gate ObjectGrid/ListView render an export menu when the view opts in via exportOptions; selecting a format streams the file from the backend GET /data/:object/export (data-objectstack export download) so large result sets format server-side with readable, type-aware cells and a locale-matched header row. Export is gated on object-level operations.export so views can't expose data the object forbids. Closes #2111
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
Closes #2111
补齐 ListView / ObjectGrid 的服务端导出能力,配合后端导出路由。
改了什么
exportOptions(['csv','xlsx','pdf','json'])开启后,ObjectGrid/ListView 渲染「导出」菜单;选格式后从后端GET /data/:object/export流式下载文件(data-objectstack导出下载),大结果集在服务端格式化为可读、类型感知的单元格,表头随 locale。operations.export约束,视图不能暴露对象本身禁止导出的数据。types增补导出相关字段(exportOptions/operations.export等)。exportDownload.test.ts、exportGate.test.tsx、exportServer.test.tsx,以及 ListView 测试补充。验证
pnpm --filter @object-ui/plugin-grid --filter @object-ui/data-objectstack --filter @object-ui/plugin-list test→ plugin-grid 100 / data-objectstack 220 / plugin-list 136 passed。crm_opportunity.xlsx(正确 MIME),表头中文、与列头一致。配套后端
objectstack-ai/framework#2487(导出路由 + 类型感知格式化 + 表头本地化)。