We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d68189 commit d683e86Copy full SHA for d683e86
1 file changed
docs/trem/plugin_dev/start.mdx
@@ -20,6 +20,8 @@ example/
20
21
擴充套件的入口點
22
23
+### Class 形式
24
+
25
```js
26
class Plugin {
27
#ctx;
@@ -36,6 +38,16 @@ class Plugin {
36
38
module.exports = Plugin;
37
39
```
40
41
+### Function 形式
42
43
+```js
44
+module.exports = function (ctx) {
45
+ ctx.on("load", () => {
46
+ const { TREM, logger, MixinManager } = ctx;
47
+ });
48
+};
49
+```
50
51
## info.json
52
53
定義擴充資訊的文件
0 commit comments