修复第一次进入语言未设置的bug

This commit is contained in:
fofolee 2022-04-15 09:31:42 +08:00
parent 7973dc6a2c
commit 0f6c2c371a

View File

@ -214,7 +214,8 @@ export default {
? this.$utools.getDB(this.$utools.DBPRE.CFG + "preferences")
?.codeHistory[this.action.type]
: this.action.data;
Object.assign(this.quickcommandInfo, _.cloneDeep(quickCommandInfo));
quickCommandInfo?.program &&
Object.assign(this.quickcommandInfo, _.cloneDeep(quickCommandInfo));
// monaco
this.$refs.editor.setEditorValue(this.quickcommandInfo.cmd);
this.setLanguage(this.quickcommandInfo.program);