CI: add a prettier GitHub action to format code automatically (#988)
* CI: add a prettier GitHub action to format code automatically * improve GitHub Action config and format some files * Apply formatting changes * CI: make the prettier action a standalone action * Apply formatting changes * CI: add push as new trigger event Co-authored-by: Mark-Fenng <Mark-Fenng@users.noreply.github.com>
This commit is contained in:
@@ -8,8 +8,8 @@
|
||||
const stopFn = rrweb.record({
|
||||
emit(event) {
|
||||
// 保存获取到的 event 数据
|
||||
}
|
||||
})
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
你可以使用任何方式保存录制的数据,例如通过网络请求将数据传入至后端持久化保存,但请确保:
|
||||
@@ -22,9 +22,8 @@ const stopFn = rrweb.record({
|
||||
回放时只需要获取一段录制数据,并传入 rrweb 提供的 Replayer:
|
||||
|
||||
```js
|
||||
const events = GET_YOUR_EVENTS
|
||||
const events = GET_YOUR_EVENTS;
|
||||
|
||||
const replayer = new rrweb.Replayer(events);
|
||||
replayer.play();
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user