From 172759177f93d1ae458018cc708cf50b2937ef9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Thu, 21 Jun 2018 11:21:42 +0800 Subject: [PATCH] perfect drawer doc --- .prettierignore | 4 ++++ .prettierrc | 11 +++++++++++ components/drawer/index.en-US.md | 2 +- components/drawer/index.zh-CN.md | 2 +- package.json | 2 +- 5 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 .prettierignore create mode 100644 .prettierrc diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000000..d46e1af465 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,4 @@ +**/*.svg +**/*.ejs +**/*.html +package.json diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000000..0cc0de6596 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,11 @@ +{ + "singleQuote": true, + "trailingComma": "es5", + "printWidth": 100, + "overrides": [ + { + "files": ".prettierrc", + "options": { "parser": "json" } + } + ] +} diff --git a/components/drawer/index.en-US.md b/components/drawer/index.en-US.md index df65d62f9f..d75b27414f 100644 --- a/components/drawer/index.en-US.md +++ b/components/drawer/index.en-US.md @@ -19,7 +19,7 @@ A Drawer is a panel that is typically overlaid on top of a page and slides in fr | --- | --- | --- | --- | | closable | Whether a close (x) button is visible on top right of the Drawer dialog or not. | boolean | true | | destroyOnClose | Whether to unmount child components on closing drawer or not. | boolean | false | -| getContainer | Return the mounted node for Drawer. | (instance): HTMLElement | () => document.body | +| getContainer | Return the mounted node for Drawer. | HTMLElement \| `() => HTMLElement` \| selectors  | 'body' | | mask | Whether to show mask or not. | Boolean | true | | maskClosable | Clicking on the mask (area outside the Drawer) to close the Drawer or not. | boolean | true | | maskStyle | Style for Drawer's mask element. | object | {} | diff --git a/components/drawer/index.zh-CN.md b/components/drawer/index.zh-CN.md index c04db44d4b..25965e159f 100644 --- a/components/drawer/index.zh-CN.md +++ b/components/drawer/index.zh-CN.md @@ -20,7 +20,7 @@ title: Drawer | --- | --- | --- | --- | | closable | 是否显示右上角的关闭按钮 | boolean | true | | destroyOnClose | 关闭时销毁 Drawer 里的子元素 | boolean | false | -| getContainer | 指定 Drawer 挂载的 HTML 节点 | (instance): HTMLElement | () => document.body | +| getContainer | 指定 Drawer 挂载的 HTML 节点 | HTMLElement \| `() => HTMLElement` \| selectors  | 'body' | | maskClosable | 点击蒙层是否允许关闭 | boolean | true | | mask | 是否展示遮罩 | Boolean | true | | maskStyle | 遮罩样式 | object | {} | diff --git a/package.json b/package.json index 5d0772417a..b15b745268 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "rc-checkbox": "~2.1.5", "rc-collapse": "~1.9.0", "rc-dialog": "~7.1.0", - "rc-drawer": "~1.3.0", + "rc-drawer": "~1.3.1", "rc-dropdown": "~2.2.0", "rc-editor-mention": "^1.0.2", "rc-form": "^2.1.0",