Files
front/.kilo/command/new-page.md
2026-04-05 16:14:23 +08:00

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

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