Update zh_CN Docs (#384)

* update zh_CN guide, with latest API and options

* add receipes

* update receipes and guide

* update #329 add links to README
This commit is contained in:
yz-yu
2026-04-01 12:00:00 +08:00
committed by GitHub
parent 5678e3a062
commit 655f96da61
13 changed files with 621 additions and 43 deletions

View File

@@ -0,0 +1,23 @@
# 异步加载数据
当录制的数据较多时,一次性加载至回放页面可能带来较大的网络开销和较长的等待时间。这时可以采取数据分页的方式,异步地加载数据并回放。
rrweb 中用于实现异步加载数据的 API 非常简单直观:
```js
const replayer = new rrweb.Replayer(events);
replayer.addEvent(NEW_EVENT);
```
只需要调用 `addEvent` 传入新的数据rrweb 就会自动处理其中的时间关系,以最恰当的方式进行回放。
如果需要异步加载多个数据,只需这样使用:
```js
const replayer = new rrweb.Replayer(events);
for (const event of NEW_EVENTS) {
replayer.addEvent(event);
}
```