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

Commit

Permalink
fix(bug): bug
Browse files Browse the repository at this point in the history
bug
  • Loading branch information
wpxp123456 committed Jul 24, 2020
1 parent 59561bb commit 447735c
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 22 deletions.
32 changes: 16 additions & 16 deletions src/controllers/alternateformat.js
Original file line number Diff line number Diff line change
Expand Up @@ -977,22 +977,8 @@ const alternateformat = {

//应用范围
let rangeValue = $("#luckysheet-modal-dialog-slider-alternateformat #luckysheet-alternateformat-range input").val().trim();
if(formula.iscelldata(rangeValue)){
let cellrange = formula.getcellrange(rangeValue);
let isExists = _this.rangeIsExists(cellrange, dataIndex)[0];

if(isExists){
if(isEditMode()){
alert("您选择的应用范围已存在交替颜色且不属于你要编辑的应用范围!");
}
else{
tooltip.info("您选择的应用范围已存在交替颜色且不属于你要编辑的应用范围!", "");
}

return;
}
}
else{

if(!formula.iscelldata(rangeValue)){
if(isEditMode()){
alert("您选择的应用范围不是选区!");
}
Expand All @@ -1002,6 +988,20 @@ const alternateformat = {

return;
}

let cellrange = formula.getcellrange(rangeValue);
let isExists = _this.rangeIsExists(cellrange, dataIndex)[0];

if(isExists){
if(isEditMode()){
alert("您选择的应用范围已存在交替颜色且不属于你要编辑的应用范围!");
}
else{
tooltip.info("您选择的应用范围已存在交替颜色且不属于你要编辑的应用范围!", "");
}

return;
}

//页眉、页脚
let hasRowHeader;
Expand Down
24 changes: 18 additions & 6 deletions src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ import {
getluckysheetfile,
getluckysheet_select_save,
getconfig,
getvisibledatarow,
getvisibledatacolumn
} from './methods/get';
import {
setluckysheetfile,
setluckysheet_select_save,
setconfig,
} from './methods/set';
import { luckysheetrefreshgrid } from './global/refresh';

let luckysheet = {};

Expand Down Expand Up @@ -115,14 +119,22 @@ luckysheet.getluckysheetfile = getluckysheetfile;
//获取当前表格 选区
luckysheet.getluckysheet_select_save = getluckysheet_select_save;

//设置当前表格 选区
luckysheet.setluckysheet_select_save = setluckysheet_select_save;

//获取当前表格 config配置
luckysheet.getconfig = getconfig;

//获取当前表格 行高数据
luckysheet.getvisibledatarow = getvisibledatarow;
//设置当前表格 config配置
luckysheet.setconfig = setconfig;

//二维数组数据 转化成 {r, c, v}格式 一维数组 (传入参数为二维数据data)
luckysheet.getGridData = sheetmanage.getGridData;

//生成表格所需二维数组 (传入参数为表格数据对象file)
luckysheet.buildGridData = sheetmanage.buildGridData;

//获取当前表格 列宽数据
luckysheet.getvisibledatacolumn = getvisibledatacolumn;
luckysheet.luckysheetrefreshgrid = luckysheetrefreshgrid;

export {
luckysheet
Expand Down

0 comments on commit 447735c

Please sign in to comment.