Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
electron-printer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhuzhequan
electron-printer
Commits
ae3a0358
Commit
ae3a0358
authored
Feb 11, 2026
by
linjinhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:设置图片位置在顶部居中
parent
f698952b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
src/views/design/main/imgSetting.vue
+1
-1
src/views/design/main/index.vue
+2
-4
No files found.
src/views/design/main/imgSetting.vue
View file @
ae3a0358
...
...
@@ -88,7 +88,7 @@ export default {
"position_before_px"
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
item
)),
);
// console.log("setting", setting
);
console
.
log
(
"this.item"
,
this
.
item
);
let
x_mm
,
w_mm
,
h_mm
,
y_mm
;
x_mm
=
this
.
pxToUnit
(
this
.
item
.
x
);
...
...
src/views/design/main/index.vue
View file @
ae3a0358
...
...
@@ -825,8 +825,6 @@ export default {
let
h
=
bh
/
2
;
let
width_px
,
height_px
,
rate
,
x
,
y
;
let
data
=
await
that
.
getImageSize
(
files
[
i
].
url
);
console
.
log
(
"data"
,
data
);
console
.
log
(
"that.WHproportion"
,
that
.
WHproportion
);
if
(
size
&&
!
files
[
i
].
isCut
)
{
console
.
log
(
"size"
,
size
);
...
...
@@ -860,7 +858,7 @@ export default {
// height_px = width_px * rate > bh ? bh : width_px * rate;
height_px
=
width_px
*
rate
;
x
=
width_px
/
2
;
y
=
h
;
y
=
h
eight_px
/
2
;
}
}
this
.
currentImgData
=
{
...
data
};
...
...
@@ -885,7 +883,7 @@ export default {
if
(
size
&&
!
files
[
i
].
isCut
)
{
that
.
ev
(
"cover"
);
}
else
{
that
.
ev
(
"center"
);
that
.
ev
(
"
x_
center"
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment