Skip to content

Commit

Permalink
fix: excel图片位置问题
Browse files Browse the repository at this point in the history
  • Loading branch information
501351981 committed Mar 21, 2024
1 parent ea9a870 commit a8ce4c7
Show file tree
Hide file tree
Showing 15 changed files with 438 additions and 8 deletions.
2 changes: 1 addition & 1 deletion core/packages/js-excel/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@js-preview/excel",
"type" :"module",
"version": "1.7.1",
"version": "1.7.2",
"description": "",
"main": "lib/index.js",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion core/packages/vue-excel/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue-office/excel",
"version": "1.7.1",
"version": "1.7.2",
"description": "",
"main": "lib/index.js",
"files": [
Expand Down
10 changes: 5 additions & 5 deletions core/packages/vue-excel/src/media.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ let devicePixelRatio = window.devicePixelRatio;
function calcPosition(sheet, range, offset, options){
let {widthOffset, heightOffset} = options;
let {tl={}, br={}} = range;
let {nativeCol, nativeColOff, nativeRow, nativeRowOff} = tl;
let {nativeCol=0, nativeColOff=0, nativeRow=0, nativeRowOff=0} = tl;

let basicX = clipWidth;
let basicY = clipHeight;
Expand All @@ -39,10 +39,10 @@ function calcPosition(sheet, range, offset, options){
let y = basicY + nativeRowOff/12700;

let {
nativeCol: nativeColEnd,
nativeColOff: nativeColOffEnd,
nativeRow: nativeRowEnd,
nativeRowOff: nativeRowOffEnd
nativeCol: nativeColEnd=0,
nativeColOff: nativeColOffEnd=0,
nativeRow: nativeRowEnd=0,
nativeRowOff: nativeRowOffEnd=0
} = br;
let width;
if(nativeCol === nativeColEnd){
Expand Down
1 change: 1 addition & 0 deletions examples/dist/assets/DocxDemo-389755be.js

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

1 change: 1 addition & 0 deletions examples/dist/assets/ExcelDemo-46393fb6.js

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

1 change: 1 addition & 0 deletions examples/dist/assets/JsDocxDemo-297054d3.js

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

1 change: 1 addition & 0 deletions examples/dist/assets/JsExcelDemo-5dfb080f.js

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

1 change: 1 addition & 0 deletions examples/dist/assets/JsPdfDemo-72995c07.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions examples/dist/assets/PdfDemo-678dff5a.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions examples/dist/assets/PreviewWrapper-99bcc9b3.js

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

Loading

0 comments on commit a8ce4c7

Please sign in to comment.