b2nil / taro-ui-vue3

采用 Vue 3.0 重写的 Taro UI 组件库
https://b2nil.github.io/taro-ui-vue3/
MIT License
160 stars 51 forks source link

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

Closed b2nil closed 3 years ago

b2nil commented 4 years ago
b2nil commented 3 years ago

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())
       ...
   })
   ...
}