ocpview-pro 0.1.22 → 0.1.23

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": "ocpview-pro",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "title": "ocpviewPlus",
5
5
  "description": "A high quality Service UI components Library with Vue.js",
6
6
  "homepage": "",
@@ -245,7 +245,19 @@ export default {
245
245
  if (index > -1) {
246
246
  let form = this.$Method.copy(this.data[index]);
247
247
  if (this.$refs[obj.para.curlIndex] && this.$refs[obj.para.curlIndex][0]) {
248
- form = this.$refs[obj.para.curlIndex][0].getData();
248
+ let rowObject = this.$refs[obj.para.curlIndex][0];
249
+ form = rowObject.getData();
250
+ // getData() 只返回嵌套子表的存活行,子表已删除的行在其 delData 里。
251
+ // 本行删除后组件随之销毁,delData 就没机会再被取到,父行标记为 D 时
252
+ // 子行的删除记录会整个丢失(getDetailsBox 里给子行补 D 的逻辑会因数组为空而跳过)。
253
+ // 这里把 delData 一并并入,交给上层统一标记为 D。
254
+ let gridName = rowObject.config ? rowObject.config.gridName : undefined;
255
+ if (gridName && rowObject.$refs && rowObject.$refs.grid) {
256
+ let gridDelData = rowObject.$refs.grid.delData || [];
257
+ if (gridDelData.length > 0) {
258
+ form[gridName] = gridDelData.concat(form[gridName] || []);
259
+ }
260
+ }
249
261
  }
250
262
  if (this.myConfig.delRowBefore) {
251
263
  let obj = {};