123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
- flowerNum: {
- type: Number,
- 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()
- })
- this.replace();
- },
- // 复位
- replace: function(){
- this.animation = wx.createAnimation({
- duration: 1,
- timingFunction: 'linear',
- })
- this.animation.opacity(1).step();
- this.animation.bottom('-100rpx').step();
- this.setData({
- animationData: this.animation.export()
- })
- }
- }
- })
|