|
@@ -304,15 +304,17 @@ const SpreadJsObj = {
|
|
* @param {GC.Spread.Sheets.Worksheet} sheet
|
|
* @param {GC.Spread.Sheets.Worksheet} sheet
|
|
*/
|
|
*/
|
|
_initSheetHeader: function (sheet) {
|
|
_initSheetHeader: function (sheet) {
|
|
- if (!sheet.zh_setting || !sheet.zh_setting.cols) { return; }
|
|
|
|
|
|
+ const setting = sheet.zh_setting;
|
|
|
|
+ if (!setting || !setting.cols) { return; }
|
|
|
|
|
|
- sheet.setColumnCount(sheet.zh_setting.cols.length);
|
|
|
|
- sheet.setRowCount(sheet.zh_setting.headRows, spreadNS.SheetArea.colHeader);
|
|
|
|
- for (let iRow = 0; iRow < sheet.zh_setting.headRowHeight.length; iRow ++) {
|
|
|
|
- sheet.setRowHeight(iRow, sheet.zh_setting.headRowHeight[iRow], spreadNS.SheetArea.colHeader);
|
|
|
|
|
|
+
|
|
|
|
+ sheet.setColumnCount(setting.cols.length);
|
|
|
|
+ sheet.setRowCount(setting.headRows, spreadNS.SheetArea.colHeader);
|
|
|
|
+ for (let iRow = 0; iRow < setting.headRowHeight.length; iRow ++) {
|
|
|
|
+ sheet.setRowHeight(iRow, setting.headRowHeight[iRow], spreadNS.SheetArea.colHeader);
|
|
}
|
|
}
|
|
- for (let iCol = 0; iCol < sheet.zh_setting.cols.length; iCol++) {
|
|
|
|
- const col = sheet.zh_setting.cols[iCol];
|
|
|
|
|
|
+ for (let iCol = 0; iCol < setting.cols.length; iCol++) {
|
|
|
|
+ const col = setting.cols[iCol];
|
|
const title = col.title.split('|');
|
|
const title = col.title.split('|');
|
|
const colSpan = col.colSpan ? col.colSpan.split('|'): ['1'], rowSpan = col.rowSpan ? col.rowSpan.split('|'): ['1'];
|
|
const colSpan = col.colSpan ? col.colSpan.split('|'): ['1'], rowSpan = col.rowSpan ? col.rowSpan.split('|'): ['1'];
|
|
for (let i = 0; i < title.length; i++) {
|
|
for (let i = 0; i < title.length; i++) {
|
|
@@ -329,9 +331,11 @@ const SpreadJsObj = {
|
|
}
|
|
}
|
|
sheet.rowOutlines.direction(spreadNS.Outlines.OutlineDirection.backward);
|
|
sheet.rowOutlines.direction(spreadNS.Outlines.OutlineDirection.backward);
|
|
sheet.showRowOutline(false);
|
|
sheet.showRowOutline(false);
|
|
- if (sheet.zh_setting.defaultRowHeight) {
|
|
|
|
- sheet.defaults.rowHeight = sheet.zh_setting.defaultRowHeight;
|
|
|
|
|
|
+ if (setting.defaultRowHeight) {
|
|
|
|
+ sheet.defaults.rowHeight = setting.defaultRowHeight;
|
|
}
|
|
}
|
|
|
|
+ if (setting.frozenLineColor) sheet.options.frozenlineColor = setting.frozenLineColor;
|
|
|
|
+ if (setting.frozenColCount) sheet.frozenColumnCount(setting.frozenColCount);
|
|
},
|
|
},
|
|
reinitSheetHeader: function (sheet) {
|
|
reinitSheetHeader: function (sheet) {
|
|
this.beginMassOperation(sheet);
|
|
this.beginMassOperation(sheet);
|