mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2026-02-26 17:05:55 +08:00
在CodeEditor中添加占位符支持
This commit is contained in:
@@ -313,7 +313,7 @@ export const browserCommands = {
|
||||
component: "CodeEditor",
|
||||
icon: "code",
|
||||
width: 12,
|
||||
placeholder: "输入JavaScript代码",
|
||||
placeholder: "输入JavaScript代码,使用return返回结果",
|
||||
},
|
||||
{
|
||||
topLabel: "要传递的参数",
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import programs from "js/options/programs";
|
||||
|
||||
export const scriptCommands = {
|
||||
label: "编程相关",
|
||||
icon: "integration_instructions",
|
||||
@@ -26,6 +28,8 @@ export const scriptCommands = {
|
||||
{
|
||||
label: "JS脚本",
|
||||
component: "CodeEditor",
|
||||
placeholder:
|
||||
"共享当前上下文,支持utools,quickcommand,quickcomposer等接口",
|
||||
width: 12,
|
||||
},
|
||||
],
|
||||
@@ -34,13 +38,50 @@ export const scriptCommands = {
|
||||
value: "quickcommand.runCode",
|
||||
label: "执行代码",
|
||||
icon: "script",
|
||||
isAsync: true,
|
||||
outputVariable: "result",
|
||||
saveOutput: true,
|
||||
config: [
|
||||
{
|
||||
label: "脚本",
|
||||
component: "CodeEditor",
|
||||
placeholder: "需要本机安装了对应的解释器/编译器",
|
||||
width: 12,
|
||||
},
|
||||
{
|
||||
component: "OptionEditor",
|
||||
width: 12,
|
||||
options: {
|
||||
language: {
|
||||
label: "语言",
|
||||
component: "QSelect",
|
||||
icon: "language",
|
||||
options: Object.keys(programs).slice(2, -1),
|
||||
width: 8,
|
||||
},
|
||||
runInTerminal: {
|
||||
label: "终端运行",
|
||||
icon: "terminal",
|
||||
component: "CheckButton",
|
||||
width: 4,
|
||||
},
|
||||
args: {
|
||||
topLabel: "参数",
|
||||
icon: "data_array",
|
||||
component: "ArrayEditor",
|
||||
width: 12,
|
||||
},
|
||||
charset: {
|
||||
label: "编码",
|
||||
icon: "abc",
|
||||
component: "DictEditor",
|
||||
options: {
|
||||
optionKeys: ["scriptCode", "outputCode"],
|
||||
},
|
||||
width: 12,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user