create-module
星标14
分支5
更新时间2026年5月13日 05:37
创建新业务模块时使用
安装
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
SKILL.md
readonly菜单
创建新业务模块时使用
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Create, analyze, proofread, and modify Office documents (.docx, .xlsx, .pptx) using the officecli CLI tool. Use when the user wants to create, inspect, check formatting, find issues, add charts, or modify Office documents.
tm-ui 组件 API 与源码定位。仅在需要核对某个 tm 组件的 props、events、slots、ref 方法或源码路径时使用;不要用于通用页面开发、样式规范或业务逻辑问题
移动端页面开发规范。开发 UI 界面时使用
数据库建表规范。创建新表 SQL 时必须遵循;SQL 建完后必须继续阅读 table-config skill 来生成 {mod}.ts 配置
系统字典和业务字典配置。SQL 中有 dict: 或 dictbiz: 标注的字段时使用
仅在代码已写完、需要查库验证数据写入结果时使用。不要用于探索数据库结构或代替阅读代码
| name | create-module |
| description | 创建新业务模块时使用 |
src/tables/{mod}/
├── {mod}.sql # 表结构
└── {mod}.ts # 表配置
{mod} 在 src/tables/ 下唯一,不与现有模块重名。src/tables/{mod}/{mod}.sqlsrc/tables/{mod}/{mod}.tssrc/tables/tables.ts 注册:import { defineConfig } from "../config.ts";
import base from "./base/base.ts";
import {mod} from "./{mod}/{mod}.ts";
export default defineConfig({
...base,
...{mod},
});
src/tables/{mod}/base_menu.{mod}.sql.csvid,parent_id,lbl,route_path,is_home_hide,is_enabled,is_hidden,order_by
{uuid},,模块名称,,0,1,0,60000
{uuid},{parent_uuid},子菜单,/{mod}/{table},0,1,0,60001
parent_id 为空表示根菜单is_hidden=1, is_enabled=0 表示隐藏菜单 (通常用于被其他页面内联查看的子表)base_tenant_menu 和 base_role_menu 文件,它们会在 npm run importCsv 时自动生成base_menu_lang, 国际化菜单仅在启用 i18n 时需要, 大部分系统不需要模块名: ec(电商)
// src/tables/ec/ec.ts
import { defineConfig } from "../../config.ts";
export default defineConfig({
// 订单
ec_order: { /* 订单表配置 */ },
// 订单明细
ec_order_detail: { /* 订单明细配置 */ },
});