feat
This commit is contained in:
51
.kilo/command/new-page.md
Normal file
51
.kilo/command/new-page.md
Normal 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.
|
||||
Reference in New Issue
Block a user