From ee7d9658262117dd2dc627d3890a8d0bd9f7b367 Mon Sep 17 00:00:00 2001 From: fofolee Date: Mon, 4 Apr 2022 01:08:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=96=B0=E5=BB=BA=E5=92=8C?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=91=BD=E4=BB=A4=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CommandCard.vue | 12 ++- src/pages/CodeRunner.vue | 141 +++++++++++++++++++------------- src/pages/ConfigurationPage.vue | 28 ++++++- 3 files changed, 121 insertions(+), 60 deletions(-) diff --git a/src/components/CommandCard.vue b/src/components/CommandCard.vue index 748a44b..1ef5116 100644 --- a/src/components/CommandCard.vue +++ b/src/components/CommandCard.vue @@ -276,7 +276,17 @@ export default { }, // 编辑命令 editCommand() { - console.log(this.commandInfo); + let routeData = { + from: "configuration", + action: "edit", + data: this.commandInfo, + }; + this.$router.push({ + name: "code", + params: { + data: JSON.stringify(routeData), + }, + }); }, // 运行命令 runCommand() { diff --git a/src/pages/CodeRunner.vue b/src/pages/CodeRunner.vue index ecb1857..da493e5 100644 --- a/src/pages/CodeRunner.vue +++ b/src/pages/CodeRunner.vue @@ -10,13 +10,13 @@ transition-show="jump-down" transition-hide="jump-up" label-color="teal" - v-model="program" + v-model="quickcommandInfo.program" :options="options" label="编程语言" >