提交 25d3c197 编写于 作者: d-u-a's avatar d-u-a 提交者: 雪洛

feat: space info for unicloud-db component

上级 00ffaf5d
......@@ -34,6 +34,7 @@ const loadMode = {
const attrs = [
'pageCurrent',
'pageSize',
'spaceInfo',
'collection',
'action',
'field',
......@@ -54,6 +55,12 @@ export default {
return {}
}
},
spaceInfo: {
type: Object,
default() {
return {}
}
},
collection: {
type: [String, Array],
default: ''
......@@ -323,7 +330,7 @@ export default {
})
}
/* eslint-disable no-undef */
let db = uniCloud.database()
let db = uniCloud.database(this.spaceInfo)
if (action) {
db = db.action(action)
}
......@@ -397,7 +404,7 @@ export default {
})
}
/* eslint-disable no-undef */
let db = uniCloud.database()
let db = uniCloud.database(this.spaceInfo)
if (action) {
db = db.action(action)
}
......@@ -426,7 +433,7 @@ export default {
},
getTemp (isTemp = true) {
/* eslint-disable no-undef */
let db = uniCloud.database()
let db = uniCloud.database(this.spaceInfo)
if (this.action) {
db = db.action(this.action)
......@@ -575,7 +582,7 @@ export default {
}
/* eslint-disable no-undef */
const db = uniCloud.database()
const db = uniCloud.database(this.spaceInfo)
const dbCmd = db.command
let exec = db
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册