[Bug Report/动画效果失效]
andyphp opened this issue · 1 comments
andyphp commented
问题描述
1、所以页面都设置了动画效果,预览的和发布的时候只有首页有动画效果,其他页面的动画效果没有执行
2、添加了一些动画效果后,后面在点击动画的时候没有反应,需要刷新页面后,在点击添加动过才可以选择动画
环境描述/版本信息 (请完成如下信息)
- OS: [e.g. Linux]
- Browser [e.g. chrome]
- Node
- 本地开发
elfecho commented
可以修改了下 front-end/src/components/core/models/element.js:
- 在 getAttrs 方法下 attrs['data-swiper-animation'] 的值改为
animate__${animation.type}
...
getAttrs () {
const attrs = {
'data-uuid': this.uuid
}
if (this.animations.length > 0) {
const animation = this.animations[0]
attrs['data-swiper-animation'] = `animate__${animation.type}` // "fadeIn"
attrs['data-duration'] = `${animation.duration}s` // ".5s"
attrs['data-delay'] = `${animation.delay}s` // "1s"
}
return attrs
}
...