Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pptist
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
viitto
pptist
Commits
62edb4e2
Commit
62edb4e2
authored
Jan 05, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复 横竖尺寸
parent
839b2d0b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
CustomElement.md
doc/CustomElement.md
+2
-2
Index.vue
src/components/PSD/Index.vue
+6
-0
No files found.
doc/CustomElement.md
View file @
62edb4e2
...
...
@@ -374,8 +374,8 @@ const createFrameElement = (url: string) => {
width
:
800
,
height
:
480
,
rotate
:
0
,
left
:
(
VIEWPORT_SIZE
-
800
)
/
2
,
top
:
(
VIEWPORT_SIZE
*
viewportRatio
.
value
-
480
)
/
2
,
left
:
(
VIEWPORT_SIZE
.
Value
-
800
)
/
2
,
top
:
(
VIEWPORT_SIZE
.
Value
*
viewportRatio
.
value
-
480
)
/
2
,
url
,
})
}
...
...
src/components/PSD/Index.vue
View file @
62edb4e2
...
...
@@ -83,6 +83,7 @@ import AliyunUpload from '@/utils/upload/aliyun'
import
{
useFontStore
,
useScreenStore
}
from
'@/store'
import
{
CustomerFonts
}
from
'@/store/font'
import
{
injectKeyDataSource
,
injectKeyTemplate
}
from
'@/types/injectKey'
import
{
VIEWPORT_SIZE
,
VIEWPORT_VER_SIZE
}
from
'@/configs/canvas'
const
props
=
defineProps
({
visible
:{
...
...
@@ -125,8 +126,13 @@ const handleChange: UploadProps['onChange'] = (uploadFile, uploadFiles) => {
queryObj
.
value
.
Width
=
DrawingBoardSize
.
Width
queryObj
.
value
.
Height
=
DrawingBoardSize
.
Height
queryObj
.
value
.
TempType
=
queryObj
.
value
.
Width
>
queryObj
.
value
.
Height
?
1
:
2
VIEWPORT_SIZE
.
Value
=
queryObj
.
value
.
Height
VIEWPORT_VER_SIZE
.
Value
=
queryObj
.
value
.
Width
let
viewportRatio
=
queryObj
.
value
.
Height
/
queryObj
.
value
.
Width
useSlidesStore
().
setViewportRatio
(
viewportRatio
)
}
else
{
VIEWPORT_SIZE
.
Value
=
1754
VIEWPORT_VER_SIZE
.
Value
=
1240
}
fonts
.
value
=
getFonts
(
psd
)
if
(
fonts
.
value
){
...
...
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