From b8ce2ac6d6e986ca8d2b933f182bc7845a060371 Mon Sep 17 00:00:00 2001 From: chenjiahan Date: Wed, 4 Mar 2020 09:41:30 +0800 Subject: [PATCH] docs(Checkbox): add direction usage document (#5748) --- src/checkbox/README.md | 20 +++++++++++++++++++- src/checkbox/README.zh-CN.md | 22 +++++++++++++++++++++- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/src/checkbox/README.md b/src/checkbox/README.md index 87e2d661a..52d32589e 100644 --- a/src/checkbox/README.md +++ b/src/checkbox/README.md @@ -93,7 +93,6 @@ When Checkboxes are inside a CheckboxGroup, the checked checkboxes's name is an Checkbox a Checkbox b - Checkbox c ``` @@ -107,6 +106,25 @@ export default { }; ``` +### Horizontal + +```html + + Checkbox a + Checkbox b + +``` + +```js +export default { + data() { + return { + result: [] + }; + } +}; +``` + ### Maximum amount of checked options ```html diff --git a/src/checkbox/README.zh-CN.md b/src/checkbox/README.zh-CN.md index f9c81e133..b573554ba 100644 --- a/src/checkbox/README.zh-CN.md +++ b/src/checkbox/README.zh-CN.md @@ -103,7 +103,6 @@ export default { 复选框 a 复选框 b - 复选框 c ``` @@ -117,6 +116,27 @@ export default { }; ``` +### 水平排列 + +将`direction`属性设置为`horizontal`后,复选框组会变成水平排列 + +```html + + 复选框 a + 复选框 b + +``` + +```js +export default { + data() { + return { + result: [] + }; + } +}; +``` + ### 限制最大可选数 通过`max`属性可以限制复选框组的最大可选数