(data, statusObj, childrenKey, notCascade)
| 1540 | }; |
| 1541 | |
| 1542 | var updateStatus = function (data, statusObj, childrenKey, notCascade) { |
| 1543 | var dataUpdated = []; |
| 1544 | layui.each(data, function (i1, item1) { |
| 1545 | if (layui.type(statusObj) === 'function') { |
| 1546 | statusObj(item1); |
| 1547 | } else { |
| 1548 | $.extend(item1, statusObj); |
| 1549 | } |
| 1550 | dataUpdated.push($.extend({}, item1)); |
| 1551 | notCascade || |
| 1552 | (dataUpdated = dataUpdated.concat( |
| 1553 | updateStatus(item1[childrenKey], statusObj, childrenKey, notCascade) |
| 1554 | )); |
| 1555 | }); |
| 1556 | return dataUpdated; |
| 1557 | }; |
| 1558 | |
| 1559 | Class.prototype.updateStatus = function (data, statusObj, notCascade) { |
| 1560 | var that = this; |
no outgoing calls
no test coverage detected