// pages/marvellous/components/videoAn/video.js Component({ /** * 组件的属性列表 */ properties: { }, transverse: undefined, portrait: undefined, /** * 组件的初始数据 */ data: { tra: {}, por: {}, show: true, heng: true, shu: true }, ready() { this.transverse = wx.createAnimation({ duration: 1500, timingFunction: 'linear', }) this.portrait = wx.createAnimation({ duration: 1500, timingFunction: 'linear', }) this.transverse.width("750rpx").step(); this.portrait.height("100vh").step(); }, /** * 组件的方法列表 */ methods: { start() { this.setData({ tra: this.transverse.export(), }) }, nextAnstion() { this.setData({ heng: false, por: this.portrait.export(), }) }, end(){ this.setData({ shu: false, }) this.triggerEvent("close") } } })