avue-crud
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
- Define the option object - Configure columns, table behavior, and form rules
- Bind data and page - Connect data array and pagination to the component
- Handle events - Implement save, update, and delete event handlers
- Load detailed examples - Each feature has a file in
examples/
Quick-Start Example: CRUD Table with Pagination
<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, methodsapi/column-api.md- Column types, renderers, formattersapi/option-api.md- Table, form, and button options
Best Practices
- Configuration-driven - Define all table behavior in the
optionobject, not in template markup - Call done() in event handlers - Always call
done()after save/update to close the dialog - Use column types - Set
type: 'select',type: 'date', etc. for automatic form controls - Paginate server-side - Use
@on-loadwith page params for large datasets - Add search columns - Set
search: trueon 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
vite
Guidance for Vite using the official Guide, Config Reference, and Plugins pages. Use when the user needs Vite setup, configuration, or plugin selection details.
68element-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.
63vue3
Guidance for Vue 3 using the official guide and API reference. Use when the user needs Vue 3 concepts, patterns, or API details to build components, apps, and tooling.
54electron
Build cross-platform desktop applications with Electron, covering main/renderer process architecture, IPC communication, BrowserWindow management, menus, tray icons, packaging, and security best practices. Use when the user asks about Electron, needs to create desktop applications, implement Electron features, or build cross-platform desktop apps.
51uniapp-project
Provides per-component and per-API examples with cross-platform compatibility details for uni-app, covering built-in components, uni-ui components, and APIs (network, storage, device, UI, navigation, media). Use when the user needs official uni-app components or APIs, wants per-component examples with doc links, or needs platform compatibility checks.
40ascii-cli-logo-banner
Entry point for ASCII CLI banners that routes to the Python built-in font skill or figlet.js/FIGfont skill. Use when the user wants a startup banner, ASCII logo, terminal welcome screen, or CLI branding for a service.
38