main.ts 671 B

12345678910111213141516171819202122232425262728
  1. // @ts-ignore
  2. import packageJSON from '../package.json';
  3. /**
  4. * @en Registration method for the main process of Extension
  5. * @zh 为扩展的主进程的注册方法
  6. */
  7. export const methods: { [key: string]: (...any: any) => any } = {
  8. /**
  9. * @en A method that can be triggered by message
  10. * @zh 通过 message 触发的方法
  11. */
  12. openPanel() {
  13. Editor.Panel.open(packageJSON.name);
  14. },
  15. };
  16. /**
  17. * @en Method Triggered on Extension Startup
  18. * @zh 扩展启动时触发的方法
  19. */
  20. export function load() { }
  21. /**
  22. * @en Method triggered when uninstalling the extension
  23. * @zh 卸载扩展时触发的方法
  24. */
  25. export function unload() { }