diff --git a/src/customDefine/event.ts b/src/customDefine/event.ts index 827cac7..802ffaa 100644 --- a/src/customDefine/event.ts +++ b/src/customDefine/event.ts @@ -73,7 +73,7 @@ export class Events extends BaseDefine { event.args.push({ name, type, - luaType: typeID[type]?.[0] ?? '不支持的类型', + luaType: typeID[type]?.[0] ?? 'any', desc: typeID[type]?.[1] ?? '不支持的类型', }); } diff --git a/src/mainMenu/pages/events.ts b/src/mainMenu/pages/events.ts index 5cb058e..3dfa447 100644 --- a/src/mainMenu/pages/events.ts +++ b/src/mainMenu/pages/events.ts @@ -16,9 +16,12 @@ export class 自定义事件 extends TreeNode { node.childs = (await define.自定义事件.getEvents()).map(event => { let args = event.args.map(arg => arg.name); return new TreeNode(event.name, { + iconPath: new vscode.ThemeIcon('symbol-event'), description: `${event.id.toString()}(${args.join(',')})`, - contextValue: '自定义事件', data: event.id, + childs: event.args.map(arg => new TreeNode(arg.name, { + description: `${arg.desc}(${arg.luaType})`, + })), }); }); },