返回 CodeWhale
client.js
1 window.__ModuleLoader__.load({
2 id: 'hello-extension',
3 factory(require) {
4 const { createElement } = require('react');
5 function GreetingPanel() {
6 return createElement('p', null,
7 'In the terminal, run ', createElement('code', null, '/hello-greet Ada'),
8 ' to try the greeting command.'
9 );
10 }
11 return {
12 apply(ctx) {
13 return ctx.slots.register({ name: 'customize.plugins.detail', id: 'greeting' }, GreetingPanel);
14 },
15 };
16 },
17 });
18
18 lines JAVASCRIPT