From 5af81e0ebfe25be92fe8e424c18b1bbb700300bf Mon Sep 17 00:00:00 2001 From: meo <18801474720@163.com> Date: Wed, 24 Oct 2018 21:10:06 +0800 Subject: [PATCH] =?UTF-8?q?[=E9=97=AE=E5=8D=B7=E8=B0=83=E6=9F=A5][?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0]:=E9=97=AE=E5=8D=B7=E8=B0=83=E6=9F=A5?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/questionnaire/questionnaire.js | 39 ++++++++++++++++----- components/questionnaire/questionnaire.wxml | 11 +++--- 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/components/questionnaire/questionnaire.js b/components/questionnaire/questionnaire.js index 23a0208..4835fb5 100644 --- a/components/questionnaire/questionnaire.js +++ b/components/questionnaire/questionnaire.js @@ -9,19 +9,40 @@ Component({ }, data: { flag: false, + widthScreen: null, + moveData: null, + rotateData: null, + alphaData: null, + scaleData: null, + skewData: null, + matrixData: null }, methods:{ close:function(){ - this.setData({ flag: true }) + this.alphaClick(); + this.queueClick(); + }, + /** + * 点击提交问题 + */ + formSubmit:function(e){ + console.log(e); + console.log(e.target.dataset.questitle) + console.log(e.target.dataset.question) + this.alphaClick(); + this.queueClick(); + }, + queueClick: function () { + var animation = wx.createAnimation({}); + animation.translate((this.data.widthScreen - 0), 0).scale(0).opacity(0.5).step({ duration: 3000 }) + this.setData({ queueData: animation.export() }) + }, + alphaClick: function (even) { + var animation = wx.createAnimation({}) + animation.opacity(0).step({ duration: 2000 }) + this.setData({ alphaData: animation.export() }) } }, - onReady: function () { - console.log(this.questionnaire, 999999999) - }, - onLoad: function (options) { - console.log(this.questionnaire, 999999999) - }, - onShow: function () { - console.log(this.questionnaire, 999999999) + onLoad(){ } }); \ No newline at end of file diff --git a/components/questionnaire/questionnaire.wxml b/components/questionnaire/questionnaire.wxml index e17bf88..a2ba26f 100644 --- a/components/questionnaire/questionnaire.wxml +++ b/components/questionnaire/questionnaire.wxml @@ -1,13 +1,14 @@ -