feat(CollapseItem): add toggle method (#7281)

* feat(CollapseItem): add toggle method

* chore: update doc
This commit is contained in:
neverland
2020-09-29 20:49:22 +08:00
committed by GitHub
parent 053a68e40d
commit 8d2c4b1e46
38 changed files with 132 additions and 50 deletions

View File

@@ -163,11 +163,11 @@ Use `active-color` prop to custom active color of the title and options.
### DropdownItem Methods
Use [ref](https://vuejs.org/v2/api/#ref) to get DropdownItem instance and call instance methods
Use [ref](https://vuejs.org/v2/api/#ref) to get DropdownItem instance and call instance methods.
| Name | Description | Attribute | Return value |
| ------ | -------------- | ------------- | ------------ |
| toggle | Toggle display | show: boolean | - |
| Name | Description | Attribute | Return value |
| ------ | -------------- | --------------- | ------------ |
| toggle | Toggle display | _show: boolean_ | - |
### Data Structure of Option

View File

@@ -167,11 +167,11 @@ export default {
### DropdownItem 方法
通过 ref 可以获取到 DropdownItem 实例并调用实例方法,详见[组件实例方法](#/zh-CN/quickstart#zu-jian-shi-li-fang-fa)
通过 ref 可以获取到 DropdownItem 实例并调用实例方法,详见[组件实例方法](#/zh-CN/quickstart#zu-jian-shi-li-fang-fa)
| 方法名 | 说明 | 参数 | 返回值 |
| --- | --- | --- | --- |
| toggle | 切换菜单展示状态,传`true`为显示,`false`为隐藏,不传参为取反 | show?: boolean | - |
| toggle | 切换菜单展示状态,传 `true` 为显示,`false` 为隐藏,不传参为取反 | _show?: boolean_ | - |
### Option 数据结构