zhangweicheng 7 年之前
父节点
当前提交
e4838a1adb
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      web/building_saas/main/js/views/main_tree_col.js

+ 5 - 2
web/building_saas/main/js/views/main_tree_col.js

@@ -310,6 +310,8 @@ let colSettingObj = {
     settingSpread: null,
     checkBox: new GC.Spread.Sheets.CellTypes.CheckBox(),
     loadSetting: function (sheet, setting) {
+        sheet.suspendPaint();
+        sheet.suspendEvent();
         sheet.setRowCount(setting.cols.length);
         sheet.setColumnCount(setting.headRows, GC.Spread.Sheets.SheetArea.rowHeader);
         sheet.setColumnCount(1);
@@ -329,14 +331,15 @@ let colSettingObj = {
                     sheet.addSpan(index, iCol, col.head.spanRows[i], col.head.spanCols[i], GC.Spread.Sheets.SheetArea.rowHeader);
                 }
                 iCol += col.head.spanRows[i];
-            }
-            ;
+            };
             let colWidth = sheet.getColumnWidth(index, GC.Spread.Sheets.SheetArea.rowHeader);
             colWidth = colWidth > col.width ? colWidth : col.width;
             //sheet.setColumnWidth(index, colWidth, GC.Spread.Sheets.SheetArea.rowHeader);
             cell = sheet.getCell(index, 0).value(col.visible);
             sheet.autoFitRow(index);
         });
+        sheet.resumeEvent();
+        sheet.resumePaint();
     },
     initSettingSpread: function () {
         this.settingSpread = SheetDataHelper.createNewSpread($('#col_setting_spread')[0], {sheetCount: 1});