Closed b2nil closed 4 years ago
Alipay 小程序 AtCalendar 滑动时不能更新月份。
Taro 的 Swiper 组件只支持 onAnimationFinish 事件属性, 不支持 Alipay 小程序的 onAnimationEnd 事件属性, 因此通过 onAnimationFinish 无法更新月份。
onAnimationFinish
onAnimationEnd
// calendar/body/index.ts h(Swiper, { class: 'main__body', ... onAnimationFinish: handleAnimateFinish, // <- onAnimationEnd }, state.listGroup.map((item, key) => ( h(SwiperItem, { ... }, [ ... ]) )))
在 Taro 没有支持支付宝 Swiper 组件的 onAnimationEnd 事件属性之前, 需要对编译后 base.axml 中的 <template name="tmpl_0_swiper"> 基础模板进行手动修改:
base.axml
<template name="tmpl_0_swiper">
swiper
Alipay 小程序 AtCalendar 滑动时不能更新月份。
Taro 的 Swiper 组件只支持
onAnimationFinish
事件属性, 不支持 Alipay 小程序的onAnimationEnd
事件属性, 因此通过onAnimationFinish
无法更新月份。