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
52b9f8b0
Commit
52b9f8b0
authored
Dec 06, 2023
by
zhengke
Browse files
Options
Browse Files
Download
Plain Diff
no message
parents
64b8067e
07e4b892
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
12 deletions
+20
-12
components.d.ts
components.d.ts
+1
-0
useExport.ts
src/hooks/useExport.ts
+3
-2
domainManager.ts
src/utils/domainManager.ts
+1
-1
index.vue
src/views/Editor/EditorHeader/index.vue
+1
-1
ElementTemplateData.vue
src/views/Editor/Toolbar/ElementTemplateData.vue
+6
-3
index.vue
src/views/Editor/index.vue
+3
-1
index.vue
src/views/components/ThumbnailSlide/index.vue
+5
-4
No files found.
components.d.ts
View file @
52b9f8b0
...
...
@@ -24,6 +24,7 @@ declare module 'vue' {
ElCol
:
typeof
import
(
'element-plus/es'
)[
'ElCol'
]
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'
]
ElInput
:
typeof
import
(
'element-plus/es'
)[
'ElInput'
]
ElOption
:
typeof
import
(
'element-plus/es'
)[
'ElOption'
]
...
...
src/hooks/useExport.ts
View file @
52b9f8b0
...
...
@@ -13,6 +13,7 @@ import { type SvgPoints, toPoints } from '@/utils/svgPathParser'
import
{
encrypt
}
from
'@/utils/crypto'
import
{
svg2Base64
}
from
'@/utils/svg2Base64'
import
message
from
'@/utils/message'
import
{
VIEWPORT_SIZE
,
VIEWPORT_VER_SIZE
}
from
'@/configs/canvas'
const
INCH_PX_RATIO
=
100
const
PT_PX_RATIO
=
0.75
...
...
@@ -42,7 +43,7 @@ export default () => {
setTimeout
(()
=>
{
const
config
:
ExportImageConfig
=
{
quality
,
width
:
viewportRatio
.
value
==
0.7069
?
1754
:
1240
,
width
:
(
viewportRatio
.
value
<
1
?
VIEWPORT_SIZE
:
VIEWPORT_VER_SIZE
)
,
}
if
(
ignoreWebfont
)
config
.
fontEmbedCSS
=
''
...
...
@@ -78,7 +79,7 @@ export default () => {
setTimeout
(()
=>
{
const
config
:
ExportImageConfig
=
{
quality
,
width
:
viewportRatio
.
value
==
0.7069
?
1754
:
1240
,
width
:
(
viewportRatio
.
value
<
1
?
VIEWPORT_SIZE
:
VIEWPORT_VER_SIZE
)
,
}
if
(
ignoreWebfont
)
config
.
fontEmbedCSS
=
''
...
...
src/utils/domainManager.ts
View file @
52b9f8b0
...
...
@@ -2,7 +2,7 @@ export const domainManager = () => {
const
locationName
=
window
.
location
.
hostname
console
.
log
(
window
.
location
.
hostname
,
'=====hostname'
)
const
obj
=
{
domainUrl
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
?
"http://reborn.oytour.com/api/common/post"
:
"http://reborn.oytour.com/api/common/post"
,
//http://192.168.10.214/api/common/post
domainUrl
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
?
"http://reborn.oytour.com/api/common/post"
:
"http://reborn.oytour.com/api/common/post"
,
//上传站点
UploadUrl
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
?
"http://upload.oytour.com"
:
"http://192.168.10.214:8120"
,
//文件站点
...
...
src/views/Editor/EditorHeader/index.vue
View file @
52b9f8b0
...
...
@@ -113,7 +113,7 @@
class="thumbnail"
:key="slide.id"
:slide="slide"
:size="viewportRatio==0.7069?
1754:1240
"
:size="viewportRatio==0.7069?"
/>
</div>
</div>
...
...
src/views/Editor/Toolbar/ElementTemplateData.vue
View file @
52b9f8b0
...
...
@@ -128,16 +128,17 @@
</div>
<!-- 生成封面图 -->
<div
style=
"opacity: 0;position: fixed;left: 100px;top: 0;
bottom: 0;
overflow: auto;z-index: -1;"
<div
style=
"opacity: 0;position: fixed;left: 100px;top: 0;overflow: auto;z-index: -1;"
v-if=
"model&&model==1&&slides.length>0&&slideIndex>=0"
>
<div
class=
"export-img-dialog"
>
<div
class=
"thumbnails-view"
>
<div
class=
"thumbnails"
ref=
"FeatureImgRef"
>
<div
class=
"thumbnails FeatureImgRef"
ref=
"FeatureImgRef"
>
<ThumbnailSlide
class=
"thumbnail"
:key=
"slides[slideIndex].id"
:slide=
"slides[slideIndex]"
:size=
"viewportRatio
==0.7069?1754:1240
"
:size=
"viewportRatio
<1 ? VIEWPORT_SIZE : VIEWPORT_VER_SIZE
"
/>
</div>
</div>
...
...
@@ -159,6 +160,7 @@
import
ThumbnailSlide
from
'@/views/components/ThumbnailSlide/index.vue'
import
AliyunUpload
from
'@/utils/upload/aliyun'
import
useEditor
from
'@/utils/Editor/index'
import
{
VIEWPORT_SIZE
,
VIEWPORT_VER_SIZE
}
from
'@/configs/canvas'
const
datas
=
reactive
({
DataSource
:{},
...
...
@@ -286,6 +288,7 @@
queryObj
.
value
.
CoverImg
=
''
mainMenuVisible
.
value
=
false
isCoverImgStore
.
setIsCoverImg
(
true
)
console
.
log
(
FeatureImgRef
.
value
)
let
datas
=
await
exportFeatureImg
(
FeatureImgRef
.
value
,
'jpeg'
,
1
,
false
,
0
)
if
(
datas
){
let
name
=
new
Date
().
getTime
()
+
".jpg"
...
...
src/views/Editor/index.vue
View file @
52b9f8b0
...
...
@@ -39,7 +39,7 @@
class=
"thumbnail"
:key=
"slide.id"
:slide=
"slide"
:size=
"
viewportRatio==0.7069?1754:1240
"
:size=
"
(viewportRatio
<1
?
VIEWPORT_SIZE
:
VIEWPORT_VER_SIZE
)
"
/>
</div>
</div>
...
...
@@ -68,6 +68,7 @@ import SearchPanel from './SearchPanel.vue'
import
Modal
from
'@/components/Modal.vue'
import
DataaSource
from
'./DataaSource/index.vue'
import
ConfigService
from
'@/services/ConfigService'
import
{
VIEWPORT_SIZE
,
VIEWPORT_VER_SIZE
}
from
'@/configs/canvas'
import
ThumbnailSlide
from
'@/views/components/ThumbnailSlide/index.vue'
...
...
@@ -80,6 +81,7 @@ const pageTypesList = ref([] as any)
const
searchData
=
ref
({}
as
any
)
searchData
.
value
=
inject
(
injectKeyTemplate
)
let
TempIds
=
0
if
(
searchData
.
value
.
TempId
)
TempIds
=
searchData
.
value
.
TempId
else
if
(
TempId
.
value
)
TempIds
=
TempId
.
value
...
...
src/views/components/ThumbnailSlide/index.vue
View file @
52b9f8b0
...
...
@@ -7,9 +7,10 @@
>
<div
class=
"elements"
style=
"overflow: hidden;"
:style=
"
{
width:
VIEWPORT_SIZE
+ 'px',
height:
VIEWPORT_SIZE
* viewportRatio + 'px',
width:
(viewportRatio
<1
?
VIEWPORT_SIZE:VIEWPORT_VER_SIZE
)
+
'
px
',
height:
(
viewportRatio
<1
?
VIEWPORT_SIZE:VIEWPORT_VER_SIZE
)
*
viewportRatio
+
'
px
',
transform:
`
scale
($
{scale})`,
}"
v-if="visible"
...
...
@@ -32,7 +33,7 @@ import { storeToRefs } from 'pinia'
import
{
useSlidesStore
}
from
'@/store'
import
type
{
Slide
}
from
'@/types/slides'
import
{
injectKeySlideScale
}
from
'@/types/injectKey'
import
{
VIEWPORT_SIZE
}
from
'@/configs/canvas'
import
{
VIEWPORT_SIZE
,
VIEWPORT_VER_SIZE
}
from
'@/configs/canvas'
import
useSlideBackgroundStyle
from
'@/hooks/useSlideBackgroundStyle'
import
ThumbnailElement
from
'./ThumbnailElement.vue'
...
...
@@ -50,7 +51,7 @@ const { viewportRatio } = storeToRefs(useSlidesStore())
const
background
=
computed
(()
=>
props
.
slide
.
background
)
const
{
backgroundStyle
}
=
useSlideBackgroundStyle
(
background
)
const
scale
=
computed
(()
=>
props
.
size
/
VIEWPORT_SIZE
)
const
scale
=
computed
(()
=>
props
.
size
/
(
viewportRatio
.
value
<
1
?
VIEWPORT_SIZE
:
VIEWPORT_VER_SIZE
)
)
provide
(
injectKeySlideScale
,
scale
)
</
script
>
...
...
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