diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 7ebc07a7..55f00bed 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -216,6 +216,7 @@ function sideBarEcosystemD2Crud () { collapsable: false, children: [ '', + 'guide', 'api', 'example' ] diff --git a/docs/zh/ecosystem-d2-crud/api.md.REMOVED.git-id b/docs/zh/ecosystem-d2-crud/api.md.REMOVED.git-id index c3061810..2a76fcf6 100644 --- a/docs/zh/ecosystem-d2-crud/api.md.REMOVED.git-id +++ b/docs/zh/ecosystem-d2-crud/api.md.REMOVED.git-id @@ -1 +1 @@ -6fe469a5ac6daa0d67d7bc12a163ed3e3ddd3660 \ No newline at end of file +fa1e85e2233599575112ce7f8027bea2989047ff \ No newline at end of file diff --git a/docs/zh/ecosystem-d2-crud/guide.md b/docs/zh/ecosystem-d2-crud/guide.md new file mode 100644 index 00000000..49e9cd0e --- /dev/null +++ b/docs/zh/ecosystem-d2-crud/guide.md @@ -0,0 +1,42 @@ +# 使用指南 + +## 获取表格当前数据 + +可以通过 `ref` 拿到表格实时数据,也可以通过监听 `@d2-data-change` 事件来获取表格中数据 +``` vue + + + +``` + +## 设置默认尺寸 + +在 `main.js` 使用 `D2Crud` 时传入 `size` 即可(可选值: `medium` `small` `mini`) +``` js +Vue.use(d2Crud, { size: 'small' }) +``` \ No newline at end of file