增加禁用方法

This commit is contained in:
lixue
2021-12-14 09:42:40 +08:00
parent 6049c8a88e
commit 38174fdf7b
6 changed files with 9309 additions and 27 deletions

View File

@@ -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;