Skip to content
This repository has been archived by the owner on Dec 6, 2021. It is now read-only.

Accordion 展开和收起动画异常 #13

Closed
b2nil opened this issue Aug 12, 2020 · 1 comment
Closed

Accordion 展开和收起动画异常 #13

b2nil opened this issue Aug 12, 2020 · 1 comment
Milestone

Comments

@b2nil
Copy link
Owner

b2nil commented Aug 12, 2020

  • 默认开始状态下,点击关闭时,动画过快,与默认关闭,打开后再关闭时的表现不一致。
  • 当使用多个 AtAccordion,并且内容项目数量不一致时,展开和收起动画会出现卡顿, 或动画过快,或展开位置超过内容高度后,才收起。
@b2nil b2nil changed the title Accordion 默认开启状态下关闭动画过快 Accordion 展开和开启动画异常 Sep 13, 2020
@b2nil b2nil modified the milestones: 1.0.0-alpha.2, 1.0.0-alpha.3 Sep 13, 2020
@b2nil b2nil pinned this issue Sep 17, 2020
@b2nil
Copy link
Owner Author

b2nil commented Sep 17, 2020

toggleWithAnimation 中, 获取到的 '.at-accordion__body' 高度,始终是第一个 AtAccordion'.at-accordion__body' 高度,因此导致动画效果异常。

function toggleWithAnimation() {
   ...
   delayQuerySelector(this, '.at-accordion__body', 0).then((rect) => {
       const height = parseInt(rect[0].height.toString())
       ...
   })
   ...
}

@b2nil b2nil changed the title Accordion 展开和开启动画异常 Accordion 展开和收起动画异常 Sep 17, 2020
@b2nil b2nil closed this as completed Sep 17, 2020
@b2nil b2nil unpinned this issue Sep 17, 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

No branches or pull requests

1 participant