From 3393f0e1513c5d29e2734397bb9e0c0b272c259f Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Wed, 19 Dec 2018 20:51:26 +0800 Subject: [PATCH] fix: `Menu` flashing problem when change collapse = true and change openKeys = [] --- components/menu/index.jsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/menu/index.jsx b/components/menu/index.jsx index 716425080..bcbb0d2cc 100644 --- a/components/menu/index.jsx +++ b/components/menu/index.jsx @@ -105,6 +105,9 @@ const Menu = { this.setState({ sOpenKeys: this.inlineOpenKeys }) this.inlineOpenKeys = [] } + } else if (val) { + // 缩起时,openKeys置为空的动画会闪动,react可以通过是否传递openKeys避免闪动,vue不是很方便动态传递openKeys + this.switchingModeFromInline = true } }, restoreModeVerticalFromInline () {