Files
mes-ui-d2/docs/zh/ecosystem-d2-crud/README.md
孙昊翔 809d1d356d d2-crud api
Former-commit-id: 5808aed1522168c72b5031036b70a33f637bf13b [formerly 5808aed1522168c72b5031036b70a33f637bf13b [formerly 5808aed1522168c72b5031036b70a33f637bf13b [formerly 5808aed1522168c72b5031036b70a33f637bf13b [formerly be371d92d7a828ece3a2d0455b91b0d97f0d3c4d [formerly 0032399cbe28619a78d56a45f0e8e4a304574cd5]]]]]
Former-commit-id: 07c63b30b387633930ed5c1c0c27f77294ffc4f4
Former-commit-id: bd29c6656ec42ffdc8a966f2dca4ed99b8934054
Former-commit-id: a07f98f7c11f5d9f718d32282f8ae7b09c1f3298 [formerly 35f1dbf5ca61b8549ef9b6b23fea363e019f27d6]
Former-commit-id: b78fcfda438796745931c15c36d98dd17974ce85
Former-commit-id: 43558c36185f390c069de887d74d3c131467b7b4
Former-commit-id: abde377e774764be67582319b8303761a93fb073
Former-commit-id: cf884c8d727244c9184748b84b8da21d4068656d
Former-commit-id: 36bf2caccdd2319711d1042bf9090ff8192e2938
2018-08-30 19:06:13 +08:00

49 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# D2 CRUD
## 介绍
`D2-Crud`是一套基于[Vue.js 2.2.0+](https://cn.vuejs.org/)和[Element 2.0.0+](http://element-cn.eleme.io/#/zh-CN)的表格组件,`D2-Crud``Element` 的功能进行了封装并增加了表格的增删改查、数据校验、表格内编辑等常用的功能。大部分功能可根据配置的json实现大大简化了开发流程。
## 功能
- 继承了 Element 中表格所有功能
- 新增表格数据
- 修改表格数据
- 删除表格数据
- 使用 Element 中的组件渲染表格内容和表单内容
- 表单校验
- 表格内编辑
## 安装
使用npm
``` bash
npm i element-ui @d2-projects/d2-crud -S
```
使用yarn
``` bash
yarn add element-ui @d2-projects/d2-crud
```
## 使用
在`main.js`中写入以下内容:
``` 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`了。
## 文档
[API](./api.md)
[使用示例](./example.md)