docs(tree): check-strategy

This commit is contained in:
07akioni 2021-09-08 23:44:02 +08:00
parent 86e59b762e
commit daafa7d133
4 changed files with 7 additions and 3 deletions

View File

@ -1,8 +1,10 @@
# CHANGELOG # CHANGELOG
## Pending
### Feats ### Feats
- `n-tree` add `check-strategy` document prop. - `n-tree` add `check-strategy` prop.
## 2.18.1 (2021-09-08) ## 2.18.1 (2021-09-08)

View File

@ -1,5 +1,7 @@
# CHANGELOG # CHANGELOG
## Pending
### Feats ### Feats
- `n-tree` 增加 `check-strategy` 文档属性 - `n-tree` 增加 `check-strategy` 文档属性

View File

@ -31,7 +31,7 @@ batch-render
| block-node | `boolean` | `false` | The node name is spread out in the whole row. | | block-node | `boolean` | `false` | The node name is spread out in the whole row. |
| cancelable | `boolean` | `true` | Whether node's select status can be cancelled. | | cancelable | `boolean` | `true` | Whether node's select status can be cancelled. |
| cascade | `boolean` | `false` | Whether to cascade checkboxes. | | cascade | `boolean` | `false` | Whether to cascade checkboxes. |
| check-strategy | `string` | `'all'` | The way to set the value of callback function. `all` means setting all checked node. `parent` means setting all checked parent node when all child node are checked. `child` means setting all child node. | | check-strategy | `string` | `'all'` | The strategy of setting checked callback's keys argument. `all` means setting all checked node. `parent` means setting all checked parent node of whom all child node are checked. `child` means setting all child node. |
| checkable | `boolean` | `false` | Whether to display the selection box, you need to set `cascade` to `true`. | | checkable | `boolean` | `false` | Whether to display the selection box, you need to set `cascade` to `true`. |
| children-field | `string` | `'children'` | The children field in `TreeOption`. | | children-field | `string` | `'children'` | The children field in `TreeOption`. |
| checked-keys | `Array<string \| number>` | `undefined` | If set, checked status will work in controlled manner. | | checked-keys | `Array<string \| number>` | `undefined` | If set, checked status will work in controlled manner. |

View File

@ -31,7 +31,7 @@ batch-render
| block-node | `boolean` | `false` | 节点名称整行撑开 | | block-node | `boolean` | `false` | 节点名称整行撑开 |
| cancelable | `boolean` | `true` | 选中之后是否允许取消 | | cancelable | `boolean` | `true` | 选中之后是否允许取消 |
| cascade | `boolean` | `false` | 是否关联选项 | | cascade | `boolean` | `false` | 是否关联选项 |
| check-strategy | `string` | `'all'` | 设置勾选策略来指定回调参数的值,`all` 表示回调函数值为全部选中节点;`parent` 表示回调函数值为父节点(当父节点下所有子节点都选中时);`child` 表示回调函数值为子节点 | | check-strategy | `string` | `'all'` | 设置勾选策略来指定勾选回调返回的值,`all` 表示回调函数值为全部选中节点;`parent` 表示回调函数值为父节点(当父节点下所有子节点都选中时);`child` 表示回调函数值为子节点 |
| checkable | `boolean` | `false` | 是否显示选择框,需要将 `cascade` 设置为 `true` | | checkable | `boolean` | `false` | 是否显示选择框,需要将 `cascade` 设置为 `true` |
| children-field | `string` | `'children'` | 替代 `TreeOption` 中的 children 字段名 | | children-field | `string` | `'children'` | 替代 `TreeOption` 中的 children 字段名 |
| checked-keys | `Array<string \| number>` | `undefined` | 如果设定则 `checked` 状态受控 | | checked-keys | `Array<string \| number>` | `undefined` | 如果设定则 `checked` 状态受控 |