Commit 7934f85c by 白宇

panright

parent 837c088a
...@@ -910,12 +910,12 @@ var vueInstance = new Vue({ ...@@ -910,12 +910,12 @@ var vueInstance = new Vue({
var dom = document.querySelector('#app1') var dom = document.querySelector('#app1')
var hammerTest = new Hammer(dom); var hammerTest = new Hammer(dom);
hammerTest.on('pan', function(ev) { hammerTest.on('pan', function(ev) {
if (ev.additionalEvent == 'panright') { if (ev.additionalEvent == 'panleft') {
if(that.activeIdx != 2){ if(that.activeIdx != 2){
panleft() panleft()
} }
} }
if (ev.additionalEvent == 'panleft') { if (ev.additionalEvent == 'panright') {
if(that.activeIdx != 0){ if(that.activeIdx != 0){
panright() panright()
} }
......
...@@ -711,12 +711,12 @@ var vueInstance = new Vue({ ...@@ -711,12 +711,12 @@ var vueInstance = new Vue({
var dom = document.querySelector('#app1') var dom = document.querySelector('#app1')
var hammerTest = new Hammer(dom); var hammerTest = new Hammer(dom);
hammerTest.on('pan', function(ev) { hammerTest.on('pan', function(ev) {
if (ev.additionalEvent == 'panright') { if (ev.additionalEvent == 'panleft') {
if(that.activeIdx != 3){ if(that.activeIdx != 3){
panleft() panleft()
} }
} }
if (ev.additionalEvent == 'panleft') { if (ev.additionalEvent == 'panright') {
if(that.activeIdx != 0){ if(that.activeIdx != 0){
panright() panright()
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment