Code Monkey home page Code Monkey logo

d2-crud's Introduction

npm npm GitHub license

介绍

D2-Crud是一套基于Vue.js 2.2.0+Element UI 2.0.0+的表格组件。D2-CrudElement 的功能进行了封装,并增加了表格的增删改查、数据校验、表格内编辑等常用的功能。大部分功能可由配置 json 实现,在实现并扩展了 Element 表格组件功能的同时,降低了开发难度,减少了代码量,大大简化了开发流程。

文档和示例

文档:https://doc.d2admin.fairyever.com/zh/ecosystem-d2-crud/
示例:https://d2admin.fairyever.com/#/demo/d2-crud/index

功能

  • 继承了 Element 中表格所有功能
  • 新增表格数据
  • 修改表格数据
  • 删除表格数据
  • 使用 Element 中的组件渲染表格内容和表单内容
  • 表单校验
  • 表格内编辑
  • 渲染自定义组件

安装

使用npm

npm i element-ui @d2-projects/d2-crud -S

使用yarn

yarn add element-ui @d2-projects/d2-crud

在项目中使用

main.js中写入以下内容:

import Vue from 'vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import D2Crud from '@d2-projects/d2-crud'

Vue.use(ElementUI)
Vue.use(D2Crud)

new Vue({
  el: '#app',
  render: h => h(App)
})

之后就可以在项目中使用D2-Crud了。

d2-crud's People

Contributors

sunhaoxiang avatar fairyever avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.