avue-form
When to use this skill
Use this skill whenever the user wants to:
- Install and set up Avue-form in a Vue project
- Use Avue-form components in Vue applications
- Configure form options and columns
- Handle form validation
- Use form events and methods
- Customize form components
- Understand Avue-form API and methods
- Troubleshoot Avue-form issues
How to use this skill
This skill is organized to match the Avue-form official documentation structure (https://avuejs.com/form/form-doc.html). When working with Avue-form:
-
Identify the topic from the user's request:
- Installation/安装 →
examples/components/installation.md - Basic Usage/基础用法 →
examples/components/basic-usage.md - Configuration/配置 →
examples/components/configuration.md - Features/功能特性 →
examples/features/ - API/API 文档 →
api/
- Installation/安装 →
-
Load the appropriate example file from the
examples/directory:Components (组件):
examples/components/intro.md- Introduction to Avue-formexamples/components/installation.md- Installation guideexamples/components/basic-usage.md- Basic usageexamples/components/configuration.md- Configurationexamples/components/options.md- Form optionsexamples/components/columns.md- Form columnsexamples/components/validation.md- Form validationexamples/components/events.md- Form eventsexamples/components/methods.md- Form methods
Features (功能特性):
examples/features/dynamic-form.md- Dynamic formexamples/features/form-layout.md- Form layoutexamples/features/form-rules.md- Form rulesexamples/features/form-submit.md- Form submitexamples/features/form-reset.md- Form resetexamples/features/custom-components.md- Custom componentsexamples/features/form-group.md- Form groupexamples/features/form-tabs.md- Form tabs
-
Follow the specific instructions in that example file for syntax, structure, and best practices
Important Notes:
- Avue-form is based on Vue
- Components use Vue syntax
- Examples include both Options API and Composition API
- Each example file includes key concepts, code examples, and key points
-
Reference API documentation in the
api/directory when needed:api/form-api.md- Form component APIapi/options-api.md- Options APIapi/columns-api.md- Columns APIapi/events-api.md- Events APIapi/methods-api.md- Methods API
-
Use templates from the
templates/directory:templates/installation.md- Installation templatestemplates/basic-form.md- Basic form templatestemplates/configuration.md- Configuration templates
1. Understanding Avue-form
Avue-form is a Vue form component library that provides rich form controls and configuration options.
Key Concepts:
- Form Component: Main form component
- Options: Form configuration options
- Columns: Form field definitions
- Validation: Form validation rules
- Events: Form events
- Methods: Form methods
2. Installation
Using npm:
npm install @avue/form
Using yarn:
yarn add @avue/form
Using pnpm:
pnpm add @avue/form
3. Basic Setup
// main.js
import Vue from 'vue'
import Avue from '@avue/form'
import '@avue/form/lib/theme-default/index.css'
Vue.use(Avue)
<template>
<avue-form :option="option" v-model="form"></avue-form>
</template>
<script>
export default {
data() {
return {
form: {},
option: {
column: [
{
label: 'Name',
prop: 'name',
type: 'input'
}
]
}
}
}
}
</script>
Doc mapping (one-to-one with official documentation)
examples/→ https://avuejs.com/form/form-doc.html
Examples and Templates
This skill includes detailed examples organized to match the official documentation structure. All examples are in the examples/ directory (see mapping above).
To use examples:
- Identify the topic from the user's request
- Load the appropriate example file from the mapping above
- Follow the instructions, syntax, and best practices in that file
- Adapt the code examples to your specific use case
To use templates:
- Reference templates in
templates/directory for common scaffolding - Adapt templates to your specific needs and coding style
API Reference
Detailed API documentation is available in the api/ directory, organized to match the official Avue-form API documentation structure:
Form Component API (api/form-api.md)
- Form component props
- Form component events
- Form component slots
Options API (api/options-api.md)
- Form options configuration
- Option properties
- Option methods
Columns API (api/columns-api.md)
- Column definitions
- Column properties
- Column types
Events API (api/events-api.md)
- Form events
- Event handlers
- Event parameters
Methods API (api/methods-api.md)
- Form methods
- Method parameters
- Method return values
To use API reference:
- Identify the API you need help with
- Load the corresponding API file from the
api/directory - Find the API signature, parameters, return type, and examples
- Reference the linked example files for detailed usage patterns
- All API files include links to relevant example files in the
examples/directory
Best Practices
- Configure options properly: Set up form options correctly
- Define columns clearly: Define form columns with proper types
- Handle validation: Use validation rules appropriately
- Handle events: Use form events for interactions
- Use methods: Leverage form methods for operations
- Customize components: Customize components when needed
- Follow Vue patterns: Follow Vue.js best practices
Resources
- Official Documentation: https://avuejs.com/form/form-doc.html
- GitHub Repository: https://github.com/avue/avue
Keywords
Avue-form, avue-form, @avue/form, Vue form, form component, 表单组件, 表单配置, 表单验证, 表单事件, 表单方法, form options, form columns, form validation, form events, form methods, dynamic form, form layout, form rules, form submit, form reset, custom components, form group, form tabs
More from teachingai/agent-skills
element-plus-vue3
Provides comprehensive guidance for Element Plus Vue 3 component library including installation, components, themes, internationalization, and API reference. Use when the user asks about Element Plus for Vue 3, needs to build Vue 3 applications with Element Plus, or customize component styles.
9vue2
Provides comprehensive guidance for Vue 2.x development including Options API, components, directives, lifecycle hooks, computed properties, watchers, Vuex state management, and Vue Router. Use when the user asks about Vue 2, needs to create Vue 2 components, implement reactive data binding, handle component communication, or work with Vue 2 ecosystem tools.
8cypress
Provides comprehensive guidance for Cypress end-to-end testing including commands, assertions, component testing, CI/CD integration, and best practices. Use when the user asks about Cypress, needs to write E2E tests, component tests, or configure Cypress for testing.
8cocos2d-x
Provides comprehensive guidance for Cocos2d-x v4 game engine including scene graph, nodes, sprites, actions, animations, physics, rendering, shaders, and platform deployment. Use when the user asks about Cocos2d-x, needs to create games, implement game features, set up development environments, or deploy games to multiple platforms.
7dalle
Provides comprehensive guidance for DALL-E AI image generation including prompt creation, image generation, variations, and editing. Use when the user asks about DALL-E, needs to generate AI images, create image variations, or work with DALL-E API.
6canvas-design
Creates museum-quality visual art as .png or .pdf by first generating a design philosophy manifesto, then expressing it on canvas with precise composition, color palettes, and typography. Use when the user asks to create a poster, art piece, visual design, or static creative piece. Outputs original designs using design-forward principles.
6