Files
mes-ui-d2/docs/zh/ecosystem-d2-crud/README.md
孙昊翔 4b30ae64f0 d2-crud doc 安装与使用
Former-commit-id: ad5a24f1fcdb7355158afe90a220b89d10effbc1 [formerly ad5a24f1fcdb7355158afe90a220b89d10effbc1 [formerly ad5a24f1fcdb7355158afe90a220b89d10effbc1 [formerly ad5a24f1fcdb7355158afe90a220b89d10effbc1 [formerly e178e288b2633c4518e4a384c600988f59a01718 [formerly cee2ebe37a1479b0e8fa7bad445a9cee66e0cd0d]]]]]
Former-commit-id: e53c0c3cf06dbce9e022379ba1aee0c38063042f
Former-commit-id: 4e930e5991ff25c34e9c4fa2468ed2e1e9fff384
Former-commit-id: b7fe2a305aa1bcd662a6a3761e2ce2106f0f799f [formerly 9c531ecc0cbcfac05d4a62a3e46f76fa59536f87]
Former-commit-id: e25370af0e242a6790669585c9a5cc1adcb474c6
Former-commit-id: 0b8437a9836c0ed14b8afd7e906bc4f8c1674929
Former-commit-id: 1932505cf83478252b19c2a1d2f2d45087ed2010
Former-commit-id: 43e6c08bd6104e50f42ea3a11f2fb2b957290d9d
Former-commit-id: b7c6c39ce7b6d6b5510ae617c969e640aaac18ee
2018-08-25 11:08:23 +08:00

43 lines
853 B
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)的表格组件可根据配置的json文件自动生成表格并实现了表格内的增删改查、新增和修改数据校验、表格内编辑等功能。
## 安装
使用npm
``` bash
npm i element-ui d2-crud -S
```
使用yarn
``` bash
yarn add element-ui 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-crud'
Vue.use(d2Crud)
Vue.use(ElementUI)
new Vue({
el: '#app',
render: h => h(App)
})
```
之后就可以在组件中使用`D2-Crud`了
``` vue
<template>
<d2-crud></d2-crud>
</template>
```
具体使用方法请参考 [使用指南](./api.md)