添加注释

This commit is contained in:
fofolee 2022-03-31 22:03:49 +08:00
parent 5eddc7b6b0
commit 158f6d3bc1

View File

@ -160,6 +160,7 @@ export default {
}, },
}, },
methods: { methods: {
//
loadOrSaveHistory() { loadOrSaveHistory() {
// //
var history = UTOOLS.getDB(UTOOLS.DBPRE.CFG + "codeHistory"); var history = UTOOLS.getDB(UTOOLS.DBPRE.CFG + "codeHistory");
@ -184,6 +185,7 @@ export default {
UTOOLS.putDB(saveData, UTOOLS.DBPRE.CFG + "codeHistory"); UTOOLS.putDB(saveData, UTOOLS.DBPRE.CFG + "codeHistory");
}); });
}, },
//
bindKeys() { bindKeys() {
let that = this; let that = this;
// ctrl+b // ctrl+b
@ -191,6 +193,7 @@ export default {
that.runCurrentCommand(); that.runCurrentCommand();
}); });
}, },
//
matchLanguage() { matchLanguage() {
let language = Object.values(allProgrammings).filter( let language = Object.values(allProgrammings).filter(
(program) => program.ext === this.customOptions.ext (program) => program.ext === this.customOptions.ext
@ -199,16 +202,19 @@ export default {
this.setLanguage(language[0].name); this.setLanguage(language[0].name);
} }
}, },
//
setLanguage(language) { setLanguage(language) {
let highlight = allProgrammings[language].highlight; let highlight = allProgrammings[language].highlight;
this.$refs.editor.setEditorLanguage(highlight ? highlight : language); this.$refs.editor.setEditorLanguage(highlight ? highlight : language);
}, },
//
showHelp() { showHelp() {
utools.createBrowserWindow("./helps/quickcommand.html", { utools.createBrowserWindow("./helps/quickcommand.html", {
width: 1280, width: 1280,
height: 920, height: 920,
}); });
}, },
//
showCodingPage() { showCodingPage() {
quickcommand quickcommand
.showInputBox( .showInputBox(
@ -223,6 +229,7 @@ export default {
if (res) [this.scriptCode, this.outputCode] = res; if (res) [this.scriptCode, this.outputCode] = res;
}); });
}, },
//
async runCurrentCommand() { async runCurrentCommand() {
let cmd = this.$refs.editor.getEditorValue(); let cmd = this.$refs.editor.getEditorValue();
cmd = window.special(cmd); cmd = window.special(cmd);
@ -265,6 +272,7 @@ export default {
}); });
} }
}, },
//
async replaceTempInputVals(cmd) { async replaceTempInputVals(cmd) {
let tempInputVals = []; let tempInputVals = [];
let specilaVals = [ let specilaVals = [
@ -290,6 +298,7 @@ export default {
}); });
return cmd; return cmd;
}, },
//
showRunResult(content, raw, isSuccess) { showRunResult(content, raw, isSuccess) {
this.isResultShow = true; this.isResultShow = true;
this.runResultStatus = isSuccess; this.runResultStatus = isSuccess;