From 3ae9d9f450a76a72626410678d87af4fff7fa918 Mon Sep 17 00:00:00 2001 From: drake Date: Mon, 2 Dec 2024 11:56:37 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/auto-pull.md | 2 +- docs/auto-state.md | 2 +- docs/scope.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/auto-pull.md b/docs/auto-pull.md index fdb2990f8..38d3f1cac 100644 --- a/docs/auto-pull.md +++ b/docs/auto-pull.md @@ -5,7 +5,7 @@ 提供`addData()`来简化分页, 开发者可以借鉴实现 -```kotlin +```kotlin hl_lines="2" page.onRefresh { scope { val data = Get(Api.PATH) { diff --git a/docs/auto-state.md b/docs/auto-state.md index a6e1b424f..e380c994a 100644 --- a/docs/auto-state.md +++ b/docs/auto-state.md @@ -53,7 +53,7 @@ StateConfig.apply { 2. 请求成功, 显示`内容`缺省页 3. 请求失败, 显示`错误`缺省页 -```kotlin +```kotlin hl_lines="2" state.onRefresh { scope { tv.text = Get(Api.PATH).await() diff --git a/docs/scope.md b/docs/scope.md index 9436d8335..57caf3710 100644 --- a/docs/scope.md +++ b/docs/scope.md @@ -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)