Commit 518b5589 by fengweida

V1.0.8 修复sleep按钮逻辑

1 parent fdcf9779
...@@ -308,8 +308,6 @@ ...@@ -308,8 +308,6 @@
if (buildRow.startsWith("//")) { if (buildRow.startsWith("//")) {
buildRow = buildRow.split("//")[1]; buildRow = buildRow.split("//")[1];
} }
//如果需要sleep,才去掉sleep的注释
if (needSleep){
let sleepRow = item.buildRowNo + 1; let sleepRow = item.buildRowNo + 1;
sleepList.forEach(item => { sleepList.forEach(item => {
if (item.rowNo == sleepRow) { if (item.rowNo == sleepRow) {
...@@ -318,7 +316,6 @@ ...@@ -318,7 +316,6 @@
} }
} }
}); });
}
} else { } else {
//如果是关闭的 还没有注释的话,就注释掉 //如果是关闭的 还没有注释的话,就注释掉
if (!uploadRow.startsWith("//")) { if (!uploadRow.startsWith("//")) {
...@@ -340,6 +337,13 @@ ...@@ -340,6 +337,13 @@
sourceArr[item.uploadRowNo] = "\t\t" + uploadRow; sourceArr[item.uploadRowNo] = "\t\t" + uploadRow;
sourceArr[item.buildRowNo] = "\t\t" + buildRow; sourceArr[item.buildRowNo] = "\t\t" + buildRow;
}); });
if (!needSleep){
sleepList.forEach(item => {
if (!item.row.startsWith("//")) {
item.row = "//" + item.row;
}
});
}
sleepList.forEach(item => { sleepList.forEach(item => {
item.row = "\t\t" + item.row; item.row = "\t\t" + item.row;
sourceArr[item.rowNo] = item.row; sourceArr[item.rowNo] = item.row;
...@@ -363,6 +367,7 @@ ...@@ -363,6 +367,7 @@
alert("复制成功"); alert("复制成功");
} }
}, },
switchSleep:function () { switchSleep:function () {
this.needSleep = !this.needSleep; this.needSleep = !this.needSleep;
}, },
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!