feat(tab): format 可拿到子 relation 解析名(批量,无 N+1)

tab 字段的 relation 子字段(如 sellType.goods)原只有 id,format 显示不了关联名。
新增 populateTabRelations:批量(每个关联模块一次 $in via crud.list)解析子 relation 的
labelKey 名,挂到 item.__tabRel[fieldKey][childKey],作为 format 第二参 relLabels 传入;
不污染 tab 本体(避免回灌进库),响应末尾删除 __tabRel。
This commit is contained in:
2026-06-29 16:56:45 +08:00
parent 4b51d31e9f
commit bc54b475cf
3 changed files with 61 additions and 4 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "shrimp-server",
"version": "0.6.4",
"version": "0.6.5",
"description": "Shrimp 框架后端 — 声明式字段驱动的 Node.js 管理后台框架(Express + Mongoose + JWT)",
"main": "dist/main/index.js",
"types": "dist/main/index.d.ts",