Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

优化collapse动画 #399

Closed
wants to merge 7 commits into from
Closed

优化collapse动画 #399

wants to merge 7 commits into from

Conversation

lusssn
Copy link
Collaborator

@lusssn lusssn commented Dec 4, 2018

close #273

** 动画修改影响了侧边栏滚动条的更新,发版前,需要在真实项目中验证没有问题

@liufei
Copy link
Member

liufei commented Dec 4, 2018

className: PropTypes.string,
render() {
const { className, children, active, ...others } = this.props
delete others.onClick
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const声明的变量,再delete不合适

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为什么不合适,const的变量都可以增加,为啥不可以删除呢
如果要移除const的对象中的元素如何做?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. const用来定义常量
  2. 如果要删除,使用let

wjeek
wjeek previously approved these changes Dec 10, 2018
@lusssn
Copy link
Collaborator Author

lusssn commented Dec 10, 2018

测试后问题:

  1. Collapse初始状态若为active,内容没有展开。
  2. 侧边栏初始化后,滚动条出现在了左侧。

@lusssn lusssn closed this Jul 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Collapse 组件展开效果
3 participants