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

Commit

Permalink
fix(destroy function repaire): repair
Browse files Browse the repository at this point in the history
  • Loading branch information
tubiaoge committed Oct 12, 2020
1 parent 5f11899 commit 02b9fe7
Show file tree
Hide file tree
Showing 7 changed files with 108 additions and 23 deletions.
4 changes: 3 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ async function core() {
file: 'dist/luckysheet.umd.js',
format: 'umd',
name: 'luckysheet',
sourcemap: true
sourcemap: true,
inlineDynamicImports:true,

});

if(production){
Expand Down
10 changes: 5 additions & 5 deletions src/controllers/constant.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/controllers/menuButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -2809,7 +2809,7 @@ const menuButton = {
const locale_print = _locale.print;
if($menuButton.length == 0){
let itemdata = [
{"text": locale_print.menuItemPrint, "value": "print", "example": '<i class="iconfont icon-sousuo" aria-hidden="true"></i>'},
{"text": locale_print.menuItemPrint, "value": "print", "example": '<i class="iconfont icon-dayin" aria-hidden="true"></i>'},
{"text": "", "value": "split", "example": ""},
{"text": locale_print.menuItemAreas, "value": "areas", "example": '<i class="iconfont icon-tihuan" aria-hidden="true"></i>'},
{"text": locale_print.menuItemRows, "value": "rows", "example": '<i class="iconfont icon-zhuandao1" aria-hidden="true"></i>'},
Expand Down
4 changes: 3 additions & 1 deletion src/controllers/print.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {zoomChange} from './zoom';
import sheetmanage from './sheetmanage';
import server from './server';
import Store from '../store';
// import { jsPDF } from "jspdf";
import { jsPDF } from "jspdf";

let ExcelPlaceholder = {
"[tabName]":"&A",
Expand Down Expand Up @@ -71,6 +71,8 @@ export function viewChange(curType, preType){
// server.saveParam("all", Store.currentSheetIndex, curZoom, { "k": "zoomRatio" });
server.saveParam("cg", Store.currentSheetIndex, curType, { "k": "curentsheetView" });

Store.currentSheetView = curType;

zoomChange(curZoom);
}

Expand Down
103 changes: 91 additions & 12 deletions src/global/method.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import server from '../controllers/server';
import { luckysheetlodingHTML, luckyColor } from '../controllers/constant';
import sheetmanage from '../controllers/sheetmanage';
import luckysheetformula from './formula';
import imageCtrl from '../controllers/imageCtrl';
import dataVerificationCtrl from '../controllers/dataVerificationCtrl';
import pivotTable from '../controllers/pivotTable';
import luckysheetFreezen from '../controllers/freezen';
import { getSheetIndex } from '../methods/get';
Expand Down Expand Up @@ -146,9 +148,11 @@ const defaultConfig = {
inlineStringEditRange:null,

fontList:[],

currentSheetView:"viewNormal",

},
defualtFormula:{
defaultFormula:{
searchFunctionCell: null,
functionlistPosition: {},
rangechangeindex: null,
Expand Down Expand Up @@ -192,14 +196,14 @@ const defaultConfig = {
functionResizeTimeout: null,
data_parm_index: 0 //选择公式后参数索引标记
},
defualtSheet:{
defaultSheet:{
sheetMaxIndex: 0,
nulldata: null,
mergeCalculationSheet:{},
checkLoadSheetIndexToDataIndex:{},
CacheNotLoadControll:[],
},
defualtPivotTable:{
defaultPivotTable:{
pivotDatas: null,
pivotSheetIndex: 0,
pivotDataSheetIndex: 0,
Expand All @@ -224,6 +228,64 @@ const defaultConfig = {
movesave: {},
drawPivotTable: true,
pivotTableBoundary: [12, 6],
},
defaultImage:{
imgItem: {
type: '3', //1移动并调整单元格大小 2移动并且不调整单元格的大小 3不要移动单元格并调整其大小
src: '', //图片url
originWidth: null, //图片原始宽度
originHeight: null, //图片原始高度
default: {
width: null, //图片 宽度
height: null, //图片 高度
left: null, //图片离表格左边的 位置
top: null, //图片离表格顶部的 位置
},
crop: {
width: null, //图片裁剪后 宽度
height: null, //图片裁剪后 高度
offsetLeft: 0, //图片裁剪后离未裁剪时 左边的位移
offsetTop: 0, //图片裁剪后离未裁剪时 顶部的位移
},
isFixedPos: false, //固定位置
fixedLeft: null, //固定位置 左位移
fixedTop: null, //固定位置 右位移
border: {
width: 0, //边框宽度
radius: 0, //边框半径
style: 'solid', //边框类型
color: '#000', //边框颜色
}
},
images: null,
currentImgId: null,
currentWinW: null,
currentWinH: null,
resize: null,
resizeXY: null,
move: false,
moveXY: null,
cropChange: null,
cropChangeXY: null,
cropChangeObj: null,
copyImgItemObj: null,
},
defaultDataVerification:{
defaultItem: {
type: 'dropdown', //类型
type2: null, //
value1: '', //
value2: '', //
checked: false,
remote: false, //自动远程获取选项
prohibitInput: false, //输入数据无效时禁止输入
hintShow: false, //选中单元格时显示提示语
hintText: '', //
},
curItem: null,
dataVerification: null,
selectRange: [],
selectStatus: false,
}
}

Expand Down Expand Up @@ -396,26 +458,43 @@ const method = {
}
}

let defualtFormula = $.extend(true, {}, defaultConfig.defualtFormula);
for(let key in defualtFormula){
let defaultFormula = $.extend(true, {}, defaultConfig.defaultFormula);
for(let key in defaultFormula){
if(key in luckysheetformula){
luckysheetformula[key] = defualtFormula[key];
luckysheetformula[key] = defaultFormula[key];
}
}

let defualtSheet = $.extend(true, {}, defaultConfig.defualtSheet);
for(let key in defualtSheet){
let defaultSheet = $.extend(true, {}, defaultConfig.defaultSheet);
for(let key in defaultSheet){
if(key in sheetmanage){
sheetmanage[key] = defualtSheet[key];
sheetmanage[key] = defaultSheet[key];
}
}

let defualtPivotTable = $.extend(true, {}, defaultConfig.defualtPivotTable);
for(let key in defualtPivotTable){
let defaultPivotTable = $.extend(true, {}, defaultConfig.defaultPivotTable);
for(let key in defaultPivotTable){
if(key in pivotTable){
pivotTable[key] = defualtPivotTable[key];
pivotTable[key] = defaultPivotTable[key];
}
}

let defaultImage = $.extend(true, {}, defaultConfig.defaultImage);
for(let key in defaultImage){
if(key in imageCtrl){
imageCtrl[key] = defaultImage[key];
}
}

let defaultDataVerification = $.extend(true, {}, defaultConfig.defaultDataVerification);
for(let key in defaultDataVerification){
if(key in dataVerificationCtrl){
dataVerificationCtrl[key] = defaultDataVerification[key];
}
}



},
editorChart:function(c){
let chart_selection_color = luckyColor[0];
Expand Down
6 changes: 3 additions & 3 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
}
],
data:
// [sheetCell,sheetFormula,sheetConditionFormat,sheetSparkline,sheetTable,sheetComment,sheetPivotTableData,sheetPivotTable,sheetChart,sheetPicture,sheetDataVerification]
[sheetCell,sheetFormula,sheetConditionFormat,sheetSparkline,sheetTable,sheetComment,sheetPivotTableData,sheetPivotTable,sheetChart,sheetPicture,sheetDataVerification]
/*[{"name":"Sheet1","config":{"columnlen":{"0":241},"rowlen":{"0":81}},"index":"1","status":"1","order":"0","luckysheet_select_save":[{"row":[0,0],"column":[4,4],"sheetIndex":1}],"zoomRatio":1,"showGridLines":"1","defaultColWidth":72,"defaultRowHeight":18,"celldata":[
{"r":0,"c":0,
"v":{
Expand Down Expand Up @@ -96,7 +96,7 @@
{"r":17,"c":2,"v":{"v":"Luckysheet","ct":{"fa":"General","t":"g"},"bg":null,"bl":0,"it":0,"ff":0,"fs":"11","fc":"rgb(51, 51, 51)","ht":1,"vt":1,"m":"Luckysheet"}}
],"calcChain":[]}]*/


/*
[{
"name": "Cell",
"config": {
Expand Down Expand Up @@ -1782,7 +1782,7 @@
],
"scrollLeft": 0,
"scrollTop": 0
}]
}]*/
})

})
Expand Down
2 changes: 2 additions & 0 deletions src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ const Store = {

fontList:[],

currentSheetView:"viewNormal",

}

export default Store;

0 comments on commit 02b9fe7

Please sign in to comment.