后端 moduleInfo 已经声明了字段、筛选、可用事件,ShrimpTable 要的只有一个 moduleKey,而 registerRoute 本来就把它当 props 传下去——「后端声明了模块, 前端就该渲染出来」是本包消费的契约,缺一个四行的壳不该让菜单点不开。 resolveVue 未命中时改为回落到 module/_default.vue,不再 warn+丢路由。 消费侧的 module/<key>.vue 仍按后缀优先命中,_default 本身也可被覆盖,纯增量。 顺带把 xlsx 补进 peerDependencies:ShrimpTable 是静态 import 它的, 漏装则 vite 直接起不来,而模板里一直没写。
45 lines
1.2 KiB
JSON
45 lines
1.2 KiB
JSON
{
|
|
"name": "shrimp-admin",
|
|
"version": "0.8.4",
|
|
"private": true,
|
|
"description": "Shrimp 框架前端 — 消费 ShrimpServer + ShrimpTable 契约的经典 Vue3 + Element Plus 实现",
|
|
"main": "src/index.ts",
|
|
"types": "src/index.ts",
|
|
"exports": {
|
|
".": {
|
|
"types": "./src/index.ts",
|
|
"default": "./src/index.ts"
|
|
},
|
|
"./style": "./src/style/style.scss",
|
|
"./package.json": "./package.json"
|
|
},
|
|
"files": [
|
|
"src",
|
|
"README.md"
|
|
],
|
|
"scripts": {
|
|
"check:contract": "node scripts/check-contract.mjs",
|
|
"sync:contract": "node scripts/check-contract.mjs --fix"
|
|
},
|
|
"peerDependencies": {
|
|
"vue": "^3.3.0",
|
|
"vue-router": "^4.0.0",
|
|
"vue-i18n": "^9.0.0",
|
|
"axios": "^1.0.0",
|
|
"element-plus": "^2.0.0",
|
|
"@element-plus/icons-vue": "^2.0.0",
|
|
"xlsx": "^0.18.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^20.0.0",
|
|
"typescript": "^5.3.0",
|
|
"vite": "^4.4.5",
|
|
"vue": "^3.3.4",
|
|
"vue-router": "^4.1.6",
|
|
"vue-i18n": "^9.1.9",
|
|
"axios": "^1.3.4",
|
|
"element-plus": "^2.10.4",
|
|
"@element-plus/icons-vue": "^2.1.0"
|
|
}
|
|
}
|