提交 e3d175fe 编写于 作者: d-u-a's avatar d-u-a

update: unicloud-db组件新增gettree属性

上级 4342e01f
...@@ -69,6 +69,14 @@ export default { ...@@ -69,6 +69,14 @@ export default {
type: [Boolean, String], type: [Boolean, String],
default: false default: false
}, },
getone: {
type: [Boolean, String],
default: false
},
gettree: {
type: [Boolean, String],
default: false
},
orderby: { orderby: {
type: String, type: String,
default: '' default: ''
...@@ -77,10 +85,6 @@ export default { ...@@ -77,10 +85,6 @@ export default {
type: [String, Object], type: [String, Object],
default: '' default: ''
}, },
getone: {
type: [Boolean, String],
default: false
},
manual: { manual: {
type: Boolean, type: Boolean,
default: false default: false
...@@ -90,7 +94,7 @@ export default { ...@@ -90,7 +94,7 @@ export default {
return { return {
loading: false, loading: false,
hasMore: false, hasMore: false,
dataList: this.getone ? {} : [], dataList: this.getone ? undefined : [],
paginationInternal: { paginationInternal: {
current: this.pageCurrent, current: this.pageCurrent,
size: this.pageSize, size: this.pageSize,
...@@ -377,7 +381,8 @@ export default { ...@@ -377,7 +381,8 @@ export default {
size size
} = this.paginationInternal } = this.paginationInternal
db = db.skip(size * (current - 1)).limit(size).get({ db = db.skip(size * (current - 1)).limit(size).get({
getCount: this.getcount getCount: this.getcount,
getTree: this.gettree
}) })
return db return db
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册