@dcloudio/uni-cli-shared 2.0.0-32920210927002 → 2.0.0-32920211029001

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34,6 +34,7 @@ const loadMode = {
34
34
  const attrs = [
35
35
  'pageCurrent',
36
36
  'pageSize',
37
+ 'spaceInfo',
37
38
  'collection',
38
39
  'action',
39
40
  'field',
@@ -54,6 +55,12 @@ export default {
54
55
  return {}
55
56
  }
56
57
  },
58
+ spaceInfo: {
59
+ type: Object,
60
+ default () {
61
+ return {}
62
+ }
63
+ },
57
64
  collection: {
58
65
  type: [String, Array],
59
66
  default: ''
@@ -178,12 +185,14 @@ export default {
178
185
  })
179
186
  return al
180
187
  }, (newValue, oldValue) => {
188
+ this.paginationInternal.size = this.pageSize
189
+ if (newValue[0] !== oldValue[0]) {
190
+ this.paginationInternal.current = this.pageCurrent
191
+ }
181
192
  if (this.loadtime === loadMode.manual) {
182
193
  return
183
194
  }
184
195
 
185
- this.paginationInternal.size = this.pageSize
186
-
187
196
  let needReset = false
188
197
  for (let i = 2; i < newValue.length; i++) {
189
198
  if (newValue[i] !== oldValue[i]) {
@@ -195,9 +204,6 @@ export default {
195
204
  this.clear()
196
205
  this.reset()
197
206
  }
198
- if (newValue[0] !== oldValue[0]) {
199
- this.paginationInternal.current = this.pageCurrent
200
- }
201
207
 
202
208
  this._execLoadData()
203
209
  })
@@ -324,7 +330,7 @@ export default {
324
330
  })
325
331
  }
326
332
  /* eslint-disable no-undef */
327
- let db = uniCloud.database()
333
+ let db = uniCloud.database(this.spaceInfo)
328
334
  if (action) {
329
335
  db = db.action(action)
330
336
  }
@@ -398,7 +404,7 @@ export default {
398
404
  })
399
405
  }
400
406
  /* eslint-disable no-undef */
401
- let db = uniCloud.database()
407
+ let db = uniCloud.database(this.spaceInfo)
402
408
  if (action) {
403
409
  db = db.action(action)
404
410
  }
@@ -427,7 +433,7 @@ export default {
427
433
  },
428
434
  getTemp (isTemp = true) {
429
435
  /* eslint-disable no-undef */
430
- let db = uniCloud.database()
436
+ let db = uniCloud.database(this.spaceInfo)
431
437
 
432
438
  if (this.action) {
433
439
  db = db.action(this.action)
@@ -576,7 +582,7 @@ export default {
576
582
  }
577
583
 
578
584
  /* eslint-disable no-undef */
579
- const db = uniCloud.database()
585
+ const db = uniCloud.database(this.spaceInfo)
580
586
  const dbCmd = db.command
581
587
 
582
588
  let exec = db
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-cli-shared",
3
- "version": "2.0.0-32920210927002",
3
+ "version": "2.0.0-32920211029001",
4
4
  "description": "uni-cli-shared",
5
5
  "main": "lib/index.js",
6
6
  "repository": {
@@ -23,5 +23,5 @@
23
23
  "postcss-urlrewrite": "^0.2.2",
24
24
  "strip-json-comments": "^2.0.1"
25
25
  },
26
- "gitHead": "26392aaabf15a32cc592756b691a11ac312b0ac6"
26
+ "gitHead": "9577a22e00e4b90c8830d34f5966f1d379b455ea"
27
27
  }