1
0
mirror of synced 2026-03-25 20:58:38 +08:00

docs: 更新文档

This commit is contained in:
roymondchen
2022-06-21 20:53:02 +08:00
committed by jia000
parent 6e7837dc39
commit c2de910f3c
3 changed files with 6 additions and 2 deletions

View File

@@ -143,7 +143,7 @@ devServer: {
这是因为在runtime中无法直接获取到editor中的dsl所以需要通过editor注入到window的magic api来交互
在App.vue中通过监听message来准备知道magic注入时机然后调用magic.onRuntimeReady示例代码如下
在App.vue中通过监听message来准备获取magic注入时机然后调用magic.onRuntimeReady示例代码如下
```ts
const root = ref();
@@ -201,3 +201,5 @@ watch(page, async () => {
以上就是一个简单runtime实现以及与编辑的交互这是一个不完善的实现但是其中已经几乎覆盖所有需要关心的内容
当前教程中实现了一个简单的pagetmagic提供了一个比较完善的实现将在下一节介绍
[源码](https://github.com/jia000/tmagic-tutorial/tree/master/course2)