mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-12-20 19:20:37 +08:00
添加函数返回、完善注入JS功能
This commit is contained in:
@@ -50,3 +50,8 @@ export const SystemCommandEditor = defineAsyncComponent(() =>
|
||||
export const SelectListEditor = defineAsyncComponent(() =>
|
||||
import("components/composer/ui/SelectListEditor.vue")
|
||||
);
|
||||
|
||||
// 编程组件
|
||||
export const ReturnEditor = defineAsyncComponent(() =>
|
||||
import("components/composer/script/ReturnEditor.vue")
|
||||
);
|
||||
|
||||
@@ -17,9 +17,11 @@ export const scriptCommands = {
|
||||
],
|
||||
},
|
||||
{
|
||||
value: "(function(code){new Function(code)()})",
|
||||
value: "injectJs",
|
||||
label: "注入JS脚本",
|
||||
icon: "script",
|
||||
neverHasOutput: true,
|
||||
isExpression: true,
|
||||
config: [
|
||||
{
|
||||
label: "JS脚本",
|
||||
@@ -29,11 +31,10 @@ export const scriptCommands = {
|
||||
],
|
||||
},
|
||||
{
|
||||
value: "quickcommand.runAppleScript",
|
||||
label: "执行 AppleScript",
|
||||
value: "quickcommand.runCode",
|
||||
label: "执行代码",
|
||||
icon: "script",
|
||||
outputVariable: "result",
|
||||
saveOutput: true,
|
||||
config: [
|
||||
{
|
||||
label: "脚本",
|
||||
@@ -42,5 +43,11 @@ export const scriptCommands = {
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: "return",
|
||||
label: "函数返回",
|
||||
neverHasOutput: true,
|
||||
component: "ReturnEditor",
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user