This commit is contained in:
2026-04-05 16:14:23 +08:00
parent 9936b2b92c
commit 33d7460ea0
19 changed files with 1515 additions and 2 deletions

51
.kilo/command/new-page.md Normal file
View File

@@ -0,0 +1,51 @@
# /new-page Command
Create a new page module with standard structure.
## Usage
```
/new-page <module-name> <category>
```
## Parameters
- `module-name`: The module name (e.g., `url-harvest`, `server`, `database`)
- `category`: The category directory (e.g., `dc`, `monitor`, `netarch`, `report`, `system-settings`)
## What This Command Does
1. Creates directory structure:
```
src/views/ops/pages/{category}/{module-name}/
index.vue
components/
FormDialog.vue
Detail.vue
config/
columns.ts
search-form.ts
```
2. Creates API file:
```
src/api/ops/{module-name}.ts
```
3. Generates template code following project patterns:
- Main page with SearchTable component
- CRUD dialog with form validation
- Detail drawer for viewing records
- Table columns configuration
- Search form configuration
- API interfaces and functions
## Example
```
/new-page asset dc
```
Creates `src/views/ops/pages/dc/asset/` with full CRUD functionality.