avue-form
$
npx mdskill add partme-ai/full-stack-skills/avue-formCreates dynamic forms with Avue Form in Vue apps using configuration-driven fields, validation, and event handling.
- Helps developers build forms with field types like input, select, date, and upload for Vue applications.
- Integrates with Avue Form library and depends on Vue.js for implementation.
- Uses predefined configurations for columns, rules, and layouts to generate form structures.
- Presents forms through Vue components with two-way data binding and event listeners.
SKILL.md
.github/skills/avue-formView on GitHub ↗
---
name: avue-form
description: "Builds configuration-driven dynamic forms with Avue Form, including field types (input, select, date, upload), validation rules, form groups, tabbed layouts, and event handling. Use when the user needs to create forms with Avue in Vue applications, implement form validation, or build dynamic multi-step forms."
license: Complete terms in LICENSE.txt
---
## When to use this skill
Use this skill whenever the user wants to:
- Create configuration-driven forms with Avue Form
- Define form fields with types (input, select, date, checkbox, upload, etc.)
- Implement form validation rules
- Build dynamic forms, form groups, or tabbed form layouts
- Handle form submit, reset, and field change events
## How to use this skill
### Workflow
1. **Install** - `npm install @avue/form` and register with `Vue.use(Avue)`
2. **Define option** - Configure columns with labels, props, types, and rules
3. **Bind v-model** - Two-way bind the form data object
4. **Handle events** - Listen for @submit, @reset-change, and field-level events
### Quick-Start Example: Form with Validation
```vue
<template>
<avue-form :option="option" v-model="form" @submit="handleSubmit" @reset-change="handleReset">
</avue-form>
</template>
<script>
export default {
data() {
return {
form: {},
option: {
submitText: 'Save',
column: [
{
label: 'Name',
prop: 'name',
type: 'input',
span: 12,
rules: [{ required: true, message: 'Name is required', trigger: 'blur' }]
},
{
label: 'Role',
prop: 'role',
type: 'select',
span: 12,
dicData: [
{ label: 'Admin', value: 'admin' },
{ label: 'User', value: 'user' }
]
},
{
label: 'Start Date',
prop: 'startDate',
type: 'date',
format: 'yyyy-MM-dd'
}
]
}
}
},
methods: {
handleSubmit(form, done) {
console.log('Form data:', form)
// Call API, then done() to re-enable button
done()
},
handleReset() {
console.log('Form reset')
}
}
}
</script>
```
### Feature Reference
| Feature | File |
|---------|------|
| Dynamic form | `examples/features/dynamic-form.md` |
| Form layout | `examples/features/form-layout.md` |
| Validation rules | `examples/features/form-rules.md` |
| Form groups | `examples/features/form-group.md` |
| Tabbed forms | `examples/features/form-tabs.md` |
| Custom components | `examples/features/custom-components.md` |
### API Reference
- `api/form-api.md` - Component props, events, and slots
- `api/columns-api.md` - Column types and properties
- `api/options-api.md` - Form option configuration
## Best Practices
1. **Use column types** - Set `type: 'select'`, `type: 'date'`, `type: 'upload'` for automatic controls
2. **Call done() after submit** - Always call `done()` in the submit handler to re-enable the button
3. **Use span for layout** - Set `span: 12` for half-width fields (24 = full width grid)
4. **Group related fields** - Use `group` option to organize complex forms into sections
5. **Validate on blur** - Set `trigger: 'blur'` for a less intrusive validation experience
## Resources
- **Official Docs**: https://avuejs.com/form/form-doc.html
## Keywords
Avue Form, avue-form, Vue form, dynamic form, 表单组件, 表单验证, form validation, form configuration, form columns, form rules
More from partme-ai/full-stack-skills
- adobe-xd"Guides creation of UI/UX designs, interactive prototypes, reusable components, and design specs in Adobe XD. Use when the user asks about Adobe XD artboards, prototype links, repeat grids, component states, design tokens export, or developer handoff."
- angular"Provides comprehensive guidance for Angular framework including components, modules, services, dependency injection, routing, forms, and TypeScript integration. Use when the user asks about Angular, needs to create Angular applications, implement Angular components, or work with Angular features."
- ansible"Provides comprehensive guidance for Ansible automation including playbooks, roles, inventory, and module usage. Use when the user asks about Ansible, needs to automate IT tasks, create Ansible playbooks, or manage infrastructure with Ansible."
- ant-design-mini"Builds mini-program UIs with Ant Design Mini components for Alipay and WeChat mini-programs. Covers Button, Form, List, Modal, Tabs, NavBar, and 60+ components with theme customization and CSS variable theming. Use when the user needs to create mini-program interfaces with Ant Design Mini, configure themes, or implement mini-program-specific UI patterns."
- ant-design-mobile"Builds React mobile UIs with Ant Design Mobile (antd-mobile) components including Button, Form, List, Modal, Picker, Tabs, PullToRefresh, InfiniteScroll, and 50+ mobile-optimized components. Use when the user needs to create mobile-first React interfaces, implement mobile navigation, forms, or data display with Ant Design Mobile."
- ant-design-react"Builds enterprise React UIs with Ant Design (antd) including 60+ components (Button, Form, Table, Select, Modal, Message), design tokens, TypeScript support, and ConfigProvider theming. Use when the user needs to create React applications with Ant Design, build forms with validation, display data tables, or customize the Ant Design theme."
- ant-design-vueProvides comprehensive guidance for Ant Design Vue (AntDV) component library for Vue 3. Covers installation, usage, API reference, templates, and all component categories. Use when building enterprise-class UI with Vue 3 and Ant Design.
- api-doc-generator"Generate API documentation by scanning Controller classes, extracting endpoint URLs, HTTP methods, parameters, and response structures, then producing standardized docs from templates. Use when the user explicitly mentions generating API documentation, creating API docs, scanning interfaces, or documenting REST APIs. Do not trigger for generic documentation requests without explicit API mention."
- appium"Provides comprehensive guidance for Appium mobile testing including mobile app automation, element location, gestures, and cross-platform testing. Use when the user asks about Appium, needs to test mobile applications, automate mobile apps, or write Appium test scripts."
- ascii-ansi-colorizer"Add an ANSI color layer to existing ASCII/plain-text output (gradient/rainbow/highlights) with alignment-safe rules and a required no-color fallback. Use when the user wants to colorize terminal output, add rainbow effects to CLI text, or style ASCII art with ANSI colors."