为了端到端验证 Shrimp 框架,把 hand-admin 前端拷进 examples/basic-admin/web
作为临时演示用前端,@shrimp alias 直接指向同仓 src/,免构建。
修改要点:
- web/vite.config.ts: @shrimp 改成 ../../../src; proxy /admin-api 到 :3100
- web/tsconfig.json: 同步 @shrimp 路径; 删掉 hand-server-2 的 paths
- web/src/locales: 删掉 matter_*/zerobase 业务 key
- web/src/module: 删掉 matter_*/zerobase 业务 vue,只留 user/role/FieldRelativeTime
- examples/basic-admin/index.ts:
- mount 到 /admin-api/* 而不是 /api/*
- 加 /config /login /me 端点 (mock super-admin operator,固定 token)
- DemoShrimp 子类覆盖 getMenuTree 用模块自身 label
- MemoryShrimpCrud 的 getRelatedCrud 手动 wire 到 crudRegistry,
populate 才能跑 (后续 70→90 改进项)
curl 已验证 /config /login /me /product/list 全通,tagIds_label 正确旁挂。
28 lines
579 B
JSON
28 lines
579 B
JSON
{
|
|
"name": "shrimp-basic-admin-web",
|
|
"private": true,
|
|
"version": "0.0.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "vite build",
|
|
"preview": "vite preview"
|
|
},
|
|
"dependencies": {
|
|
"@element-plus/icons-vue": "^2.1.0",
|
|
"axios": "1.3.4",
|
|
"element-plus": "^2.10.4",
|
|
"vue": "^3.3.4",
|
|
"vue-i18n": "^9.1.9",
|
|
"vue-router": "4.1.6"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^20.8.3",
|
|
"@vitejs/plugin-vue": "^4.2.3",
|
|
"sass": "^1.89.2",
|
|
"typescript": "^5.0.2",
|
|
"vite": "^4.4.5",
|
|
"vue-tsc": "^1.8.5"
|
|
}
|
|
}
|