diff --git a/src/controllers/protection.js b/src/controllers/protection.js
index 9e24a1a..2867e4e 100644
--- a/src/controllers/protection.js
+++ b/src/controllers/protection.js
@@ -909,7 +909,7 @@ export function checkProtectionLocked(r, c, sheetIndex){
return true;
}
- if(cell && cell.lo === 0){
+ if(cell && cell.lo === 0){ // lo为0的时候才是可编辑
return true;
}
@@ -945,10 +945,6 @@ export function checkProtectionCellHidden(r, c, sheetIndex){
//cell range locked state
export function checkProtectionLockedRangeList(rangeList, sheetIndex){
- //EPM-BUDGET-START
- if (rangeList[0].column[0] !== rangeList[0].column[1]) return true;
- //EPM-BUDGET-END
-
let sheetFile = sheetmanage.getSheetByIndex(sheetIndex);
if(sheetFile==null){
@@ -978,7 +974,7 @@ export function checkProtectionLockedRangeList(rangeList, sheetIndex){
for(let r=r1;r<=r2;r++){
for(let c=c1;c<=c2;c++){
- let isLock = sheetFile.data[r][c].lo === undefined || sheetFile.data[r][c].lo === 1,
+ let isLock = sheetFile.data[r][c].lo === undefined || sheetFile.data[r][c].lo === 1, // 单元格是否锁定
isPass = checkProtectionLockedSqref(r, c , aut, local_protection, true, isLock);
if(!isPass){
return false;
@@ -1009,7 +1005,7 @@ export function checkProtectionSelectLockedOrUnLockedCells(r, c, sheetIndex){
return true;
}
- if(cell && cell.lo === 0){//unlocked
+ if(cell && cell.lo === 0){ // lo为0的时候才是可编辑
if(aut.selectunLockedCells==1 || aut.selectunLockedCells==null){
return true;
}
diff --git a/src/css/luckysheet-core.css b/src/css/luckysheet-core.css
index eb89815..b8236c8 100644
--- a/src/css/luckysheet-core.css
+++ b/src/css/luckysheet-core.css
@@ -957,6 +957,8 @@
}
.luckysheet-sheet-area {
+ width: 100%;
+ box-sizing: border-box;
position: absolute;
right: 0;
bottom: 0;
@@ -970,6 +972,26 @@
-webkit-touch-callout: none;
cursor: default;
transition: .3s ease all;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+#luckysheet-sheet-content {
+ width: 0;
+ flex: 3;
+ display: flex;
+ align-items: center;
+}
+#luckysheet-sheet-content .lucky-button-custom {
+}
+
+#luckysheet-bottom-pager {
+ width: 0;
+ background-color: #fafafc;
+ z-index: 1;
+ flex: 2;
+ text-align: right;
+ white-space: nowrap;
}
.luckysheet-sheet-area>div,
@@ -1047,8 +1069,9 @@ div.luckysheet-sheets-m:hover {
padding: 0px 0px;
margin-left: 0px;
position: relative;
- max-width: 50%;
+ max-width: 70%;
vertical-align: bottom;
+ display: inline-block;
}
.luckysheet-sheet-area div.luckysheet-sheet-container div.luckysheet-sheet-container-c {
diff --git a/src/global/api.js b/src/global/api.js
index 53da9eb..0a975ef 100644
--- a/src/global/api.js
+++ b/src/global/api.js
@@ -6548,16 +6548,21 @@ export function getTxtByRange(range=Store.luckysheet_select_save){
* @param {Number} config.total 总条数
*/
export function pagerInit (config) {
+ const {prevPage, nextPage, total} = locale().button;
+ console.log(locale().button, prevPage, locale())
$('#luckysheet-bottom-pager').remove()
- $('#luckysheet-sheet-area').append('')
+ $('#luckysheet-sheet-content').after('')
$("#luckysheet-bottom-pager").sPage({
page: config.pageIndex, //当前页码,必填
total: config.total, //数据总条数,必填
selectOption: config.selectOption, // 选择每页的行数,
pageSize: config.pageSize, //每页显示多少条数据,默认10条
- showTotal: true, // 是否显示总数
- showSkip: config.showSkip || true, //是否显示跳页,默认关闭:false
- showPN: config.showPN || true, //是否显示上下翻页,默认开启:true
+ showTotal: config.showTotal, // 是否显示总数,默认关闭:false
+ showSkip: config.showSkip, //是否显示跳页,默认关闭:false
+ showPN: config.showPN, //是否显示上下翻页,默认开启:true
+ prevPage: config.prevPage || prevPage, //上翻页文字描述,默认"上一页"
+ nextPage: config.nextPage || nextPage, //下翻页文字描述,默认"下一页"
+ totalTxt: config.totalTxt || total + config.total, // 数据总条数文字描述,{total}为占位符,默认"总共:{total}"
backFun: function (page) {
page.pageIndex = page.page
if(!method.createHookFunction("onTogglePager", page)){ return; }
diff --git a/src/global/format.js b/src/global/format.js
index 0123c08..1fed643 100644
--- a/src/global/format.js
+++ b/src/global/format.js
@@ -1787,26 +1787,21 @@ export function genarate(value) {//万 单位格式增加!!!
ct = { "fa": "@", "t": "s" };
}
else if(isRealNum(value) && Math.abs(parseFloat(value)) > 0 && (Math.abs(parseFloat(value)) >= 1e+11 || Math.abs(parseFloat(value)) < 1e-9)){
- // 科学计数法还是保持文本格式
- v = value
- m = value
- ct= {"fa": '@', "t": "n"}
-
- // v = numeral(value).value();
- // var str = v.toExponential();
- // if(str.indexOf(".") > -1){
- // var strlen = str.split(".")[1].split("e")[0].length;
- // if(strlen > 5){
- // strlen = 5;
- // }
-
- // ct = { "fa": "#0."+ new Array(strlen + 1).join("0") +"E+00", "t": "n" };
- // }
- // else{
- // ct = { "fa": "#0.E+00", "t": "n" };
- // }
-
- // m = SSF.format(ct.fa, v);
+ v = numeral(value).value();
+ var str = v.toExponential();
+ if(str.indexOf(".") > -1){
+ var strlen = str.split(".")[1].split("e")[0].length;
+ if(strlen > 5){
+ strlen = 5;
+ }
+
+ ct = { "fa": "#0."+ new Array(strlen + 1).join("0") +"E+00", "t": "n" };
+ }
+ else{
+ ct = { "fa": "#0.E+00", "t": "n" };
+ }
+
+ m = SSF.format(ct.fa, v);
}
else if(value.toString().indexOf("%") > -1){
var index = value.toString().indexOf("%");
diff --git a/src/global/refresh.js b/src/global/refresh.js
index b2be6c1..5482e50 100644
--- a/src/global/refresh.js
+++ b/src/global/refresh.js
@@ -102,7 +102,6 @@ function jfrefreshgrid(data, range, allParam, isRunExecFunction = true, isRefres
"data": Store.flowdata,
"curData": data,
"sheetIndex": Store.currentSheetIndex,
- "range": range,
"config": $.extend(true, {}, Store.config),
"curConfig": curConfig,
"cdformat": $.extend(true, [], file["luckysheet_conditionformat_save"]),
@@ -112,6 +111,7 @@ function jfrefreshgrid(data, range, allParam, isRunExecFunction = true, isRefres
"curDataVerification": curDataVerification,
"dynamicArray": $.extend(true, [], file["dynamicArray"]),
"curDynamicArray": curDynamicArray,
+ "range": range,
"dataRange": [...file.luckysheet_select_save]// 保留操作时的选区
});
}
diff --git a/src/locale/en.js b/src/locale/en.js
index b98a194..bb4dbf5 100644
--- a/src/locale/en.js
+++ b/src/locale/en.js
@@ -8919,6 +8919,9 @@ export default {
update:"Update",
delete:"Delete",
insert:"Insert",
+ prevPage: "Previous",
+ nextPage: "Next",
+ total: "total:"
},
paint:{
start: 'Paint format start',
diff --git a/src/locale/es.js b/src/locale/es.js
index 0d5b8cf..b43baf2 100644
--- a/src/locale/es.js
+++ b/src/locale/es.js
@@ -8918,6 +8918,9 @@ export default {
update:"Actualizar",
delete:"Eliminar",
insert:"Insertar",
+ prevPage: "Previous",
+ nextPage: "Next",
+ total: "total:"
},
paint:{
start: 'Inicio clonar formato',
diff --git a/src/locale/zh.js b/src/locale/zh.js
index 7a83126..1fe6421 100644
--- a/src/locale/zh.js
+++ b/src/locale/zh.js
@@ -9144,6 +9144,9 @@ export default {
update:"Update",
delete:"Delete",
insert:"新建",
+ prevPage: "上一页",
+ nextPage: "下一页",
+ total: "总共:"
},
paint: {
start: '格式刷开启',
diff --git a/src/locale/zh_tw.js b/src/locale/zh_tw.js
index 55515bf..ce50db8 100644
--- a/src/locale/zh_tw.js
+++ b/src/locale/zh_tw.js
@@ -9140,6 +9140,9 @@ export default {
update : "Update",
delete : "Delete",
insert : "新建",
+ prevPage: "上一頁",
+ nextPage: "下一頁",
+ total: "總共:"
},
paint: {
start : '格式刷開啟',
diff --git a/src/plugins/jquery.sPage.css b/src/plugins/jquery.sPage.css
index 2224334..b7cf6fa 100644
--- a/src/plugins/jquery.sPage.css
+++ b/src/plugins/jquery.sPage.css
@@ -1,7 +1,3 @@
-#luckysheet-bottom-pager {
- margin-right: 10px;
- float: right;
-}
.spage-total {
display: inline-block;
margin-right: 10px;
diff --git a/src/plugins/js/jquery.sPage.min.js b/src/plugins/js/jquery.sPage.min.js
index fffd2e9..9bab055 100644
--- a/src/plugins/js/jquery.sPage.min.js
+++ b/src/plugins/js/jquery.sPage.min.js
@@ -6,7 +6,7 @@
pageSize: 200,
total: 0,
showTotal: false,
- totalTxt: "共{total}条",
+ totalTxt: '',
noData: false,
showSkip: false,
showPN: true,
@@ -50,7 +50,7 @@
this.pageTatol = e;
this.pageNum = t.page;
if (t.showTotal) {
- a.push('
' + t.totalTxt.replace(/\{(\w+)\}/gi, t.total) + "
")
+ a.push('
' + t.totalTxt + "
")
}
a.push('
');
this.pageList = [];