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
0a7d6f3b
Commit
0a7d6f3b
authored
Dec 22, 2023
by
zhengke
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/viitto/pptist
parents
d105c27e
93da0f78
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
4 deletions
+14
-4
components.d.ts
components.d.ts
+4
-0
slides.ts
src/types/slides.ts
+2
-1
layer.ts
src/utils/psdParser/layer.ts
+2
-0
resolve.ts
src/utils/psdParser/resolve.ts
+2
-2
index.vue
src/views/Editor/Thumbnails/index.vue
+4
-1
No files found.
components.d.ts
View file @
0a7d6f3b
...
...
@@ -18,16 +18,19 @@ declare module 'vue' {
Divider
:
typeof
import
(
'./src/components/Divider.vue'
)[
'default'
]
Drawer
:
typeof
import
(
'./src/components/Drawer.vue'
)[
'default'
]
EditableInput
:
typeof
import
(
'./src/components/ColorPicker/EditableInput.vue'
)[
'default'
]
ElAside
:
typeof
import
(
'element-plus/es'
)[
'ElAside'
]
ElButton
:
typeof
import
(
'element-plus/es'
)[
'ElButton'
]
ElCheckbox
:
typeof
import
(
'element-plus/es'
)[
'ElCheckbox'
]
ElCheckTag
:
typeof
import
(
'element-plus/es'
)[
'ElCheckTag'
]
ElCol
:
typeof
import
(
'element-plus/es'
)[
'ElCol'
]
ElContainer
:
typeof
import
(
'element-plus/es'
)[
'ElContainer'
]
ElDialog
:
typeof
import
(
'element-plus/es'
)[
'ElDialog'
]
ElDivider
:
typeof
import
(
'element-plus/es'
)[
'ElDivider'
]
ElEmpty
:
typeof
import
(
'element-plus/es'
)[
'ElEmpty'
]
ElIcon
:
typeof
import
(
'element-plus/es'
)[
'ElIcon'
]
ElImage
:
typeof
import
(
'element-plus/es'
)[
'ElImage'
]
ElInput
:
typeof
import
(
'element-plus/es'
)[
'ElInput'
]
ElMain
:
typeof
import
(
'element-plus/es'
)[
'ElMain'
]
ElOption
:
typeof
import
(
'element-plus/es'
)[
'ElOption'
]
ElPagination
:
typeof
import
(
'element-plus/es'
)[
'ElPagination'
]
ElRow
:
typeof
import
(
'element-plus/es'
)[
'ElRow'
]
...
...
@@ -37,6 +40,7 @@ declare module 'vue' {
ElTabPane
:
typeof
import
(
'element-plus/es'
)[
'ElTabPane'
]
ElTabs
:
typeof
import
(
'element-plus/es'
)[
'ElTabs'
]
ElTag
:
typeof
import
(
'element-plus/es'
)[
'ElTag'
]
ElTooltip
:
typeof
import
(
'element-plus/es'
)[
'ElTooltip'
]
ElUpload
:
typeof
import
(
'element-plus/es'
)[
'ElUpload'
]
FileInput
:
typeof
import
(
'./src/components/FileInput.vue'
)[
'default'
]
FormulaContent
:
typeof
import
(
'./src/components/LaTeXEditor/FormulaContent.vue'
)[
'default'
]
...
...
src/types/slides.ts
View file @
0a7d6f3b
...
...
@@ -701,7 +701,8 @@ export interface Slide {
background
?:
SlideBackground
animations
?:
PPTAnimation
[]
turningMode
?:
TurningMode
pageType
:
number
pageType
:
number
,
isTripItems
?:
boolean
}
/**
...
...
src/utils/psdParser/layer.ts
View file @
0a7d6f3b
...
...
@@ -12,6 +12,8 @@ export const ResolveLayer = async (item: any, index: number,offsetLeft:number,of
const
height
=
item
.
coords
.
bottom
-
item
.
coords
.
top
const
opacity
=
(
parseFloat
(
item
.
layer
.
opacity
)
/
255.0
).
toFixed
(
2
)
let
objectEFFFects
=
item
.
layer
.
objectEffects
?
item
.
layer
.
objectEffects
()
:
null
let
element
:
PPTImageElement
=
{
id
:
"img_"
+
index
,
type
:
'image'
,
...
...
src/utils/psdParser/resolve.ts
View file @
0a7d6f3b
...
...
@@ -42,6 +42,7 @@ export const ResolvePsdToSliderHandler = async (psd:any) => {
let
randomNum
=
Math
.
floor
(
Math
.
random
()
*
100
)
+
i
// let t =CreateDefaultSlider(ID_PREV+i)
let
t
=
CreateDefaultSlider
(
ID_PREV
+
randomNum
)
t
.
isTripItems
=
x
.
name
.
indexOf
(
'trip_item'
)
!=-
1
const
{
_children
}
=
x
if
(
_children
&&
_children
.
length
>
0
){
...
...
@@ -82,7 +83,7 @@ const CreateDefaultSlider = (id:string):Slide =>{
background
:
{
type
:
'solid'
,
color
:
'#ffffff'
,
}
,
}
}
}
...
...
@@ -95,7 +96,6 @@ const GetSlidersHandler = async (child:any[],offsetLeft:number,offsetTop:number,
Z_INDEX
--
if
(
x
.
layer
.
name
==
'first_row'
)
groupId
=
'first_row'
if
(
x
.
layer
.
name
==
'form_bg'
)
groupId
=
''
console
.
log
(
x
.
layer
.
name
,
groupId
)
if
(
x
.
layer
.
typeTool
){
elements
.
push
(
ResolveText
(
x
,
Z_INDEX
,
offsetLeft
,
offsetTop
,
groupId
))
}
...
...
src/views/Editor/Thumbnails/index.vue
View file @
0a7d6f3b
...
...
@@ -70,6 +70,7 @@ import Draggable from 'vuedraggable'
import
{
ElLoading
,
ElMessageBox
}
from
'element-plus'
import
FileService
from
'@/services/FileService'
import
{
VIEWPORT_SIZE
,
VIEWPORT_VER_SIZE
}
from
'@/configs/canvas'
import
{
Slide
}
from
'@/types/slides'
const
mainStore
=
useMainStore
()
const
slidesStore
=
useSlidesStore
()
...
...
@@ -386,7 +387,9 @@ const GetTripTemplate = async () =>{
}
})
})
console
.
log
(
newSlides
,
'=======模版数据newSlides'
)
if
(
ConfigId
.
value
>
0
){
newSlides
=
newSlides
.
filter
((
x
:
Slide
)
=>!
x
.
isTripItems
)
}
slidesStore
.
setSlides
(
newSlides
)
layoutsStore
.
setLayouts
(
JSON
.
parse
(
JSON
.
stringify
(
newSlides
)))
CoverImgStore
.
setCoverImg
(
dataRes
.
data
.
data
.
CoverImg
)
...
...
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