Browse Source

支持插件配置默认脚本

mxd 3 years ago
parent
commit
702bb2a404
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/components/panel/main/magic-resource.vue

+ 1 - 1
src/components/panel/main/magic-resource.vue

@@ -290,7 +290,7 @@ const onContextMenu = (item, event) => {
 					const info = {
 						groupId: item.id,
 						name: $i('message.untitled'),
-						script: `return 'Hello magic-api'`,
+						script: config.defaultScript || `return 'Hello magic-api'`,
 						path: config.requirePath ? '' : undefined
 					}
 					updateNode(info)