Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Commit

Permalink
feat(rightclick menu perfect): add rows and cols delete rows and cols…
Browse files Browse the repository at this point in the history
… hide rows and cols

rightclick
  • Loading branch information
wpxp123456 committed Jul 23, 2020
1 parent 1082ab0 commit 32f94a7
Show file tree
Hide file tree
Showing 9 changed files with 715 additions and 53 deletions.
2 changes: 1 addition & 1 deletion src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default {
config: {}, //表格行高、列宽、合并单元格、公式等设置
fullscreenmode: true, //是否全屏模式,非全屏模式下,标记框不会强制选中。
devicePixelRatio: window.devicePixelRatio, //设备比例,比例越大表格分标率越高
allowEdit: true, //是否允许前台编辑
allowEdit: false, //是否允许前台编辑
loadUrl: "", // 配置loadUrl的地址,luckysheet会通过ajax请求表格数据,默认载入status为1的sheet数据中的所有data,其余的sheet载入除data字段外的所有字段
loadSheetUrl: "", //配置loadSheetUrl的地址,参数为gridKey(表格主键) 和 index(sheet主键合集,格式为[1,2,3]),返回的数据为sheet的data字段数据集合
gridKey: "", // 表格唯一标识符
Expand Down
364 changes: 318 additions & 46 deletions src/controllers/constant.js

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions src/controllers/controlHistory.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,16 @@ const controlHistory = {

jfrefreshgrid_adRC(ctr.data, ctr.config, "addRC", ctrlValue, ctr.calc, ctr.filterObj, ctr.cf, ctr.af, ctr.freezen);
}
else if (ctr.type == "showHidRows") { // 隐藏、显示行 撤销操作
//config
Store.config = ctr.config;
Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].config = ctr.config;

server.saveParam("cg", ctr.sheetIndex, ctr.config["rowhidden"], { "k": "rowhidden" });

//行高、列宽 刷新
jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length);
}
else if (ctr.type == "datachangeAll") {
formula.execFunctionGroup();
jfrefreshgridall(ctr.data[0].length, ctr.data.length, ctr.data, null, ctr.range, "datachangeAll", ctr.ctrlValue);
Expand Down Expand Up @@ -371,6 +381,16 @@ const controlHistory = {
else if (ctr.type == "delRC") { //删除行列重做操作
jfrefreshgrid_adRC(ctr.curData, ctr.curConfig, "delRC", ctr.ctrlValue, ctr.curCalc, ctr.curFilterObj, ctr.curCf, ctr.curAf, ctr.curFreezen);
}
else if (ctr.type == "showHidRows") { // 隐藏、显示行 重做操作
//config
Store.config = ctr.curconfig;
Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].config = ctr.curconfig;

server.saveParam("cg", ctr.sheetIndex, ctr.curconfig["rowhidden"], { "k": "rowhidden" });

//行高、列宽 刷新
jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length);
}
else if (ctr.type == "datachangeAll") {
formula.execFunctionGroup();
jfrefreshgridall(ctr.curdata[0].length, ctr.curdata.length, ctr.curdata, null, ctr.currange, "datachangeAll", ctr.ctrlValue);
Expand Down
Loading

0 comments on commit 32f94a7

Please sign in to comment.