1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- Component({
-
- properties: {
- wxObjectives: {
- type: String,
- value: ""
- }
- },
-
- data: {
- flag: false,
- animationData: {}
- },
-
- methods: {
- onTap (e) {
- let flage = e.target.dataset.flag;
- if(flage){
- this.util(flage, '156rpx');
- this.setData({'flag': false})
- } else {
- this.util(flage, '200rpx');
- this.setData({'flag': true})
- }
- },
-
- util (flag, height) {
-
- var animation = wx.createAnimation({
- duration: 200,
- timingFunction: "linear",
- delay: 0
- });
-
- this.animation = animation;
- animation.height(height).step();
- this.setData({
- animationData: animation.export()
- })
- }
- }
- })
|