diff --git a/public/preload.js b/public/preload.js index 2d62525..d373ed8 100644 --- a/public/preload.js +++ b/public/preload.js @@ -419,7 +419,6 @@ getuToolsLite = () => { delete utoolsLite.removeFeature delete utoolsLite.setFeature delete utoolsLite.onDbPull - delete utoolsLite.getFeatures // 支付相关接口 delete utoolsLite.fetchUserServerTemporaryToken delete utoolsLite.getUserServerTemporaryToken @@ -840,4 +839,4 @@ runCodeFile = (cmd, option, terminal, callback) => { // let stderr = err_chunks.join(""); // callback(stdout, stderr) // }) -} \ No newline at end of file +} diff --git a/src/App.vue b/src/App.vue index 617e564..9c269f5 100644 --- a/src/App.vue +++ b/src/App.vue @@ -19,6 +19,7 @@ export default defineComponent({ }, methods: { init() { + window.utools = window.getuToolsLite() // 版本检测 const requiredVersion = "2.6.1"; let version = utools.getAppVersion(); diff --git a/src/boot/global.js b/src/boot/global.js index 7afc139..05438c2 100644 --- a/src/boot/global.js +++ b/src/boot/global.js @@ -24,10 +24,10 @@ utools.onPluginOut(() => { // "async" is optional; // more info on params: https://v2.quasar.dev/quasar-cli/boot-files -export default boot(async({ +export default boot(async ({ app }) => { app.config.globalProperties.$utools = UTOOLS app.config.globalProperties.$programmings = programmings app.config.globalProperties.$profile = defaultProfile -}) \ No newline at end of file +}) diff --git a/src/components/CommandEditor.vue b/src/components/CommandEditor.vue index a1c8135..204c204 100644 --- a/src/components/CommandEditor.vue +++ b/src/components/CommandEditor.vue @@ -357,7 +357,7 @@ export default { cmd = await this.replaceTempInputVals(cmd); let terminal = false; let raw = true; - switch (this.$refs.menu.currentCommand.output) { + switch (this.$refs.menu?.currentCommand.output) { case "html": raw = false; break; diff --git a/src/components/MonocaEditor.vue b/src/components/MonocaEditor.vue index b52386f..a018385 100644 --- a/src/components/MonocaEditor.vue +++ b/src/components/MonocaEditor.vue @@ -5,7 +5,7 @@