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
552a6470
Commit
552a6470
authored
Jun 05, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Plain Diff
no message
parents
f2c63b22
7f600976
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
17 deletions
+37
-17
text.ts
src/utils/psdParser/text.ts
+30
-10
index.vue
src/views/Editor/Thumbnails/index.vue
+3
-3
PreviewCover.vue
src/views/Preview/PreviewCover.vue
+3
-3
Review.vue
src/views/components/Order/Review.vue
+1
-1
No files found.
src/utils/psdParser/text.ts
View file @
552a6470
...
...
@@ -15,7 +15,8 @@ export const ResolveText = (item: any, index: number,offsetLeft:number,offsetTop
let
f
=
item
.
layer
.
typeTool
().
export
()
const
{
left
,
top
,
width
,
height
,
value
,
font
,
transform
}
=
f
const
{
colors
,
styles
,
alignment
,
sizes
,
names
,
weights
}
=
font
const
{
colors
,
styles
,
alignment
,
sizes
,
names
,
weights
,
textDecoration
}
=
font
if
(
value
.
indexOf
(
'独家安排'
)
!=-
1
)
console
.
log
(
f
,
font
)
let
fontSize
=
24.0
let
newSizes
=
sizes
?
sizes
:[
12
]
//if(value=='12980') console.log(newSizes,transform,extractScale(transform))
...
...
@@ -40,12 +41,27 @@ export const ResolveText = (item: any, index: number,offsetLeft:number,offsetTop
let
color
=
`rgba(
${
colors
[
0
][
0
]}
,
${
colors
[
0
][
1
]}
,
${
colors
[
0
][
2
]}
,
${(
parseFloat
(
colors
[
0
][
3
])
/
255.0
).
toFixed
(
2
)}
)`
let
style
=
`text-align:
${
alignment
[
0
]}
; font-size:
${
fontSize
-
2
}
px; font-weight:
${
weights
[
0
]}
;`
if
(
font
.
textDecoration
||
StyleSheetData
.
Strikethrough
)
{
style
+=
`text-decoration:
${
font
.
textDecoration
?
font
.
textDecoration
[
0
]
:
''
}
${
StyleSheetData
.
Strikethrough
?
' line-through'
:
''
}
;`
}
if
(
StyleSheetData
.
FauxItalic
){
style
+=
`font-style:italic;`
let
styleArray
:
string
[]
=
[]
const
lineCount
=
value
.
split
(
'
\
r'
).
length
for
(
let
i
=
0
;
i
<
lineCount
;
i
++
)
{
const
align
=
alignment
.
length
>
i
?
alignment
[
i
]:
alignment
[
alignment
.
length
-
1
]
const
sizestyle
=
newSizes
.
length
>
i
?
newSizes
[
i
]:
newSizes
[
newSizes
.
length
-
1
]
const
weight
=
weights
.
length
>
i
?
weights
[
i
]:
weights
[
weights
.
length
-
1
]
const
decoration
=
textDecoration
?
textDecoration
[
i
]:
textDecoration
[
textDecoration
.
length
-
1
]
let
fz
=
24.0
if
(
transform
)
{
fz
=
Math
.
round
(
sizestyle
*
extractScale
(
transform
))
}
else
{
fz
=
sizestyle
}
let
style
=
`text-align:
${
align
}
; font-size:
${
fz
-
2
}
px; font-weight:
${
weight
}
;`
if
(
decoration
||
StyleSheetData
.
Strikethrough
)
{
style
+=
`text-decoration:
${
decoration
}
${
StyleSheetData
.
Strikethrough
?
' line-through'
:
''
}
;`
}
if
(
StyleSheetData
.
FauxItalic
){
style
+=
`font-style:italic;`
}
styleArray
.
push
(
style
)
}
...
...
@@ -65,15 +81,18 @@ export const ResolveText = (item: any, index: number,offsetLeft:number,offsetTop
color
=
'transparent'
,
textShadow
=
null
clip
=
true
style
+=
`background:
${
background
}
!important;-webkit-background-clip: text !important;`
styleArray
.
forEach
((
s
:
string
)
=>
{
s
+=
`background:
${
background
}
!important;-webkit-background-clip: text !important;`
});
}
if
(
objectEFFFects
&&
objectEFFFects
.
data
?.
FrFX
?.
enab
){
stroke
=
getStrokeHandler
(
objectEFFFects
)
}
const
valuesStr
=
value
.
split
(
'
\
r'
)
let
content
=
''
valuesStr
.
forEach
((
x
:
any
)
=>
{
content
+=
`<p><span style="
${
style
}
">
${
HtmlUtil
.
htmlEncodeByRegExp
(
x
)}
</span></p>`
valuesStr
.
forEach
((
x
:
any
,
si
:
number
)
=>
{
content
+=
`<p><span style="
${
style
Array
[
si
]
}
">
${
HtmlUtil
.
htmlEncodeByRegExp
(
x
)}
</span></p>`
})
const
isVertical
=
item
.
layer
.
adjustments
.
typeTool
.
obj
.
textData
.
Ornt
.
value
!=
'Hrzn'
...
...
@@ -108,6 +127,7 @@ export const ResolveText = (item: any, index: number,offsetLeft:number,offsetTop
fontName
[
i
]
=
x
}
}
if
(
value
.
indexOf
(
'独家安排'
)
!=-
1
)
console
.
log
(
styleArray
,
lineCount
)
let
element
:
PPTTextElement
=
{
id
:
"text_"
+
index
,
type
:
'text'
,
...
...
src/views/Editor/Thumbnails/index.vue
View file @
552a6470
...
...
@@ -600,9 +600,9 @@ const ResolveTripLogoHandler = async (items:any, slideIndex:number,dark:false,da
if
(
scale
>=
1
&&
scale
<
3
&&!
day
)
url
=
dark
==
true
?
acquiesceLogo
.
value
[
0
]:
acquiesceLogo
.
value
[
3
]
if
(
scale
>=
1
&&
scale
<
3
&&
day
)
url
=
acquiesceLogo
.
value
[
6
]
if
(
scale
<
1
)
url
=
dark
==
true
?
acquiesceLogo
.
value
[
1
]:
acquiesceLogo
.
value
[
4
]
if
(
scale
>=
6
)
url
=
dark
==
true
?
acquiesceLogo
.
value
[
2
]:
acquiesceLogo
.
value
[
5
]
if
(
scale
>=
3
&&
scale
<
6
&&!
day
)
url
=
dark
==
true
?
acquiesceLogo
.
value
[
2
]:
acquiesceLogo
.
value
[
5
]
if
(
scale
>=
3
&&
scale
<
6
&&
day
)
url
=
acquiesceLogo
.
value
[
2
]
if
(
scale
>=
5
)
url
=
dark
==
true
?
acquiesceLogo
.
value
[
2
]:
acquiesceLogo
.
value
[
5
]
if
(
scale
>=
3
&&
scale
<
5
&&!
day
)
url
=
dark
==
true
?
acquiesceLogo
.
value
[
2
]:
acquiesceLogo
.
value
[
5
]
if
(
scale
>=
3
&&
scale
<
5
&&
day
)
url
=
acquiesceLogo
.
value
[
2
]
let
newTempSize
=
await
FileService
.
getImageSizeWithoutDownloading
(
url
)
let
width
=
0
let
height
=
0
...
...
src/views/Preview/PreviewCover.vue
View file @
552a6470
...
...
@@ -174,9 +174,9 @@ const ResolveTripLogoHandler = async (items:any, slideIndex:number,dark:false,da
if
(
scale
>=
1
&&
scale
<
3
&&!
day
)
url
=
dark
==
true
?
acquiesceLogo
.
value
[
0
]:
acquiesceLogo
.
value
[
3
]
if
(
scale
>=
1
&&
scale
<
3
&&
day
)
url
=
acquiesceLogo
.
value
[
6
]
if
(
scale
<
1
)
url
=
dark
==
true
?
acquiesceLogo
.
value
[
1
]:
acquiesceLogo
.
value
[
4
]
if
(
scale
>=
6
)
url
=
dark
==
true
?
acquiesceLogo
.
value
[
2
]:
acquiesceLogo
.
value
[
5
]
if
(
scale
>=
3
&&
scale
<
6
&&!
day
)
url
=
dark
==
true
?
acquiesceLogo
.
value
[
2
]:
acquiesceLogo
.
value
[
5
]
if
(
scale
>=
3
&&
scale
<
6
&&
day
)
url
=
acquiesceLogo
.
value
[
2
]
if
(
scale
>=
5
)
url
=
dark
==
true
?
acquiesceLogo
.
value
[
2
]:
acquiesceLogo
.
value
[
5
]
if
(
scale
>=
3
&&
scale
<
5
&&!
day
)
url
=
dark
==
true
?
acquiesceLogo
.
value
[
2
]:
acquiesceLogo
.
value
[
5
]
if
(
scale
>=
3
&&
scale
<
5
&&
day
)
url
=
acquiesceLogo
.
value
[
2
]
let
newTempSize
=
await
FileService
.
getImageSizeWithoutDownloading
(
url
)
let
width
=
0
let
height
=
0
...
...
src/views/components/Order/Review.vue
View file @
552a6470
...
...
@@ -175,7 +175,7 @@ const getOrderStatus = async ()=>{
const
response
=
await
OrderService
.
GetOrderPayStatusAsync
(
orderNum
.
value
)
if
(
response
.
data
.
resultCode
==
ApiResult
.
SUCCESS
){
stopTimerHandler
()
currentPayStatus
.
value
=
parseInt
(
response
.
data
.
message
)
currentPayStatus
.
value
=
parseInt
(
response
.
data
.
Status
)
PaySuccessDatas
.
value
=
response
.
data
.
data
dialogVisible
.
value
=
true
}
...
...
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