增加禁用方法
This commit is contained in:
@@ -437,7 +437,8 @@ export default {
|
||||
showLastCoverPage: false,
|
||||
touchTimeline: [],
|
||||
styles: [{}, {}, {}, {}, {}, {}],
|
||||
isStart: false
|
||||
isStart: false,
|
||||
isDisable:false
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
@@ -483,7 +484,16 @@ export default {
|
||||
this.$refs.turn.removeEventListener("touchend", this.handleManualTouchEnd, false);
|
||||
}
|
||||
},
|
||||
enable(){
|
||||
this.isDisable = false
|
||||
},
|
||||
disable(){
|
||||
this.isDisable = true
|
||||
},
|
||||
handleManualTouchStart(e) {
|
||||
if(this.isDisable){
|
||||
return
|
||||
}
|
||||
this.isStart = true;
|
||||
let x = "";
|
||||
let y = "";
|
||||
@@ -525,6 +535,9 @@ export default {
|
||||
this.readyTurn();
|
||||
},
|
||||
handleManualTouchMove(e) {
|
||||
if(this.isDisable){
|
||||
return
|
||||
}
|
||||
let x = "";
|
||||
let y = "";
|
||||
if (this.isStart) {
|
||||
@@ -553,6 +566,9 @@ export default {
|
||||
|
||||
},
|
||||
handleManualTouchEnd() {
|
||||
if(this.isDisable){
|
||||
return
|
||||
}
|
||||
this.isStart = false;
|
||||
const action = this.action;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user