fix(collapse): defaultExpandedNames doesn't work in accrodion mode (#351)

This commit is contained in:
小魔王 2021-07-02 17:14:23 +08:00 committed by GitHub
parent df9690487f
commit 27e703f465
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 0 deletions

View File

@ -2,6 +2,8 @@
## Pending
- Fix `n-collapse` the props of defaultExpandedNames does not work, closes [#350](https://github.com/TuSimple/naive-ui/issues/350).
### Breaking Changes
- `n-select` add `render-tag` prop.

View File

@ -2,6 +2,8 @@
## Pending
- 修复 `n-collapse` 默认指定展开属性无效,关闭 [#350](https://github.com/TuSimple/naive-ui/issues/350)
### Breaking Changes
- `n-select` 新增 `render-tag` 属性

View File

@ -49,6 +49,9 @@ export default defineComponent({
return !~expandedNames.findIndex(
(expandedName) => expandedName === name
)
} else if (expandedNames) {
const { value: name } = mergedNameRef
return name !== expandedNames
}
return true
})