Browse Source

fix: 清单库粘贴整块bug

vian 3 months ago
parent
commit
f1df9862e5
1 changed files with 3 additions and 3 deletions
  1. 3 3
      public/web/tree_sheet/tree_sheet_controller.js

+ 3 - 3
public/web/tree_sheet/tree_sheet_controller.js

@@ -99,10 +99,10 @@ var TREE_SHEET_CONTROLLER = {
             let length = nodes.length;
             if (nodes.length > 0) {
                 TREE_SHEET_HELPER.massOperationSheet(this.sheet, function () {
-                    that.sheet.addRows(nodes[length - 1].serialNo(), length);
+                    that.sheet.addRows(nodes[0].serialNo(), length);
                     TREE_SHEET_HELPER.refreshTreeNodeData(that.setting, that.sheet, nodes, false);
-                    that.setTreeSelected(nodes[length - 1]);
-                    that.sheet.setSelection(nodes[length - 1].serialNo(), sels[0].col, 1, 1);
+                    that.setTreeSelected(nodes[0]);
+                    that.sheet.setSelection(nodes[0].serialNo(), sels[0].col, 1, 1);
                     //that.sheet.showRow(newNode.serialNo(), GC.Spread.Sheets.VerticalPosition.center);
                 });
             }