mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-12-17 00:44:35 +08:00
补全条件分支、异常处理、条件循环、遍历对象四个控制流程
This commit is contained in:
51
src/js/composer/cardComponents.js
Normal file
51
src/js/composer/cardComponents.js
Normal file
@@ -0,0 +1,51 @@
|
||||
import { defineAsyncComponent } from "vue";
|
||||
|
||||
// UI Components
|
||||
export const KeyEditor = defineAsyncComponent(() =>
|
||||
import("components/composer/ui/KeyEditor.vue")
|
||||
);
|
||||
export const FunctionSelector = defineAsyncComponent(() =>
|
||||
import("components/composer/ui/FunctionSelector.vue")
|
||||
);
|
||||
|
||||
// Control Flow Components
|
||||
export const ConditionalJudgment = defineAsyncComponent(() =>
|
||||
import("components/composer/control/ConditionalJudgment.vue")
|
||||
);
|
||||
export const LoopControl = defineAsyncComponent(() =>
|
||||
import("components/composer/control/LoopControl.vue")
|
||||
);
|
||||
export const ForEachControl = defineAsyncComponent(() =>
|
||||
import("components/composer/control/ForEachControl.vue")
|
||||
);
|
||||
export const ForInControl = defineAsyncComponent(() =>
|
||||
import("components/composer/control/ForInControl.vue")
|
||||
);
|
||||
export const WhileControl = defineAsyncComponent(() =>
|
||||
import("components/composer/control/WhileControl.vue")
|
||||
);
|
||||
export const SwitchControl = defineAsyncComponent(() =>
|
||||
import("components/composer/control/SwitchControl.vue")
|
||||
);
|
||||
export const TryCatchControl = defineAsyncComponent(() =>
|
||||
import("components/composer/control/TryCatchControl.vue")
|
||||
);
|
||||
|
||||
// Editor Components
|
||||
export const UBrowserEditor = defineAsyncComponent(() =>
|
||||
import("components/composer/ubrowser/UBrowserEditor.vue")
|
||||
);
|
||||
export const AxiosConfigEditor = defineAsyncComponent(() =>
|
||||
import("components/composer/http/AxiosConfigEditor.vue")
|
||||
);
|
||||
export const RegexEditor = defineAsyncComponent(() =>
|
||||
import("components/composer/regex/RegexEditor.vue")
|
||||
);
|
||||
|
||||
// Crypto Components
|
||||
export const SymmetricCryptoEditor = defineAsyncComponent(() =>
|
||||
import("components/composer/crypto/SymmetricCryptoEditor.vue")
|
||||
);
|
||||
export const AsymmetricCryptoEditor = defineAsyncComponent(() =>
|
||||
import("components/composer/crypto/AsymmetricCryptoEditor.vue")
|
||||
);
|
||||
@@ -11,7 +11,7 @@ export const controlCommands = {
|
||||
},
|
||||
{
|
||||
value: "loop",
|
||||
label: "循环",
|
||||
label: "循环执行",
|
||||
component: "LoopControl",
|
||||
isControlFlow: true,
|
||||
commandChain: ["loop", "end"],
|
||||
@@ -23,5 +23,33 @@ export const controlCommands = {
|
||||
isControlFlow: true,
|
||||
commandChain: ["forEach", "end"],
|
||||
},
|
||||
{
|
||||
value: "forIn",
|
||||
label: "遍历对象",
|
||||
component: "ForInControl",
|
||||
isControlFlow: true,
|
||||
commandChain: ["forIn", "end"],
|
||||
},
|
||||
{
|
||||
value: "while",
|
||||
label: "条件循环",
|
||||
component: "WhileControl",
|
||||
isControlFlow: true,
|
||||
commandChain: ["while", "end"],
|
||||
},
|
||||
{
|
||||
value: "switch",
|
||||
label: "条件分支",
|
||||
component: "SwitchControl",
|
||||
isControlFlow: true,
|
||||
commandChain: ["switch", "case", "end"],
|
||||
},
|
||||
{
|
||||
value: "tryCatch",
|
||||
label: "异常处理",
|
||||
component: "TryCatchControl",
|
||||
isControlFlow: true,
|
||||
commandChain: ["try", "catch", "end"],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user