mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-10 02:20:14 +08:00
Update FrontEnd.md
This commit is contained in:
parent
94256a4303
commit
5fad5e9337
@ -2,7 +2,7 @@
|
||||
|
||||
Mirai Console 前端开发文档。
|
||||
|
||||
[`MiraiConsole`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsole.kt
|
||||
[`MiraiConsole`]: ../backend/mirai-console/src/MiraiConsole.kt
|
||||
|
||||
## 实现前端
|
||||
|
||||
@ -10,10 +10,8 @@ Mirai Console 前端开发文档。
|
||||
|
||||
在 `build.gradle` 或 `build.gradle.kts` 添加:
|
||||
```kotlin
|
||||
kotlin {
|
||||
sourceSets.all {
|
||||
languageSettings.useExperimentalAnnotation("net.mamoe.mirai.console.ConsoleFrontEndImplementation")
|
||||
}
|
||||
kotlin.sourceSets.all {
|
||||
languageSettings.useExperimentalAnnotation("net.mamoe.mirai.console.ConsoleFrontEndImplementation")
|
||||
}
|
||||
```
|
||||
|
||||
@ -22,9 +20,9 @@ kotlin {
|
||||
|
||||
### 实现 Mirai Console
|
||||
|
||||
[`MiraiConsole`] 是后端的公开对象,由 [MiraiConsoleImplementationBridge](../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/MiraiConsoleImplementationBridge.kt) 代理,与前端链接。
|
||||
[`MiraiConsole`] 是后端的公开对象,由 [MiraiConsoleImplementationBridge](../backend/mirai-console/src/internal/MiraiConsoleImplementationBridge.kt) 代理,与前端链接。
|
||||
|
||||
前端需要实现 [MiraiConsoleImplementation.kt](../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsoleImplementation.kt)。
|
||||
前端需要实现 [MiraiConsoleImplementation.kt](../backend/mirai-console/src/MiraiConsoleImplementation)。
|
||||
|
||||
由于实现前端需要一定的技术能力,相信实现者都能理解源码内注释。
|
||||
|
||||
@ -32,4 +30,4 @@ kotlin {
|
||||
|
||||
通过 `public fun MiraiConsoleImplementation.start()`。
|
||||
|
||||
[MiraiConsoleImplementation.kt: Line 161](../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsoleImplementation.kt#L161)
|
||||
[MiraiConsoleImplementation.kt: Line 161](../backend/mirai-console/src/MiraiConsoleImplementation.kt#L161)
|
||||
|
Loading…
Reference in New Issue
Block a user