结构调整

This commit is contained in:
fofolee 2022-04-08 10:26:32 +08:00
parent 001897ad48
commit cfd7f2f884
12 changed files with 23 additions and 12 deletions

View File

@ -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)
// })
}
}

View File

@ -19,6 +19,7 @@ export default defineComponent({
},
methods: {
init() {
window.utools = window.getuToolsLite()
//
const requiredVersion = "2.6.1";
let version = utools.getAppVersion();

View File

@ -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
})
})

View File

@ -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;

View File

@ -5,7 +5,7 @@
<script>
import * as monaco from "monaco-editor";
import { toRaw } from "vue";
import importAll from "../js/importAll.js";
import importAll from "../js/common/importAll.js";
//
let apis = importAll(

View File

@ -1,3 +1,7 @@
/**
* 所有的匹配类型
*/
const commandTypes = {
key: {
name: "key",

View File

@ -1,3 +1,7 @@
/**
* 所有的输出类型
*/
const outputTypes = {
ignore: {
name: "ignore",
@ -41,4 +45,4 @@ const outputTypes = {
},
};
export default outputTypes
export default outputTypes

View File

@ -1,3 +1,7 @@
/**
* 所有的特殊变量
*/
const specialVars = {
LocalId: {
name: "LocalId",

View File

@ -1,11 +1,10 @@
/**
* 阉割utools同时返回一个满血版的UTOOLS
* 防止输出html输出时通过script标签调用utools执行危险函数
*/
*/
// 禁用危险函数
let whole = window.utools
if (!utools.isDev()) window.utools = window.getuToolsLite()
// 数据库前缀
const DBPRE = {
@ -47,5 +46,5 @@ export default {
putDB,
delDB,
getDocs,
DBPRE
DBPRE,
}

View File

@ -191,11 +191,11 @@
</template>
<script>
import quickcommandParser from "../js/quickcommandParser.js";
import quickcommandParser from "../js/common/quickcommandParser.js";
import CommandCard from "components/CommandCard";
import CommandEditor from "components/CommandEditor.vue";
import ConfigurationMenu from "components/ConfigurationMenu.vue";
import importAll from "../js/importAll.js";
import importAll from "../js/common/importAll.js";
//
let defaultCommands = importAll(require.context("../json/", false, /\.json$/));