@dcloudio/uni-app-x 0.7.23 → 0.7.24

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-app-x",
3
- "version": "0.7.23",
3
+ "version": "0.7.24",
4
4
  "description": "uni-app x types",
5
5
  "typings": "index.d.ts",
6
6
  "author": "DCloud",
@@ -185,7 +185,7 @@ export const mixinDatacom = defineMixin({
185
185
  // changed,发生变化的属性名,类型为Array,例如 ['collection', 'action']
186
186
  onMixinDatacomPropsChange(_ : boolean, changed : Array<string>) {
187
187
  },
188
- mixinDatacomEasyGet(options ?: MixinDatacomEasyGetOptions | null) {
188
+ mixinDatacomEasyGet(options ?: MixinDatacomEasyGetOptions) {
189
189
  if (this.mixinDatacomLoading) {
190
190
  return
191
191
  }
@@ -201,19 +201,22 @@ export const mixinDatacom = defineMixin({
201
201
  this.mixinDatacomPage.count = count
202
202
  }
203
203
 
204
- this.mixinDatacomHasMore = !((count !== null) ? (this.mixinDatacomPage.current * this.mixinDatacomPage.size >= count) : (data.length < this.pageSize))
204
+ this.mixinDatacomHasMore = !((count != null) ? (this.mixinDatacomPage.current * this.mixinDatacomPage.size >= count) : (data.length < this.pageSize))
205
205
  this.mixinDatacomResData = data
206
206
 
207
207
  options?.success?.(res)
208
208
  }).catch((err : any | null) => {
209
209
  this.mixinDatacomError = err as UniCloudError
210
210
  options?.fail?.(err)
211
- }).finally(() => {
211
+ }).then(() => {
212
+ this.mixinDatacomLoading = false
213
+ options?.complete?.()
214
+ }, () => {
212
215
  this.mixinDatacomLoading = false
213
216
  options?.complete?.()
214
217
  })
215
218
  },
216
- mixinDatacomGet(options ?: MixinDatacomGetOptions | null) : Promise<UniCloudDBGetResult> {
219
+ mixinDatacomGet(options ?: MixinDatacomGetOptions) : Promise<UniCloudDBGetResult> {
217
220
  let db = uniCloud.databaseForJQL()
218
221
 
219
222
  let collection = Array.isArray(this.collection) ? db.collection(...(this.collection as Array<any>)) : db.collection(this.collection)
@@ -276,7 +279,7 @@ export const mixinDatacom = defineMixin({
276
279
  query = collection.skip(size * (current - 1)).limit(size)
277
280
  }
278
281
 
279
- const getOptions = {}
282
+ const getOptions = {} as UTSJSONObject
280
283
  const treeOptions = {
281
284
  limitLevel: this.limitlevel,
282
285
  startWith: this.startwith