mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-12-19 18:25:44 +08:00
新增quickcommand.runCode,quickcommand.runInTerminal支持warp
This commit is contained in:
@@ -17,7 +17,7 @@ import { imageCommands } from "./imageCommands";
|
||||
import { windowsCommands } from "./windowsCommands";
|
||||
import { statusCommands } from "./statusCommands";
|
||||
import { macosCommands } from "./macosCommands";
|
||||
|
||||
import { scriptCommands } from "./scriptCommands";
|
||||
let commands = [
|
||||
fileCommands,
|
||||
networkCommands,
|
||||
@@ -30,6 +30,7 @@ let commands = [
|
||||
dataCommands,
|
||||
codingCommands,
|
||||
controlCommands,
|
||||
scriptCommands,
|
||||
uiCommands,
|
||||
simulateCommands,
|
||||
mathCommands,
|
||||
|
||||
53
src/js/composer/commands/scriptCommands.js
Normal file
53
src/js/composer/commands/scriptCommands.js
Normal file
@@ -0,0 +1,53 @@
|
||||
export const scriptCommands = {
|
||||
label: "编程相关",
|
||||
icon: "integration_instructions",
|
||||
commands: [
|
||||
{
|
||||
value: "",
|
||||
label: "赋值",
|
||||
icon: "script",
|
||||
outputVariable: "value",
|
||||
saveOutput: true,
|
||||
config: [
|
||||
{
|
||||
label: "值或表达式",
|
||||
component: "VariableInput",
|
||||
width: 12,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: "(function(code){new Function(code)()})",
|
||||
label: "注入JS脚本",
|
||||
icon: "script",
|
||||
config: [
|
||||
{
|
||||
label: "JS脚本",
|
||||
component: "CodeEditor",
|
||||
width: 12,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: "quickcommand.runAppleScript",
|
||||
label: "执行 AppleScript",
|
||||
icon: "script",
|
||||
outputVariable: "result",
|
||||
saveOutput: true,
|
||||
config: [
|
||||
{
|
||||
label: "脚本",
|
||||
component: "CodeEditor",
|
||||
width: 12,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: "quickcommand.runCsharp",
|
||||
label: "执行C#脚本",
|
||||
icon: "script",
|
||||
outputVariable: "result",
|
||||
saveOutput: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
Reference in New Issue
Block a user