Commit Graph
4 Commits
Author SHA1 Message Date
wc24 09ad43007a feat(tab): 类型可清空(clearable=!required)+ 空状态
FieldTab: 类型 select 非必填可清空 → type=null、整个 tab 置空、分支消失。去掉 innerValue/
initValue/onMounted 那套强制默认(空状态由 isEmpty 配 required 决定)。配合后端递归 isEmpty。
2026-06-30 16:52:09 +08:00
wc24 35abfd831c feat(tab): 显示搬前端,递归渲染子字段组件(替代后端 _label 串)
FieldTab.display 不再吃 displayLabel 字符串,改为渲染选中分支的子字段(各自 display 组件):
relation 子→查 refs 出可点名、number→数字、嵌套 tab→再递归。配 shrimp-server v0.6.9
的 refs 下钻,嵌套关联名自动有。ShrimpTable displayLabel 绑定去掉 tab。
2026-06-29 21:30:48 +08:00
wc24 8ac1427015 feat(tab): 表格列显示后端 stringify 文本(displayLabel=${key}_label)
配合 shrimp-server v0.6.3:tab 字段本体端到端是对象(编辑回显正常),
表格展示改用后端算好的 ${key}_label 字符串,与 relation/textarea 的 _label 约定一致。
FieldTab.display 优先渲染 displayLabel,无则回退旧的对象标签逻辑。
2026-06-29 15:47:29 +08:00
wc24 4cb3bb8d75 feat: shrimp-admin v0.1.0 — 从 hand-admin 抽离的框架前端
Shrimp 框架前端 — 一种消费 ShrimpServer + ShrimpTable 契约的经典 Vue3 +
Element Plus 实现。不是框架本身,只是按 shrimp-server 约定写的一份参考解法。

包含:
- ShrimpClient + VueAdmin(factory:createShrimpAdmin)
- 5 个 Shrimp* 组件 + 10 个内置 Field*.vue + PowerTree + LangSwitch
- 4 个内置模块:user / role / operationLog / FieldRelativeTime
- 完整后台壳 views(layout/login/sideM/topbar/userbar/navMenu/App/404/logo)
- composables/useTableUrlSync, locales(zh-cn/en 框架默认), style 全套

API 改造:
- createShrimpAdmin({ config, moduleSources, customFields, locales }) factory
- vueAdmin 改为 Proxy 单例,createShrimpAdmin 调用前访问会抛错
- import.meta.glob 业务字段/模块由消费侧传入(vite 静态扫描机制限制)
- 框架默认 locales 与消费侧 locales 在 i18n 初始化时合并

源码 ship 不打包,消费侧靠 vite 直接吃 .ts/.vue。
2026-05-23 21:01:33 +08:00