From 27e077b56b481c97e3bd7b1d8714eed32c355c9b Mon Sep 17 00:00:00 2001 From: fofolee Date: Thu, 31 Mar 2022 21:18:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8E=86=E5=8F=B2=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/quickcommand.js | 24 ---------------- src/components/MonocaEditor.vue | 5 +++- src/{api => js}/importAll.js | 4 +++ src/{api => js}/programs.js | 4 +++ src/js/quickcommand.js | 4 +-- src/js/utools.js | 51 +++++++++++++++++++++++++++++++++ src/pages/CodeRunner.vue | 46 +++++++++++++++++++++++------ src/router/index.js | 2 +- 8 files changed, 104 insertions(+), 36 deletions(-) delete mode 100644 src/api/quickcommand.js rename src/{api => js}/importAll.js (83%) rename src/{api => js}/programs.js (97%) create mode 100644 src/js/utools.js diff --git a/src/api/quickcommand.js b/src/api/quickcommand.js deleted file mode 100644 index 1374487..0000000 --- a/src/api/quickcommand.js +++ /dev/null @@ -1,24 +0,0 @@ -import { Dialog } from 'quasar' -import inputBox from "../components/InputBox" - -let showInputBox = (labels = [], title = "", hints = []) => { - return new Promise((reslove, reject) => { - Dialog.create({ - component: inputBox, - componentProps: { - labels: labels, - title: title, - hints: hints - } - }).onOk(results => { - reslove(Array.from(results)) - }).onCancel(() => { - console.log('取消') - }).onDismiss(() => { - console.log('对话框被关闭') - }) - }) -}; -export default { - showInputBox, -}; diff --git a/src/components/MonocaEditor.vue b/src/components/MonocaEditor.vue index e1746d3..cc0c3b8 100644 --- a/src/components/MonocaEditor.vue +++ b/src/components/MonocaEditor.vue @@ -5,7 +5,7 @@