mcpField
A
avue-crud

avue-crud

github.com/partme-aiDevelopment71676 installsUpdated 3w ago
Repository

About avue-crud

A skill for building Avue CRUD tables, aimed at developers configuring data tables and their forms. It centers table behavior in an option object and includes references for events, pagination, search, export, and validation.

Key features

  1. 01Configure columns and table behavior
  2. 02Handle create, update, and delete events
  3. 03Set up pagination and search
  4. 04Export data and run batch operations
  5. 05Add validation to CRUD forms

Use cases

  1. 01Build a paginated Avue CRUD table
  2. 02Add search and sorting to a data table
  3. 03Validate forms in CRUD dialogs
  4. 04Export table data

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/partme-ai/full-stack-skills --skill avue-crud

After installing, type/avue-crudin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

LICENSE.txt
api/
column-api.md
crud-api.md
examples/advanced/
column-types.md
validation.md
examples/features/
columns.md
crud-operations.md
export.md
form-config.md
pagination.md
search.md
selection.md
sorting.md
examples/getting-started/
basic-usage.md
configuration.md
templates/
advanced-crud.md
basic-crud.md

Details

From the project README

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
<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
FeatureFile
Column configexamples/features/columns.md
CRUD operationsexamples/features/crud-operations.md
Paginationexamples/features/pagination.md
Searchexamples/features/search.md
Exportexamples/features/export.md
Form validationexamples/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

Keywords

Avue CRUD, avue-crud, table, CRUD, 增删改查, pagination, search, column, form, 表格, 分页, data management

Comments

Markdown supported