feat
This commit is contained in:
27
.kilo/command/lint-fix.md
Normal file
27
.kilo/command/lint-fix.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# /lint-fix Command
|
||||
|
||||
Run linting and auto-fix code style issues.
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
/lint-fix [path]
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
- `path`: Optional file or directory path (defaults to current working directory)
|
||||
|
||||
## What This Command Does
|
||||
|
||||
1. Runs `pnpm lint:eslint --fix` to fix ESLint issues
|
||||
2. Runs `pnpm lint:prettier --write` to fix Prettier formatting
|
||||
3. Reports any remaining issues that need manual fixing
|
||||
|
||||
## Example
|
||||
|
||||
```
|
||||
/lint-fix src/views/ops/pages/dc/url-harvest/
|
||||
```
|
||||
|
||||
Fixes lint issues in the url-harvest module.
|
||||
40
.kilo/command/new-api.md
Normal file
40
.kilo/command/new-api.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# /new-api Command
|
||||
|
||||
Create a new API module with standard interfaces and functions.
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
/new-api <module-name> [base-path]
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
- `module-name`: The API module name (e.g., `url-device`, `server`, `alert`)
|
||||
- `base-path`: Optional API base path (defaults to `/DC-Control/v1/{module-name}`)
|
||||
|
||||
## What This Command Does
|
||||
|
||||
1. Creates API file: `src/api/ops/{module-name}.ts`
|
||||
|
||||
2. Generates standard interfaces:
|
||||
- `{Module}Item` - Single item type
|
||||
- `{Module}ListResponse` - List response type
|
||||
- `{Module}ListParams` - Query parameters
|
||||
- `{Module}CreateData` - Create payload
|
||||
- `{Module}UpdateData` - Update payload
|
||||
|
||||
3. Generates standard functions:
|
||||
- `fetch{Module}List` - GET list with pagination
|
||||
- `fetch{Module}Detail` - GET single item
|
||||
- `create{Module}` - POST create
|
||||
- `update{Module}` - PUT update
|
||||
- `delete{Module}` - DELETE remove
|
||||
|
||||
## Example
|
||||
|
||||
```
|
||||
/new-api alert-template /Alert/v1/templates
|
||||
```
|
||||
|
||||
Creates `src/api/ops/alert-template.ts` with full CRUD API functions.
|
||||
33
.kilo/command/new-component.md
Normal file
33
.kilo/command/new-component.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# /new-component Command
|
||||
|
||||
Create a new global reusable component.
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
/new-component <component-name> [type]
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
- `component-name`: The component name (e.g., `status-badge`, `time-picker`)
|
||||
- `type`: Optional component type (dialog, drawer, form, display, chart)
|
||||
|
||||
## What This Command Does
|
||||
|
||||
1. Creates component file: `src/components/{component-name}/index.vue`
|
||||
|
||||
2. Generates template following Arco Design patterns:
|
||||
- Props definition with TypeScript types
|
||||
- Emits definition with typed events
|
||||
- Scoped styles with Less
|
||||
|
||||
3. Optionally registers in `src/components/index.ts` for global use
|
||||
|
||||
## Example
|
||||
|
||||
```
|
||||
/new-component status-badge display
|
||||
```
|
||||
|
||||
Creates a display component for showing status with color-coded badges.
|
||||
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.
|
||||
23
.kilo/command/type-check.md
Normal file
23
.kilo/command/type-check.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# /type-check Command
|
||||
|
||||
Run TypeScript type checking on the project.
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
/type-check
|
||||
```
|
||||
|
||||
## What This Command Does
|
||||
|
||||
1. Runs `vue-tsc --noEmit` to check TypeScript types
|
||||
2. Reports type errors with file locations and line numbers
|
||||
3. Helps catch type issues before build
|
||||
|
||||
## Example
|
||||
|
||||
```
|
||||
/type-check
|
||||
```
|
||||
|
||||
Checks all TypeScript files for type errors.
|
||||
Reference in New Issue
Block a user