v-crud

0.6.1 • Public • Published

v-crud 基于ElementUI的CRUD组件

参考 avue 实现,更适用我自己的项目场景的CRUD组件.

安装

yarn add v-crud
// 确保先引用ElementUI
import VCrud from 'v-crud'
Vue.use(VCrud)
 
// 如果需要传递全局参数
Vue.use(VCrud, options)

使用

<template>
  <v-crud-table resource="users" :config="config"></v-crud-table>
</template>
 
<script>
export default {
  data(){
    return {
      config: {
        title: '用户管理',
        list: {
          fields: [
            { prop: 'id', label: 'ID' },
            { prop: 'name', label: '用户名' },
            { prop: 'avatar', label: '头像', tag },
          ]
        }
      }
    }
  }
}
</script> 

/v-crud/

    Package Sidebar

    Install

    npm i v-crud

    Weekly Downloads

    3

    Version

    0.6.1

    License

    MIT

    Unpacked Size

    1.71 MB

    Total Files

    44

    Last publish

    Collaborators

    • wxs77577