From 565add356e8ac9bdb06e520f6688ccf50483b951 Mon Sep 17 00:00:00 2001 From: handongxun Date: Mon, 4 Jan 2021 10:41:49 +0800 Subject: [PATCH] =?UTF-8?q?update:=20unicloud-db=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E6=96=B0=E5=A2=9Egettree=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../uni-cli-shared/components/unicloud-db.vue | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/uni-cli-shared/components/unicloud-db.vue b/packages/uni-cli-shared/components/unicloud-db.vue index 9ccc16a3e..37e1abdf5 100644 --- a/packages/uni-cli-shared/components/unicloud-db.vue +++ b/packages/uni-cli-shared/components/unicloud-db.vue @@ -69,6 +69,14 @@ export default { type: [Boolean, String], default: false }, + getone: { + type: [Boolean, String], + default: false + }, + gettree: { + type: [Boolean, String], + default: false + }, orderby: { type: String, default: '' @@ -77,10 +85,6 @@ export default { type: [String, Object], default: '' }, - getone: { - type: [Boolean, String], - default: false - }, manual: { type: Boolean, default: false @@ -90,7 +94,7 @@ export default { return { loading: false, hasMore: false, - dataList: this.getone ? {} : [], + dataList: this.getone ? undefined : [], paginationInternal: { current: this.pageCurrent, size: this.pageSize, @@ -377,7 +381,8 @@ export default { size } = this.paginationInternal db = db.skip(size * (current - 1)).limit(size).get({ - getCount: this.getcount + getCount: this.getcount, + getTree: this.gettree }) return db -- GitLab