支持插件配置默认脚本

This commit is contained in:
mxd
2022-03-02 21:21:09 +08:00
parent 62b1311c6a
commit 70b2152ad7

View File

@@ -4,7 +4,10 @@ export default function (bus, constants, $i, Message, request) {
getIcon: item => ['TASK', '#9012FE'],
// 任务名称
name: $i('task.name'),
// 脚本语言
language: 'magicscript',
// 默认脚本
defaultScript: `return 'Hello magic-api-task'`,
// 执行测试的逻辑
doTest: (opened) => {
opened.running = true