|
|
|
@ -22,35 +22,35 @@ import locale from '../locale/locale'; |
|
|
|
import {menuToolBarWidth} from '../controllers/resize' |
|
|
|
|
|
|
|
export default function luckysheetcreatedom(colwidth, rowheight, data, menu, title) { |
|
|
|
//最少30行
|
|
|
|
if(rowheight < 30){ |
|
|
|
rowheight = 30; |
|
|
|
} |
|
|
|
// //最少30行
|
|
|
|
// if(rowheight < 30){
|
|
|
|
// rowheight = 30;
|
|
|
|
// }
|
|
|
|
|
|
|
|
//最少22列
|
|
|
|
if(colwidth < 22){ |
|
|
|
colwidth = 22; |
|
|
|
} |
|
|
|
// //最少22列
|
|
|
|
// if(colwidth < 22){
|
|
|
|
// colwidth = 22;
|
|
|
|
// }
|
|
|
|
|
|
|
|
let gh = gridHTML(); |
|
|
|
gh = replaceHtml(gh, { "logotitle": title });//设置title
|
|
|
|
gh = replaceHtml(gh, { "menu": menuToolBar() });//设置需要显示的菜单
|
|
|
|
|
|
|
|
if (data.length == 0) { |
|
|
|
Store.flowdata = datagridgrowth(data, rowheight, colwidth); |
|
|
|
} |
|
|
|
else if (data.length < rowheight && data[0].length < colwidth) { |
|
|
|
Store.flowdata = datagridgrowth(data, rowheight - data.length, colwidth - data[0].length); |
|
|
|
} |
|
|
|
else if (data.length < rowheight) { |
|
|
|
Store.flowdata = datagridgrowth(data, rowheight - data.length, 0); |
|
|
|
} |
|
|
|
else if (data[0].length < colwidth) { |
|
|
|
Store.flowdata = datagridgrowth(data, 0, colwidth - data[0].length); |
|
|
|
} |
|
|
|
else { |
|
|
|
Store.flowdata = data; |
|
|
|
} |
|
|
|
// if (data.length == 0) {
|
|
|
|
// Store.flowdata = datagridgrowth(data, rowheight, colwidth);
|
|
|
|
// }
|
|
|
|
// else if (data.length < rowheight && data[0].length < colwidth) {
|
|
|
|
// Store.flowdata = datagridgrowth(data, rowheight - data.length, colwidth - data[0].length);
|
|
|
|
// }
|
|
|
|
// else if (data.length < rowheight) {
|
|
|
|
// Store.flowdata = datagridgrowth(data, rowheight - data.length, 0);
|
|
|
|
// }
|
|
|
|
// else if (data[0].length < colwidth) {
|
|
|
|
// Store.flowdata = datagridgrowth(data, 0, colwidth - data[0].length);
|
|
|
|
// }
|
|
|
|
// else {
|
|
|
|
// Store.flowdata = data;
|
|
|
|
// }
|
|
|
|
|
|
|
|
let flowHTML = flow; |
|
|
|
if(Store.config == null){ |
|
|
|
@ -103,7 +103,7 @@ export default function luckysheetcreatedom(colwidth, rowheight, data, menu, tit |
|
|
|
menuToolBarWidth(); |
|
|
|
|
|
|
|
$("#luckysheet-scrollbar-x div").width(Store.ch_width); |
|
|
|
$("#luckysheet-scrollbar-y div").height(Store.rh_height - 30); |
|
|
|
$("#luckysheet-scrollbar-y div").height(Store.rh_height + Store.columeHeaderHeight - Store.cellMainSrollBarSize - 3); |
|
|
|
|
|
|
|
//新建行菜单
|
|
|
|
$("body").append(maskHTML); |
|
|
|
|