Aa董小礼
Aa董小礼
  • 发布:2020-06-12 15:43
  • 更新:2024-01-05 16:21
  • 阅读:3165

nvue页面如何实现旋转动画

分类:uni-app

方法一
js:
anim() {
let that = this;
var animation = uni.createAnimation({
duration: 3000,
timingFunction: 'ease'
});

		this.animation = animation;  
		animation.rotateX(180).step();  

		this.animationData = animation.export();  
	},  

图片
<image ref="test" :animation="animationData" src="../../static/livePush/load.png" mode="aspectFill" class="load"></image>

就是想让这个动画旋转,H5有效果,App现在没有效果

方法二**
**
anim(){
let that=this
let el = this.$refs.test;
animation.transition(el, {
styles: {
transform: 'rotate(360deg)',
},
duration: 8000, //ms
timingFunction: 'linear',
needLayout: false,
delay: 0 //ms
}, function(res) {
console.log(res);
that.anim();
})
},

<image ref='test' src="../../static/livePush/load.png" mode="aspectFill" class="load"></image>

两种都没有效果,马上自闭了

2020-06-12 15:43 负责人:无 分享
已邀请:
ang_y

ang_y

大佬,问题解决了吗?

1***@qq.com

1***@qq.com - 你可愿与我再并肩

bindingX了解一下

林达斯

林达斯 - 林达斯

我都是用css控制的,添加类删除类

  • 谭小谭

    能一直旋转吗


    2021-11-29 17:07

9***@qq.com

9***@qq.com - 搞钱要紧

解决了吗
我也想在nvue 上实现一直旋转的效果

3***@qq.com

3***@qq.com

官方文档,nvue不支持

乔小猿

乔小猿

如何实现呀,找了半天没找到

要回复问题请先登录注册