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' {
...
@@ -24,6 +24,7 @@ declare module 'vue' {
ElCol
:
typeof
import
(
'element-plus/es'
)[
'ElCol'
]
ElCol
:
typeof
import
(
'element-plus/es'
)[
'ElCol'
]
ElDialog
:
typeof
import
(
'element-plus/es'
)[
'ElDialog'
]
ElDialog
:
typeof
import
(
'element-plus/es'
)[
'ElDialog'
]
ElDivider
:
typeof
import
(
'element-plus/es'
)[
'ElDivider'
]
ElDivider
:
typeof
import
(
'element-plus/es'
)[
'ElDivider'
]
ElEmpty
:
typeof
import
(
'element-plus/es'
)[
'ElEmpty'
]
ElIcon
:
typeof
import
(
'element-plus/es'
)[
'ElIcon'
]
ElIcon
:
typeof
import
(
'element-plus/es'
)[
'ElIcon'
]
ElInput
:
typeof
import
(
'element-plus/es'
)[
'ElInput'
]
ElInput
:
typeof
import
(
'element-plus/es'
)[
'ElInput'
]
ElOption
:
typeof
import
(
'element-plus/es'
)[
'ElOption'
]
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'
...
@@ -13,6 +13,7 @@ import { type SvgPoints, toPoints } from '@/utils/svgPathParser'
import
{
encrypt
}
from
'@/utils/crypto'
import
{
encrypt
}
from
'@/utils/crypto'
import
{
svg2Base64
}
from
'@/utils/svg2Base64'
import
{
svg2Base64
}
from
'@/utils/svg2Base64'
import
message
from
'@/utils/message'
import
message
from
'@/utils/message'
import
{
VIEWPORT_SIZE
,
VIEWPORT_VER_SIZE
}
from
'@/configs/canvas'
const
INCH_PX_RATIO
=
100
const
INCH_PX_RATIO
=
100
const
PT_PX_RATIO
=
0.75
const
PT_PX_RATIO
=
0.75
...
@@ -42,7 +43,7 @@ export default () => {
...
@@ -42,7 +43,7 @@ export default () => {
setTimeout
(()
=>
{
setTimeout
(()
=>
{
const
config
:
ExportImageConfig
=
{
const
config
:
ExportImageConfig
=
{
quality
,
quality
,
width
:
viewportRatio
.
value
==
0.7069
?
1754
:
1240
,
width
:
(
viewportRatio
.
value
<
1
?
VIEWPORT_SIZE
:
VIEWPORT_VER_SIZE
)
,
}
}
if
(
ignoreWebfont
)
config
.
fontEmbedCSS
=
''
if
(
ignoreWebfont
)
config
.
fontEmbedCSS
=
''
...
@@ -78,7 +79,7 @@ export default () => {
...
@@ -78,7 +79,7 @@ export default () => {
setTimeout
(()
=>
{
setTimeout
(()
=>
{
const
config
:
ExportImageConfig
=
{
const
config
:
ExportImageConfig
=
{
quality
,
quality
,
width
:
viewportRatio
.
value
==
0.7069
?
1754
:
1240
,
width
:
(
viewportRatio
.
value
<
1
?
VIEWPORT_SIZE
:
VIEWPORT_VER_SIZE
)
,
}
}
if
(
ignoreWebfont
)
config
.
fontEmbedCSS
=
''
if
(
ignoreWebfont
)
config
.
fontEmbedCSS
=
''
...
...
src/utils/domainManager.ts
View file @
52b9f8b0
...
@@ -2,7 +2,7 @@ export const domainManager = () => {
...
@@ -2,7 +2,7 @@ export const domainManager = () => {
const
locationName
=
window
.
location
.
hostname
const
locationName
=
window
.
location
.
hostname
console
.
log
(
window
.
location
.
hostname
,
'=====hostname'
)
console
.
log
(
window
.
location
.
hostname
,
'=====hostname'
)
const
obj
=
{
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"
,
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 @@
...
@@ -113,7 +113,7 @@
class="thumbnail"
class="thumbnail"
:key="slide.id"
:key="slide.id"
:slide="slide"
:slide="slide"
:size="viewportRatio==0.7069?
1754:1240
"
:size="viewportRatio==0.7069?"
/>
/>
</div>
</div>
</div>
</div>
...
...
src/views/Editor/Toolbar/ElementTemplateData.vue
View file @
52b9f8b0
...
@@ -128,16 +128,17 @@
...
@@ -128,16 +128,17 @@
</div>
</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"
>
v-if=
"model&&model==1&&slides.length>0&&slideIndex>=0"
>
<div
class=
"export-img-dialog"
>
<div
class=
"export-img-dialog"
>
<div
class=
"thumbnails-view"
>
<div
class=
"thumbnails-view"
>
<div
class=
"thumbnails"
ref=
"FeatureImgRef"
>
<div
class=
"thumbnails FeatureImgRef"
ref=
"FeatureImgRef"
>
<ThumbnailSlide
<ThumbnailSlide
class=
"thumbnail"
class=
"thumbnail"
:key=
"slides[slideIndex].id"
:key=
"slides[slideIndex].id"
:slide=
"slides[slideIndex]"
:slide=
"slides[slideIndex]"
:size=
"viewportRatio
==0.7069?1754:1240
"
:size=
"viewportRatio
<1 ? VIEWPORT_SIZE : VIEWPORT_VER_SIZE
"
/>
/>
</div>
</div>
</div>
</div>
...
@@ -159,6 +160,7 @@
...
@@ -159,6 +160,7 @@
import
ThumbnailSlide
from
'@/views/components/ThumbnailSlide/index.vue'
import
ThumbnailSlide
from
'@/views/components/ThumbnailSlide/index.vue'
import
AliyunUpload
from
'@/utils/upload/aliyun'
import
AliyunUpload
from
'@/utils/upload/aliyun'
import
useEditor
from
'@/utils/Editor/index'
import
useEditor
from
'@/utils/Editor/index'
import
{
VIEWPORT_SIZE
,
VIEWPORT_VER_SIZE
}
from
'@/configs/canvas'
const
datas
=
reactive
({
const
datas
=
reactive
({
DataSource
:{},
DataSource
:{},
...
@@ -286,6 +288,7 @@
...
@@ -286,6 +288,7 @@
queryObj
.
value
.
CoverImg
=
''
queryObj
.
value
.
CoverImg
=
''
mainMenuVisible
.
value
=
false
mainMenuVisible
.
value
=
false
isCoverImgStore
.
setIsCoverImg
(
true
)
isCoverImgStore
.
setIsCoverImg
(
true
)
console
.
log
(
FeatureImgRef
.
value
)
let
datas
=
await
exportFeatureImg
(
FeatureImgRef
.
value
,
'jpeg'
,
1
,
false
,
0
)
let
datas
=
await
exportFeatureImg
(
FeatureImgRef
.
value
,
'jpeg'
,
1
,
false
,
0
)
if
(
datas
){
if
(
datas
){
let
name
=
new
Date
().
getTime
()
+
".jpg"
let
name
=
new
Date
().
getTime
()
+
".jpg"
...
...
src/views/Editor/index.vue
View file @
52b9f8b0
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
class=
"thumbnail"
class=
"thumbnail"
:key=
"slide.id"
:key=
"slide.id"
:slide=
"slide"
:slide=
"slide"
:size=
"
viewportRatio==0.7069?1754:1240
"
:size=
"
(viewportRatio
<1
?
VIEWPORT_SIZE
:
VIEWPORT_VER_SIZE
)
"
/>
/>
</div>
</div>
</div>
</div>
...
@@ -68,6 +68,7 @@ import SearchPanel from './SearchPanel.vue'
...
@@ -68,6 +68,7 @@ import SearchPanel from './SearchPanel.vue'
import
Modal
from
'@/components/Modal.vue'
import
Modal
from
'@/components/Modal.vue'
import
DataaSource
from
'./DataaSource/index.vue'
import
DataaSource
from
'./DataaSource/index.vue'
import
ConfigService
from
'@/services/ConfigService'
import
ConfigService
from
'@/services/ConfigService'
import
{
VIEWPORT_SIZE
,
VIEWPORT_VER_SIZE
}
from
'@/configs/canvas'
import
ThumbnailSlide
from
'@/views/components/ThumbnailSlide/index.vue'
import
ThumbnailSlide
from
'@/views/components/ThumbnailSlide/index.vue'
...
@@ -80,6 +81,7 @@ const pageTypesList = ref([] as any)
...
@@ -80,6 +81,7 @@ const pageTypesList = ref([] as any)
const
searchData
=
ref
({}
as
any
)
const
searchData
=
ref
({}
as
any
)
searchData
.
value
=
inject
(
injectKeyTemplate
)
searchData
.
value
=
inject
(
injectKeyTemplate
)
let
TempIds
=
0
let
TempIds
=
0
if
(
searchData
.
value
.
TempId
)
TempIds
=
searchData
.
value
.
TempId
if
(
searchData
.
value
.
TempId
)
TempIds
=
searchData
.
value
.
TempId
else
if
(
TempId
.
value
)
TempIds
=
TempId
.
value
else
if
(
TempId
.
value
)
TempIds
=
TempId
.
value
...
...
src/views/components/ThumbnailSlide/index.vue
View file @
52b9f8b0
...
@@ -7,9 +7,10 @@
...
@@ -7,9 +7,10 @@
>
>
<div
<div
class=
"elements"
class=
"elements"
style=
"overflow: hidden;"
:style=
"
{
:style=
"
{
width:
VIEWPORT_SIZE
+ 'px',
width:
(viewportRatio
<1
?
VIEWPORT_SIZE:VIEWPORT_VER_SIZE
)
+
'
px
',
height:
VIEWPORT_SIZE
* viewportRatio + 'px',
height:
(
viewportRatio
<1
?
VIEWPORT_SIZE:VIEWPORT_VER_SIZE
)
*
viewportRatio
+
'
px
',
transform:
`
scale
($
{scale})`,
transform:
`
scale
($
{scale})`,
}"
}"
v-if="visible"
v-if="visible"
...
@@ -32,7 +33,7 @@ import { storeToRefs } from 'pinia'
...
@@ -32,7 +33,7 @@ import { storeToRefs } from 'pinia'
import
{
useSlidesStore
}
from
'@/store'
import
{
useSlidesStore
}
from
'@/store'
import
type
{
Slide
}
from
'@/types/slides'
import
type
{
Slide
}
from
'@/types/slides'
import
{
injectKeySlideScale
}
from
'@/types/injectKey'
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
useSlideBackgroundStyle
from
'@/hooks/useSlideBackgroundStyle'
import
ThumbnailElement
from
'./ThumbnailElement.vue'
import
ThumbnailElement
from
'./ThumbnailElement.vue'
...
@@ -50,7 +51,7 @@ const { viewportRatio } = storeToRefs(useSlidesStore())
...
@@ -50,7 +51,7 @@ const { viewportRatio } = storeToRefs(useSlidesStore())
const
background
=
computed
(()
=>
props
.
slide
.
background
)
const
background
=
computed
(()
=>
props
.
slide
.
background
)
const
{
backgroundStyle
}
=
useSlideBackgroundStyle
(
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
)
provide
(
injectKeySlideScale
,
scale
)
</
script
>
</
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