forked from mengyxu/noob-components
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
2.0 KiB
65 lines
2.0 KiB
|
3 months ago
|
# Fill plugs/element spec
|
||
|
|
|
||
|
|
## Goal
|
||
|
|
Analyze the `plugs/element/` directory and document Element Plus UI wrappers, formatters, validation rules, and message utilities.
|
||
|
|
|
||
|
|
## Context
|
||
|
|
|
||
|
|
### Project Overview
|
||
|
|
- **Type**: Vue 3 Component Library (Element Plus based)
|
||
|
|
- **Framework**: Vue 3 + TypeScript
|
||
|
|
- **UI Framework**: Element Plus
|
||
|
|
|
||
|
|
### Key Element Modules
|
||
|
|
| Module | File | Purpose |
|
||
|
|
|--------|------|---------|
|
||
|
|
| listTableDialog | plugs/element/listTableDialog.ts | List table dialog with ListTableProps interface |
|
||
|
|
| formatter | plugs/element/formatter.ts | Value formatting utilities |
|
||
|
|
| message | plugs/element/message.ts | Element Plus message wrapper |
|
||
|
|
| rule | plugs/element/rule.ts | Form validation rules |
|
||
|
|
|
||
|
|
### Rule Classes (from GitNexus)
|
||
|
|
- `Character`, `Email`, `Hexadecimal`, `IdCard`, `Ipv4`, `Ipv6`, `Latitude`, `Longitude`, `Name`, `Password`, `Phone`, `Username`, `SimpleCharacter`, `SimpleNumber`, `SimplePassword`, `SimpleRequired`
|
||
|
|
|
||
|
|
## Tools Available
|
||
|
|
|
||
|
|
### GitNexus MCP
|
||
|
|
| Tool | Purpose |
|
||
|
|
|------|---------|
|
||
|
|
| `gitnexus_query` | Find Element Plus wrapper patterns |
|
||
|
|
| `gitnexus_context` | View validation rule classes |
|
||
|
|
|
||
|
|
### ABCoder MCP
|
||
|
|
| Tool | Purpose |
|
||
|
|
|------|---------|
|
||
|
|
| `get_file_structure` | Get all nodes in element files |
|
||
|
|
|
||
|
|
## Files to Fill
|
||
|
|
|
||
|
|
1. **plugs/element/listTableDialog.ts** - Dialog component for list tables
|
||
|
|
- ListTableProps interface
|
||
|
|
- Options interface
|
||
|
|
|
||
|
|
2. **plugs/element/formatter.ts** - Value formatting
|
||
|
|
- Date formatting
|
||
|
|
- Number formatting
|
||
|
|
- Custom formatters
|
||
|
|
|
||
|
|
3. **plugs/element/message.ts** - Message utilities
|
||
|
|
- Success/Error/Warning/Info wrappers
|
||
|
|
|
||
|
|
4. **plugs/element/rule.ts** - Validation rules
|
||
|
|
- All rule classes and their patterns
|
||
|
|
|
||
|
|
## Acceptance Criteria
|
||
|
|
- [ ] Real code examples with file paths
|
||
|
|
- [ ] Interface/type definitions documented
|
||
|
|
- [ ] Validation rule patterns captured
|
||
|
|
- [ ] Usage patterns for each wrapper
|
||
|
|
- [ ] No placeholder text
|
||
|
|
|
||
|
|
## Technical Notes
|
||
|
|
- Element Plus components wrapped
|
||
|
|
- Validation follows Element Plus rule schema
|
||
|
|
- Message shortcuts for common operations
|