Преглед на файлове

bug:列表查询没有数据时数据错误

lrf преди 2 години
родител
ревизия
d3923e7968
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      src/interface/VOBase.ts

+ 1 - 1
src/interface/VOBase.ts

@@ -6,7 +6,7 @@ export class VOBase {
     this.details = _.get(response, 'details');
     this.total = _.get(response, 'total');
     // 查询列表和只返回结果的区分,根据total决定
-    if (this.total) {
+    if (this.total || this.total === 0) {
       this.data = _.get(response, 'data');
     } else {
       this.data = response;