请教,createAnimation怎么设置动画高宽变化,能设置百分比吗

发布于 7 年前作者 fsu18727 次浏览最后编辑 7 年前来自 ask
onShow() {
 var animation = wx.createAnimation({
   duration: 1500,
   timingFunction: 'ease-out'
 })
 this.animation = animation
 animation.scale(0,0).step()
 this.setData({
   animationDataA: animation.export()
 })
}

这个是设置缩小为零的示例,请问高宽变为100%怎么设置哈

3 回复
dluo
dluo1 楼6 年前

是的

yuanyong
yuanyong2 楼6 年前

参数传入 ‘100%’ 即可

qiang96
qiang963 楼5 年前

请教是这样吗:animation.width(‘100%’).step()