diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 98b31ba35..59fb6e662 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -1,5 +1,11 @@ # CHANGELOG +## Pending + +### Fixes + +- Fix `n-menu`'s incorrect warning on `default-expanded-keys`. + ## 2.19.5 (2021-10-07) ### Fixes diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index 99f134a3e..d5bb9c52b 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -1,5 +1,11 @@ # CHANGELOG +## Pending + +### Fixes + +- 修复 `n-menu` 对于 `default-expanded-keys` 的错误警报 + ## 2.19.5 (2021-10-07) ### Fixes diff --git a/src/menu/src/useCheckDeprecated.ts b/src/menu/src/useCheckDeprecated.ts index d9e199668..c9bfd35b0 100644 --- a/src/menu/src/useCheckDeprecated.ts +++ b/src/menu/src/useCheckDeprecated.ts @@ -31,7 +31,7 @@ export function useCheckDeprecated (props: MenuSetupProps): void { '`expanded-names` is deprecated, please use `expanded-keys` instead.' ) } - if (props.defaultExpandedKeys) { + if (props.defaultExpandedNames) { warnOnce( 'menu', '`default-expanded-names` is deprecated, please use `default-expanded-keys` instead.'