[Improvement] TreeSelect: support string type id (#1126)

This commit is contained in:
neverland 2018-05-21 20:27:53 +08:00 committed by GitHub
parent d2ef10991c
commit cf88dda233
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -51,7 +51,7 @@ export default {
|-----------|-----------|-----------|-------------| |-----------|-----------|-----------|-------------|
| items | Required datasets for the component, see Data Structure for detail. | `Array` | `[]` | | items | Required datasets for the component, see Data Structure for detail. | `Array` | `[]` |
| main-Active-index | The index of selected parent node | `Number` | `0` | | main-Active-index | The index of selected parent node | `Number` | `0` |
| active-id | Id of selected item | `Number` | `0` | | active-id | Id of selected item | `String | Number` | `0` |
#### Event #### Event
| Event | Description | Arguments | | Event | Description | Arguments |

View File

@ -43,7 +43,7 @@ export default create({
default: 0 default: 0
}, },
activeId: { activeId: {
type: Number, type: [Number, String],
default: 0 default: 0
}, },
maxHeight: { maxHeight: {

View File

@ -52,7 +52,7 @@ export default {
|-----------|-----------|-----------|-------------| |-----------|-----------|-----------|-------------|
| items | 分类显示所需的数据,具体数据结构可看 数据结构 | `Array` | `[]` | | items | 分类显示所需的数据,具体数据结构可看 数据结构 | `Array` | `[]` |
| main-active-index | 左侧导航高亮的索引 | `Number` | `0` | | main-active-index | 左侧导航高亮的索引 | `Number` | `0` |
| active-id | 右侧选择项高亮的数据id | `Number` | `0` | | active-id | 右侧选择项高亮的数据id | `String | Number` | `0` |
#### 事件 #### 事件