Commit 23c0565e authored by 宁天庆's avatar 宁天庆

修改代码

parent e7507c29
{
"name": "@cloudqms/luckysheet",
"version": "2.1.33",
"version": "2.1.34",
"main": "lib/index.js",
"devDependencies": {
"@babel/runtime": "^7.12.1",
......
......@@ -6952,7 +6952,7 @@ function calculateA4PaperSize() {
/**
* 补上左边框和上边框
*/
const addLeftAndTopBorders = (ctx, rowIndexs, columnIndexs, borderInfo) => {
const addLeftAndTopBorders = (ctx, rowIndexs, columnIndexs, borderInfo, str, stc) => {
let visibledatarow = Store.visibledatarow;
let visibledatacolumn = Store.visibledatacolumn;
function drawBorder(r, c, pos, border) {
......@@ -7021,14 +7021,14 @@ const addLeftAndTopBorders = (ctx, rowIndexs, columnIndexs, borderInfo) => {
}
for (let r = rowIndexs[0]; r <= rowIndexs[1]; r++) {
for (let c = columnIndexs[0]; c <= columnIndexs[1]; c++) {
if (c === 0) {
if ((c - stc) === 0) {
const border = getCellBorderInfo(r, c, 'top',
['border-left', 'border-right', 'border-bottom', 'border-inside', 'border-horizontal', 'border-vertical']);
border && border.borderType !== 'border-none' && console.log(r, c, 'top', border)
border && border.borderType !== 'border-none' && drawBorder(r, c, 'top', border);
}
if (r === 0) {
if ((r - str) === 0) {
const border = getCellBorderInfo(r, c, 'left',
['border-top', 'border-right', 'border-bottom', 'border-inside', 'border-horizontal', 'border-vertical']);
border && border.borderType !== 'border-none' && console.log(r, c, 'left', border)
......@@ -7112,7 +7112,7 @@ export function getScreenshotWithImg(action, options = {}) {
//补上 左边框和上边框
let ctx_newCanvas = newCanvas.get(0).getContext("2d");
addLeftAndTopBorders(ctx_newCanvas, range.row, range.column, Store.config.borderInfo);
addLeftAndTopBorders(ctx_newCanvas, range.row, range.column, Store.config.borderInfo, str, stc);
// ctx_newCanvas.beginPath();
// ctx_newCanvas.moveTo(
// 0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment