Skip to content

Commit

Permalink
docs: 更新文档
Browse files Browse the repository at this point in the history
  • Loading branch information
liangjingkanji committed Dec 2, 2024
1 parent 1d4f621 commit 3ae9d9f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/auto-pull.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

提供`addData()`来简化分页, 开发者可以借鉴实现

```kotlin
```kotlin hl_lines="2"
page.onRefresh {
scope {
val data = Get<Game>(Api.PATH) {
Expand Down
2 changes: 1 addition & 1 deletion docs/auto-state.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ StateConfig.apply {
2. 请求成功, 显示`内容`缺省页
3. 请求失败, 显示`错误`缺省页

```kotlin
```kotlin hl_lines="2"
state.onRefresh {
scope {
tv.text = Get<String>(Api.PATH).await()
Expand Down
2 changes: 1 addition & 1 deletion docs/scope.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
|`StateLayout.scope`|创建跟随[StateLayout](https://github.com/liangjingkanji/BRV)生命周期的作用域|

!!! Failure "区分函数接受者"
注意`StateLayout.scope`等存在`函数接受者`的方法和`scope`属于两个方法, 严禁混用
优先跟随布局而非Activity生命周期, 所以PageRefreshLayout等onRefresh函数内请使用`scope`

!!! quote "第三方库支持"
PageRefreshLayout/StateLayout 属于第三方开源项目 [BRV](https://github.com/liangjingkanji/BRV)
Expand Down

0 comments on commit 3ae9d9f

Please sign in to comment.