diff --git a/lib/store.js b/lib/store.js index 530bbfb..77eee83 100644 --- a/lib/store.js +++ b/lib/store.js @@ -1211,7 +1211,7 @@ var TreeStore = /** @class */ (function (_super) { } }; TreeStore.prototype.formResult = function (entity, rows, selection, context, option) { - var e_11, _a, _b; + var e_11, _a, _b, _c, _d; var _this = this; var data = selection.data, sorter = selection.sorter, indexFrom = selection.indexFrom, count = selection.count; var findAvailableExprName = function (current) { @@ -1268,7 +1268,7 @@ var TreeStore = /** @class */ (function (_super) { var row = rows_1_1.value; var result = {}; var _loop_3 = function (attr) { - var _c, _d; + var _e, _f; var rel = this_3.judgeRelation(entity, attr); if (rel === 1) { if (row[attr] === undefined) { @@ -1276,15 +1276,15 @@ var TreeStore = /** @class */ (function (_super) { return "break"; } else if (typeof projection[attr] === 'number') { - Object.assign(result, (_c = {}, - _c[attr] = row[attr], - _c)); + Object.assign(result, (_e = {}, + _e[attr] = row[attr], + _e)); } else { // object数据的深层次select - Object.assign(result, (_d = {}, - _d[attr] = {}, - _d)); + Object.assign(result, (_f = {}, + _f[attr] = {}, + _f)); var assignIner_1 = function (dest, proj, source) { if (proj instanceof Array) { (0, assert_1.assert)(dest instanceof Array); @@ -1321,11 +1321,22 @@ var TreeStore = /** @class */ (function (_super) { if (state_1 === "break") break; } - if (row.$$deleteAt$$) { + // 这三个属性在前台cache中可能表达特殊语义的,需要返回 + if (row[Entity_1.DeleteAtAttribute]) { Object.assign(result, (_b = {}, - _b[Entity_1.DeleteAtAttribute] = row.$$deleteAt$$, + _b[Entity_1.DeleteAtAttribute] = row[Entity_1.DeleteAtAttribute], _b)); } + if (row[Entity_1.UpdateAtAttribute]) { + Object.assign(result, (_c = {}, + _c[Entity_1.UpdateAtAttribute] = row[Entity_1.UpdateAtAttribute], + _c)); + } + if (row[Entity_1.CreateAtAttribute]) { + Object.assign(result, (_d = {}, + _d[Entity_1.CreateAtAttribute] = row[Entity_1.CreateAtAttribute], + _d)); + } rows2.push(result); } } diff --git a/src/store.ts b/src/store.ts index f348bed..e50c4d1 100644 --- a/src/store.ts +++ b/src/store.ts @@ -1394,10 +1394,22 @@ export default class TreeStore extends C } } } - if (row.$$deleteAt$$) { + // 这三个属性在前台cache中可能表达特殊语义的,需要返回 + if (row[DeleteAtAttribute]) { Object.assign(result, { - [DeleteAtAttribute]: row.$$deleteAt$$, - }) + [DeleteAtAttribute]: row[DeleteAtAttribute], + }); + } + if (row[UpdateAtAttribute]) { + Object.assign(result, { + [UpdateAtAttribute]: row[UpdateAtAttribute], + }); + } + if (row[CreateAtAttribute]) { + Object.assign(result, { + [CreateAtAttribute]: row[CreateAtAttribute], + }); + } rows2.push(result); }