avue-crud
$
npx mdskill add partme-ai/full-stack-skills/avue-crudCreates configuration-driven CRUD tables with Avue for Vue 2 applications, handling data management interfaces.
- Helps developers build data management interfaces with CRUD functionality.
- Integrates with the Avue framework and depends on Vue 2.
- Uses configuration objects to define table columns, pagination, and event handling.
- Presents results as interactive Vue components with event-driven responses.
SKILL.md
.github/skills/avue-crudView on GitHub ↗
---
name: avue-crud
description: "Builds configuration-driven CRUD tables with the Avue framework, including column definition, pagination, search, sorting, row operations (add/edit/delete), data export, and form validation. Use when the user needs to create data management interfaces with Avue CRUD tables in Vue 2 applications."
license: Complete terms in LICENSE.txt
---
## When to use this skill
Use this skill whenever the user wants to:
- Build CRUD tables with Avue (create, read, update, delete)
- Configure table columns, pagination, search, and sorting
- Handle row events (@row-save, @row-update, @row-del)
- Export table data or implement batch operations
- Add form validation inside CRUD table dialogs
## How to use this skill
### Workflow
1. **Define the option object** - Configure columns, table behavior, and form rules
2. **Bind data and page** - Connect data array and pagination to the component
3. **Handle events** - Implement save, update, and delete event handlers
4. **Load detailed examples** - Each feature has a file in `examples/`
### Quick-Start Example: CRUD Table with Pagination
```vue
<template>
<avue-crud
:option="option"
:data="data"
:page.sync="page"
@row-save="handleSave"
@row-update="handleUpdate"
@row-del="handleDel"
@on-load="loadData"
/>
</template>
<script>
export default {
data() {
return {
data: [],
page: { currentPage: 1, pageSize: 10, total: 0 },
option: {
border: true,
index: true,
selection: true,
column: [
{ label: 'Name', prop: 'name', search: true, rules: [{ required: true, message: 'Name is required' }] },
{ label: 'Email', prop: 'email', search: true },
{ label: 'Status', prop: 'status', type: 'select', dicData: [
{ label: 'Active', value: 1 }, { label: 'Inactive', value: 0 }
]}
]
}
}
},
methods: {
loadData() {
// Fetch data from API using this.page.currentPage and this.page.pageSize
},
handleSave(row, done) { /* POST to API, then call done() */ done() },
handleUpdate(row, index, done) { /* PUT to API, then call done() */ done() },
handleDel(row, index) { /* DELETE from API, then remove from this.data */ }
}
}
</script>
```
### Feature Reference
| Feature | File |
|---------|------|
| Column config | `examples/features/columns.md` |
| CRUD operations | `examples/features/crud-operations.md` |
| Pagination | `examples/features/pagination.md` |
| Search | `examples/features/search.md` |
| Export | `examples/features/export.md` |
| Form validation | `examples/advanced/validation.md` |
### API Reference
- `api/crud-api.md` - Component props, events, methods
- `api/column-api.md` - Column types, renderers, formatters
- `api/option-api.md` - Table, form, and button options
## Best Practices
1. **Configuration-driven** - Define all table behavior in the `option` object, not in template markup
2. **Call done() in event handlers** - Always call `done()` after save/update to close the dialog
3. **Use column types** - Set `type: 'select'`, `type: 'date'`, etc. for automatic form controls
4. **Paginate server-side** - Use `@on-load` with page params for large datasets
5. **Add search columns** - Set `search: true` on columns to enable the search bar
## Resources
- **Official Docs**: https://avuejs.com/crud/crud-doc.html
## Keywords
Avue CRUD, avue-crud, table, CRUD, 增删改查, pagination, search, column, form, 表格, 分页, data management
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."