From b656c27a3971b756ea809f4c1010ae28310569da Mon Sep 17 00:00:00 2001 From: liurunze <1414556676@qq.com> Date: Tue, 4 Aug 2020 14:56:02 +0800 Subject: [PATCH] fix(columlen): columlen columlen to columnlen --- docs/guide/data.md | 4 ++-- docs/guide/operate.md | 4 ++-- docs/zh/guide/data.md | 4 ++-- docs/zh/guide/operate.md | 4 ++-- src/controllers/controlHistory.js | 4 ++-- src/controllers/handler.js | 24 +++++++++---------- src/controllers/menuButton.js | 4 ++-- src/controllers/rowColumnOperation.js | 30 ++++++++++++------------ src/controllers/selection.js | 8 +++---- src/controllers/server.js | 4 ++-- src/demoData/sheetCell.js | 2 +- src/demoData/sheetComment.js | 2 +- src/demoData/sheetConditionFormat.js | 2 +- src/demoData/sheetFormula.js | 2 +- src/demoData/sheetSparkline.js | 2 +- src/function/functionImplementation.js | 8 +++---- src/global/draw.js | 16 ++++++------- src/global/extend.js | 30 ++++++++++++------------ src/global/refresh.js | 6 ++--- src/global/rhchInit.js | 32 +++++++++++++------------- 20 files changed, 96 insertions(+), 96 deletions(-) diff --git a/docs/guide/data.md b/docs/guide/data.md index fdd65c0..343667f 100644 --- a/docs/guide/data.md +++ b/docs/guide/data.md @@ -192,12 +192,12 @@ } ``` - ### config.columlen + ### config.columnlen - Type:Object - Default:{} - Usage:The column width of each cell, example: ```js - "columlen": { + "columnlen": { "0": 97, "1": 115, "2": 128 diff --git a/docs/guide/operate.md b/docs/guide/operate.md index 1775f42..6b63fbc 100644 --- a/docs/guide/operate.md +++ b/docs/guide/operate.md @@ -75,8 +75,8 @@ - Update: `luckysheetfile[3].config.["rowlen"]["3"] = 10` 2. Examples of modifying column width: - - Enter: `{"t":"cg","i":1,"v":{"20":74, "15":170, "6":40},"k":" columlen"}` - - Update: `luckysheetfile[1].config.["columlen"]["20"] = 74` + - Enter: `{"t":"cg","i":1,"v":{"20":74, "15":170, "6":40},"k":" columnlen"}` + - Update: `luckysheetfile[1].config.["columnlen"]["20"] = 74` 3. Examples of merged cells: - Enter: `{"t":"cg","i":1,"v":{"5_10":{row:[1,3], column:[3,5]},"k":" merge "}` diff --git a/docs/zh/guide/data.md b/docs/zh/guide/data.md index bdebe75..9ffbb4a 100644 --- a/docs/zh/guide/data.md +++ b/docs/zh/guide/data.md @@ -192,12 +192,12 @@ } ``` - ### config.columlen + ### config.columnlen - 类型:Object - 默认值:{} - 作用:每个单元格的列宽,示例: ```js - "columlen": { + "columnlen": { "0": 97, "1": 115, "2": 128 diff --git a/docs/zh/guide/operate.md b/docs/zh/guide/operate.md index 45469ca..c1d3c70 100644 --- a/docs/zh/guide/operate.md +++ b/docs/zh/guide/operate.md @@ -75,8 +75,8 @@ - 更新:`luckysheetfile[3].config.["rowlen"]["3"] = 10` 2. 修改列宽度举例: - - 输入:`{"t":"cg","i":1,"v":{"20":74, "15":170, "6":40},"k":" columlen"}` - - 更新:`luckysheetfile[1].config.["columlen"]["20"] = 74` + - 输入:`{"t":"cg","i":1,"v":{"20":74, "15":170, "6":40},"k":" columnlen"}` + - 更新:`luckysheetfile[1].config.["columnlen"]["20"] = 74` 3. 合并单元格举例: - 输入:`{"t":"cg","i":1,"v":{"5_10":{row:[1,3], column:[3,5]},"k":" merge "}` diff --git a/src/controllers/controlHistory.js b/src/controllers/controlHistory.js index 7e96c57..adde630 100644 --- a/src/controllers/controlHistory.js +++ b/src/controllers/controlHistory.js @@ -108,7 +108,7 @@ const controlHistory = { server.saveParam("cg", ctr.sheetIndex, ctr.config["rowlen"], { "k": "rowlen" }); } else if(ctr.ctrlType == "resizeC"){ - server.saveParam("cg", ctr.sheetIndex, ctr.config["columlen"], { "k": "columlen" }); + server.saveParam("cg", ctr.sheetIndex, ctr.config["columnlen"], { "k": "columnlen" }); } jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length); @@ -359,7 +359,7 @@ const controlHistory = { server.saveParam("cg", ctr.sheetIndex, ctr.curconfig["rowlen"], { "k": "rowlen" }); } else if(ctr.ctrlType == "resizeC"){ - server.saveParam("cg", ctr.sheetIndex, ctr.curconfig["columlen"], { "k": "columlen" }); + server.saveParam("cg", ctr.sheetIndex, ctr.curconfig["columnlen"], { "k": "columnlen" }); } jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length); diff --git a/src/controllers/handler.js b/src/controllers/handler.js index fd21ea2..75d7f5d 100644 --- a/src/controllers/handler.js +++ b/src/controllers/handler.js @@ -919,11 +919,11 @@ export default function luckysheetHandler() { //列宽默认值 let cfg = $.extend(true, {}, Store.config); - if (cfg["columlen"] == null) { - cfg["columlen"] = {}; + if (cfg["columnlen"] == null) { + cfg["columnlen"] = {}; } - let first_collen = cfg["columlen"][Store.luckysheet_select_save[0].column[0]] == null ? Store.defaultcollen : cfg["columlen"][Store.luckysheet_select_save[0].column[0]]; + let first_collen = cfg["columnlen"][Store.luckysheet_select_save[0].column[0]] == null ? Store.defaultcollen : cfg["columnlen"][Store.luckysheet_select_save[0].column[0]]; let isSame = true; for (let i = 0; i < Store.luckysheet_select_save.length; i++) { @@ -931,7 +931,7 @@ export default function luckysheetHandler() { let c1 = s.column[0], c2 = s.column[1]; for (let c = c1; c <= c2; c++) { - let collen = cfg["columlen"][c] == null ? Store.defaultcollen : cfg["columlen"][c]; + let collen = cfg["columnlen"][c] == null ? Store.defaultcollen : cfg["columnlen"][c]; if (collen != first_collen) { isSame = false; @@ -2364,12 +2364,12 @@ export default function luckysheetHandler() { let size = (x + 3) - Store.luckysheet_cols_change_size_start[0]; - let firstcolumlen = Store.defaultcollen; - if (Store.config["columlen"] != null && Store.config["columlen"][Store.luckysheet_cols_change_size_start[1]] != null) { - firstcolumlen = Store.config["columlen"][Store.luckysheet_cols_change_size_start[1]]; + let firstcolumnlen = Store.defaultcollen; + if (Store.config["columnlen"] != null && Store.config["columnlen"][Store.luckysheet_cols_change_size_start[1]] != null) { + firstcolumnlen = Store.config["columnlen"][Store.luckysheet_cols_change_size_start[1]]; } - if (Math.abs(size - firstcolumlen) < 3) { + if (Math.abs(size - firstcolumnlen) < 3) { return; } if ((x + 3) - Store.luckysheet_cols_change_size_start[0] < 30) { @@ -2381,11 +2381,11 @@ export default function luckysheetHandler() { } let cfg = $.extend(true, {}, Store.config); - if (cfg["columlen"] == null) { - cfg["columlen"] = {}; + if (cfg["columnlen"] == null) { + cfg["columnlen"] = {}; } - cfg["columlen"][Store.luckysheet_cols_change_size_start[1]] = Math.ceil(size); + cfg["columnlen"][Store.luckysheet_cols_change_size_start[1]] = Math.ceil(size); if (Store.clearjfundo) { Store.jfundo = []; @@ -2403,7 +2403,7 @@ export default function luckysheetHandler() { Store.config = cfg; Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].config = Store.config; - server.saveParam("cg", Store.currentSheetIndex, cfg["columlen"], { "k": "columlen" }); + server.saveParam("cg", Store.currentSheetIndex, cfg["columnlen"], { "k": "columnlen" }); jfrefreshgrid_rhcw(null, Store.flowdata[0].length); diff --git a/src/controllers/menuButton.js b/src/controllers/menuButton.js index d70e57c..1ff659f 100644 --- a/src/controllers/menuButton.js +++ b/src/controllers/menuButton.js @@ -3816,8 +3816,8 @@ const menuButton = { else{ let config = getluckysheetfile()[getSheetIndex(Store.currentSheetIndex)]["config"]; - if (config["columlen"] != null && config["columlen"][cell_c] != null) { - width = config["columlen"][cell_c]; + if (config["columnlen"] != null && config["columnlen"][cell_c] != null) { + width = config["columnlen"][cell_c]; } if (config["rowlen"] != null && config["rowlen"][cell_r] != null) { diff --git a/src/controllers/rowColumnOperation.js b/src/controllers/rowColumnOperation.js index 4e62491..4056dd6 100644 --- a/src/controllers/rowColumnOperation.js +++ b/src/controllers/rowColumnOperation.js @@ -776,11 +776,11 @@ export function rowColumnOperationInitial(){ //列宽默认值 let cfg = $.extend(true, {}, Store.config); - if(cfg["columlen"] == null){ - cfg["columlen"] = {}; + if(cfg["columnlen"] == null){ + cfg["columnlen"] = {}; } - let first_collen = cfg["columlen"][Store.luckysheet_select_save[0].column[0]] == null ? Store.defaultcollen : cfg["columlen"][Store.luckysheet_select_save[0].column[0]]; + let first_collen = cfg["columnlen"][Store.luckysheet_select_save[0].column[0]] == null ? Store.defaultcollen : cfg["columnlen"][Store.luckysheet_select_save[0].column[0]]; let isSame = true; for(let i = 0; i < Store.luckysheet_select_save.length; i++){ @@ -788,7 +788,7 @@ export function rowColumnOperationInitial(){ let c1 = s.column[0], c2 = s.column[1]; for(let c = c1; c <= c2; c++){ - let collen = cfg["columlen"][c] == null ? Store.defaultcollen : cfg["columlen"][c]; + let collen = cfg["columnlen"][c] == null ? Store.defaultcollen : cfg["columnlen"][c]; if(collen != first_collen){ isSame = false; @@ -1443,8 +1443,8 @@ export function rowColumnOperationInitial(){ else if(Store.luckysheetRightHeadClickIs == "column"){ type = "resizeC"; - if(cfg["columlen"] == null){ - cfg["columlen"] = {}; + if(cfg["columnlen"] == null){ + cfg["columnlen"] = {}; } for(let s = 0; s < Store.luckysheet_select_save.length; s++){ @@ -1452,7 +1452,7 @@ export function rowColumnOperationInitial(){ let c2 = Store.luckysheet_select_save[s].column[1]; for(let c = c1; c <= c2; c++){ - cfg["columlen"][c] = size; + cfg["columnlen"][c] = size; } } } @@ -1477,7 +1477,7 @@ export function rowColumnOperationInitial(){ jfrefreshgrid_rhcw(Store.flowdata.length, null); } else if(Store.luckysheetRightHeadClickIs == "column"){ - server.saveParam("cg", Store.currentSheetIndex, cfg["columlen"], { "k": "columlen" }); + server.saveParam("cg", Store.currentSheetIndex, cfg["columnlen"], { "k": "columnlen" }); jfrefreshgrid_rhcw(null, Store.flowdata[0].length); } }); @@ -1557,11 +1557,11 @@ function luckysheetcolsdbclick() { size = winW - 100 + scrollLeft; } - if (cfg["columlen"] == null) { - cfg["columlen"] = {}; + if (cfg["columnlen"] == null) { + cfg["columnlen"] = {}; } - cfg["columlen"][Store.luckysheet_cols_change_size_start[1]] = Math.ceil(size); + cfg["columnlen"][Store.luckysheet_cols_change_size_start[1]] = Math.ceil(size); matchColumn[col_index] = 1; } @@ -1607,17 +1607,17 @@ function luckysheetcolsdbclick() { size = winW - 100 + scrollLeft; } - if (cfg["columlen"] == null) { - cfg["columlen"] = {}; + if (cfg["columnlen"] == null) { + cfg["columnlen"] = {}; } - cfg["columlen"][c] = Math.ceil(size); + cfg["columnlen"][c] = Math.ceil(size); matchColumn[c] = 1; } } } - jfrefreshgridall(Store.flowdata[0].length, Store.flowdata.length, Store.flowdata, cfg, Store.luckysheet_select_save, "resizeC", "columlen"); + jfrefreshgridall(Store.flowdata[0].length, Store.flowdata.length, Store.flowdata, cfg, Store.luckysheet_select_save, "resizeC", "columnlen"); } /** diff --git a/src/controllers/selection.js b/src/controllers/selection.js index cd56e7d..a4a0cc6 100644 --- a/src/controllers/selection.js +++ b/src/controllers/selection.js @@ -183,11 +183,11 @@ const selection = { let style = "", span = ""; if(r == minR){ - if(Store.config == null || Store.config["columlen"] == null || Store.config["columlen"][c.toString()] == null){ + if(Store.config == null || Store.config["columnlen"] == null || Store.config["columnlen"][c.toString()] == null){ colgroup += '