feat(ai-skills): 添加 AI 全局技能库
创建 ai-skills/ 目录,包含所有 AI 助手共享的技能规范: - gitea-api.md: Gitea API 使用指南 - issue-workflow.md: 工单处理标准流程 - menu-config.md: 菜单配置规范 - commit-standards.md: 提交规范 - README.md: 使用说明
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
# 菜单配置规范
|
||||
|
||||
## 配置目录
|
||||
|
||||
```
|
||||
~/rhkj/spring-ai/config/menus/
|
||||
```
|
||||
|
||||
## 文件命名
|
||||
|
||||
- `{模块编码}.json`
|
||||
- 示例:`cashier.json`, `system.json`, `user.json`
|
||||
|
||||
## 文件格式
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "模块编码(与文件名一致)",
|
||||
"menus": [
|
||||
{
|
||||
"code": "菜单编码",
|
||||
"name": "菜单名称",
|
||||
"type": 1,
|
||||
"icon": "tabler:图标名",
|
||||
"sortNo": 0,
|
||||
"children": [
|
||||
{
|
||||
"code": "子菜单编码",
|
||||
"name": "子菜单名称",
|
||||
"type": 2,
|
||||
"icon": "tabler:图标名",
|
||||
"path": "/路由路径",
|
||||
"permission": "权限标识",
|
||||
"sortNo": 1,
|
||||
"buttons": [
|
||||
{
|
||||
"code": "btn:add",
|
||||
"name": "新增",
|
||||
"permission": "模块:功能:add"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## 字段说明
|
||||
|
||||
| 字段 | 类型 | 必填 | 说明 |
|
||||
|------|------|------|------|
|
||||
| `code` | string | ✅ | 菜单编码,唯一标识 |
|
||||
| `name` | string | ✅ | 菜单显示名称 |
|
||||
| `type` | int | ✅ | 1=目录, 2=菜单, 3=按钮 |
|
||||
| `icon` | string | ✅ | 图标(tabler: 前缀) |
|
||||
| `path` | string | 菜单必填 | 路由路径 |
|
||||
| `permission` | string | ✅ | 权限标识 |
|
||||
| `sortNo` | int | ✅ | 排序号,越小越靠前 |
|
||||
| `children` | array | 可选 | 子菜单列表 |
|
||||
| `buttons` | array | 可选 | 按钮权限列表 |
|
||||
|
||||
## 初始化方式
|
||||
|
||||
- 由**超级租户**读取 JSON 配置并初始化到数据库
|
||||
- 不需要编写 SQL 脚本或 Java 初始化代码
|
||||
- 修改 JSON 后提交到 spring-ai 仓库即可
|
||||
Reference in New Issue
Block a user