756 B
756 B
/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
-
Creates component file:
src/components/{component-name}/index.vue -
Generates template following Arco Design patterns:
- Props definition with TypeScript types
- Emits definition with typed events
- Scoped styles with Less
-
Optionally registers in
src/components/index.tsfor global use
Example
/new-component status-badge display
Creates a display component for showing status with color-coded badges.