982 B
982 B
/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
- Creates directory structure:
src/views/ops/pages/{category}/{module-name}/
index.vue
components/
FormDialog.vue
Detail.vue
config/
columns.ts
search-form.ts
- Creates API file:
src/api/ops/{module-name}.ts
- 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.