diff --git a/docs/uniCloud/uni-clientdb-component.md b/docs/uniCloud/uni-clientdb-component.md
index 1e92d4c4a6e3cd5baa8f06c37ad86ee5022c5696..27fd67c814354c749eecf4f191706248394ba63d 100644
--- a/docs/uniCloud/uni-clientdb-component.md
+++ b/docs/uniCloud/uni-clientdb-component.md
@@ -14,7 +14,9 @@ uni-clientdb组件是一个数据库查询组件,它是对uni-clientdb的js库
**平台差异及版本说明**
-HBuilderX 2.9.5+ 暂不支持快应用
+|App|H5|微信小程序|支付宝小程序|百度小程序|字节跳动小程序|QQ小程序|快应用|360小程序|
+|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|
+|√(2.9.5+)|√|√|√|√|√|√|x|√|
#### 属性
@@ -29,7 +31,8 @@ HBuilderX 2.9.5+ 暂不支持快应用
|orderby|string|排序字段及正序倒叙设置|
|page-current|Number|当前页|
|page-size|Number|每页数据数量|
-|need-total|Boolan|是否查询总数据条数,默认 `false`,需要分页模式时指定为 `true`|
+|page-data|String|`add` 多次查询的集合, `replace` 当前查询的集合|
+|getcount|Boolan|是否查询总数据条数,默认 `false`,需要分页模式时指定为 `true`|
|getone|Boolean|指定查询结果是否返回数组第一条数据,默认 false。在false情况下返回的是数组,即便只有一条结果,也需要[0]的方式获取。在true下,直接返回结果数据,少一层数组。应用场景:详情页|
|action|string|云端执行数据库查询的前或后,触发某个action函数操作,进行预处理或后处理,[详情](https://uniapp.dcloud.net.cn/uniCloud/uni-clientDB?id=%e4%ba%91%e7%ab%af%e9%83%a8%e5%88%86)。场景:前端无权操作的数据,比如阅读数+1|
|manual|Boolean|是否手动加载数据,默认为 false,页面onready时自动联网加载数据。如果设为 true,则需要自行指定时机通过方法`this.$refs.udb.loadData()`来触发联网,其中的`udb`指组件的ref值|
@@ -71,8 +74,11 @@ HBuilderX 2.9.5+ 暂不支持快应用
load事件在查询执行后、渲染前触发,一般用于查询数据的二次加工。比如查库结果不能直接渲染时,可以在load事件里先对data进行预处理。
-```
-@load
+``` html
+...
+
+...
+
handleLoad(data, ended, pagination) {
// `data` 当前查询结果
// `ended` 是否有更多数据
@@ -82,10 +88,13 @@ handleLoad(data, ended, pagination) {
error事件在查询报错时触发
-```
-@error
+``` html
+...
+
+...
+
handleError(e) {
- // {errorMessage}
+ // {message}
}
```
@@ -128,19 +137,18 @@ this.$refs.udb.loadMore() //udb为uni-clientdb组件的ref属性值
模式1:上拉加载上一页。下一页的查询结果会追加合并到data里
```html
-
- {{error.errMsg}}
+ {{error.message}}
{{ item.createTime }}
@@ -158,12 +166,6 @@ this.$refs.udb.loadMore() //udb为uni-clientdb组件的ref属性值
data() {
return {
options: {}, // 插槽不能访问外面的数据,通过此参数传递, 不支持传递函数
- collection: 'table1',
- pagination: {
- current: 1,
- size: 20,
- total: true
- },
action: '',
where: {} // 类型为对象或字符串
}
@@ -235,10 +237,10 @@ this.$refs.udb.loadMore() //udb为uni-clientdb组件的ref属性值
{{pagination}}
{{error.errMsg}}
@@ -319,29 +321,27 @@ this.$refs.udb.loadMore() //udb为uni-clientdb组件的ref属性值
组件嵌套示例,访问父组件 data
-```
-
- {{pagination}}
+``` html
+
{{error.errMsg}}
-
+
+
{{ item.name }}
- {{ item.createTime }}
- 加载中...
-
-
-
+
+
- {{options}}
- {{error.errMsg}}
-
-
- {{ item.name }}
-
+
+
+ {{ item.name }}
+
+
+
+ {{ item.name }}