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

Commit

Permalink
fix(conflict): conflict
Browse files Browse the repository at this point in the history
conflict
  • Loading branch information
mengshukeji committed Oct 27, 2020
2 parents 8070858 + 4815d86 commit b11de26
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 27 deletions.
3 changes: 3 additions & 0 deletions README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@

![logo](/docs/.vuepress/public/img/logo_text.png)


</div>

简体中文 | [English](./README.md)

## 介绍
🚀Luckysheet ,一款纯前端类似excel的在线表格,功能强大、配置简单、完全开源。

> Luckysheet最近参加了“2020年度OSC中国开源项目评选”,为了支持Luckysheet更好的得到关注和发展,请大家帮忙投票: [https://www.oschina.net/p/luckysheet](https://www.oschina.net/p/luckysheet)
## 相关链接
| 源码 | 文档 | Demo | 插件Demo | 论坛 |
| ------ | -------- | ------ | ------ | ------ |
Expand Down
29 changes: 22 additions & 7 deletions src/controllers/dataVerificationCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,28 @@ const dataVerificationCtrl = {
return;
}

let str = range[range.length - 1].row[0],
edr = range[range.length - 1].row[1],
stc = range[range.length - 1].column[0],
edc = range[range.length - 1].column[1];
let d = editor.deepCopyFlowData(Store.flowdata);

if(str < 0){
str = 0;
}

if(edr > d.length - 1){
edr = d.length - 1;
}

if(stc < 0){
stc = 0;
}

if(edc > d[0].length - 1){
edc = d[0].length - 1;
}

let type = $("#luckysheet-dataVerification-dialog #data-verification-type-select").val();
let type2 = null, value1 = "", value2 = "";

Expand Down Expand Up @@ -699,13 +721,6 @@ const dataVerificationCtrl = {
let historyDataVerification = $.extend(true, {}, _this.dataVerification);
let currentDataVerification = $.extend(true, {}, _this.dataVerification);

let str = range[range.length - 1].row[0],
edr = range[range.length - 1].row[1],
stc = range[range.length - 1].column[0],
edc = range[range.length - 1].column[1];

let d = editor.deepCopyFlowData(Store.flowdata);

for(let r = str; r <= edr; r++){
for(let c = stc; c <= edc; c++){
currentDataVerification[r + '_' + c] = item;
Expand Down
8 changes: 4 additions & 4 deletions src/controllers/moreFormat.js
Original file line number Diff line number Diff line change
Expand Up @@ -675,19 +675,19 @@ const luckysheetMoreFormat = {
},
{
"name": "下午01:30",
"value": 'AM/PM hh:mm'
"value": '上午/下午 hh:mm'
},
{
"name": "下午1:30",
"value": 'AM/PM h:mm'
"value": '上午/下午 h:mm'
},
{
"name": "下午1:30:30",
"value": 'AM/PM h:mm:ss'
"value": '上午/下午 h:mm:ss'
},
{
"name": "08-05 下午01:30",
"value": "MM-dd AM/PM hh:mm"
"value": "MM-dd 上午/下午 hh:mm"
},
// {
// "name": "1930年8月5日星期二",
Expand Down
18 changes: 18 additions & 0 deletions src/controllers/sheetmanage.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,24 @@ const sheetmanage = {
});

server.saveParam("shr", null, orders);

Store.luckysheetfile.sort((x, y) => {
let order_x = x.order;
let order_y = y.order;

if(order_x != null && order_y != null){
return order_x - order_y;
}
else if(order_x != null){
return -1;
}
else if(order_y != null){
return 1;
}
else{
return 1;
}
})
},
createSheet: function() { //修复拖动sheet更新后台后,重新打开显示错误
let _this = this;
Expand Down
3 changes: 3 additions & 0 deletions src/global/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -4709,6 +4709,9 @@ export function setSheetActive(order, options = {}) {
success
} = {...options}

$("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active");
$("#luckysheet-sheets-item" + file.index).addClass("luckysheet-sheets-item-active");

sheetmanage.changeSheet(file.index);

setTimeout(() => {
Expand Down
40 changes: 28 additions & 12 deletions src/global/extend.js
Original file line number Diff line number Diff line change
Expand Up @@ -482,9 +482,17 @@ function luckysheetextendtable(type, index, value, direction, sheetIndex) {
else if(index == r){
if(direction == "lefttop"){
newDataVerification[(r + value) + "_" + c] = item;

for(let i = 0; i < value; i++){
newDataVerification[(r + i) + "_" + c] = item;
}
}
else{
newDataVerification[r + "_" + c] = item;

for(let i = 0; i < value; i++){
newDataVerification[(r + i + 1) + "_" + c] = item;
}
}
}
else{
Expand All @@ -498,9 +506,17 @@ function luckysheetextendtable(type, index, value, direction, sheetIndex) {
else if(index == c){
if(direction == "lefttop"){
newDataVerification[r + "_" + (c + value)] = item;

for(let i = 0; i < value; i++){
newDataVerification[r + "_" + (c + i)] = item;
}
}
else{
newDataVerification[r + "_" + c] = item;

for(let i = 0; i < value; i++){
newDataVerification[r + "_" + (c + i + 1)] = item;
}
}
}
else{
Expand Down Expand Up @@ -2112,20 +2128,20 @@ function luckysheetDeleteCell(type, str, edr, stc, edc, sheetIndex) {
let row_index = cfg["borderInfo"][i].value.row_index;
let col_index = cfg["borderInfo"][i].value.col_index;

if(row_index < str || col_index < stc){
borderInfo.push(cfg["borderInfo"][i]);
}
else if(row_index > edr || col_index > edc){
if(row_index > edr){
row_index -= rlen;
cfg["borderInfo"][i].value.row_index = row_index;
if(row_index < str || row_index > edr || col_index < stc || col_index > edc){
if(type == 'moveLeft'){
if(col_index > edc && row_index >= str && row_index <= edr){
col_index -= clen;
cfg["borderInfo"][i].value.col_index = col_index;
}
}

if(col_index > edc){
col_index -= clen;
cfg["borderInfo"][i].value.col_index = col_index;
else if(type == 'moveUp'){
if(row_index > edr && col_index >= stc && col_index <= edc){
row_index -= rlen;
cfg["borderInfo"][i].value.row_index = row_index;
}
}

borderInfo.push(cfg["borderInfo"][i]);
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/locale/zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -9390,19 +9390,19 @@ export default {
},
{
"name": "下午01:30",
"value": 'AM/PM hh:mm'
"value": '上午/下午 hh:mm'
},
{
"name": "下午1:30",
"value": 'AM/PM h:mm'
"value": '上午/下午 h:mm'
},
{
"name": "下午1:30:30",
"value": 'AM/PM h:mm:ss'
"value": '上午/下午 h:mm:ss'
},
{
"name": "08-05 下午01:30",
"value": "MM-dd AM/PM hh:mm"
"value": "MM-dd 上午/下午 hh:mm"
},
// {
// "name": "1930年8月5日星期二",
Expand Down

0 comments on commit b11de26

Please sign in to comment.