Component({ /** * 组件的属性列表 */ properties: { flowerNum: { type: "String", value: '1' } }, /** * 组件的初始数据 */ data: { flag: true, }, /** * 组件的方法列表 */ methods: { comeOut: function(){ this.animation = wx.createAnimation({ duration: 700, timingFunction: 'ease', }) this.animation.bottom('350rpx').step(); this.setData({ animationData: this.animation.export() }) setTimeout(()=>{ this.close() },2000); }, close: function (e) { this.animation = wx.createAnimation({ duration: 400, timingFunction: 'ease', }) this.animation.opacity(0).step(); this.setData({ animationData: this.animation.export() }) }, } })