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
7d913275
Commit
7d913275
authored
May 31, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复编辑模版 画布尺寸权限,
parent
45397db2
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
74 deletions
+45
-74
ExportImage.vue
src/views/Editor/ExportDialog/ExportImage.vue
+1
-2
ImageStylePanel.vue
...iews/Editor/Toolbar/ElementStylePanel/ImageStylePanel.vue
+3
-4
ElementTemplateData.vue
src/views/Editor/Toolbar/ElementTemplateData.vue
+35
-65
SlideDesignPanel.vue
src/views/Editor/Toolbar/SlideDesignPanel.vue
+6
-3
No files found.
src/views/Editor/ExportDialog/ExportImage.vue
View file @
7d913275
...
...
@@ -92,7 +92,6 @@ import Button from '@/components/Button.vue'
import
RadioButton
from
'@/components/RadioButton.vue'
import
RadioGroup
from
'@/components/RadioGroup.vue'
import
{
injectKeyTemplate
}
from
'@/types/injectKey'
import
{
query
}
from
'@/utils/common'
const
emit
=
defineEmits
<
{
(
event
:
'close'
):
void
...
...
@@ -109,7 +108,7 @@ const range = ref<[number, number]>([1, slides.value.length])
const
format
=
ref
<
'jpeg'
|
'png'
>
(
'jpeg'
)
const
quality
=
ref
(
1
)
const
ignoreWebfont
=
ref
(
false
)
//开启在线字体
let
param
=
query
()
const
autoSave
=
inject
(
'SellTravelSave'
)
as
Ref
<
number
>
const
downloadLink
=
ref
()
const
fileUrl
=
ref
(
""
)
...
...
src/views/Editor/Toolbar/ElementStylePanel/ImageStylePanel.vue
View file @
7d913275
...
...
@@ -98,7 +98,6 @@ import Button from '@/components/Button.vue'
import
ButtonGroup
from
'@/components/ButtonGroup.vue'
import
Popover
from
'@/components/Popover.vue'
import
UploadPicture
from
'../../CanvasTool/UploadPicture.vue'
import
{
query
}
from
'@/utils/common'
const
shapeClipPathOptions
=
CLIPPATHS
const
ratioClipOptions
=
[
...
...
@@ -141,8 +140,7 @@ const { handleElement, handleElementId } = storeToRefs(mainStore)
const
{
currentSlide
}
=
storeToRefs
(
slidesStore
)
const
{
ctrlKeyState
}
=
storeToRefs
(
useKeyboardStore
())
const
layerName
=
ref
(
handleElement
.
value
?.
layerName
??
''
)
const
param
=
query
()
const
mode
=
parseInt
(
param
.
model
??
1
)
const
handleImageElement
=
handleElement
as
Ref
<
PPTImageElement
>
...
...
@@ -150,7 +148,8 @@ const clipPanelVisible = ref(false)
const
{
addHistorySnapshot
}
=
useHistorySnapshot
()
const
{
imgReplaceVisible
}
=
storeToRefs
(
useScreenStore
())
const
{
imgReplaceVisible
,
model
}
=
storeToRefs
(
useScreenStore
())
const
mode
=
model
.
value
??
1
provide
(
'imgType'
,
2
)
...
...
src/views/Editor/Toolbar/ElementTemplateData.vue
View file @
7d913275
...
...
@@ -130,17 +130,19 @@
<div
class=
"row items-center"
>
<span
class=
"Required q-mr-md"
>
*
</span>
选择颜色:
</div>
<el-button
v-if=
"searchData.isTeamManage"
size=
"small"
class=
"button-new-tag q-ml-md ml-1"
@
click=
"datas.addColorsShow=!datas.addColorsShow"
>
<el-button
v-if=
"searchData.isTeamManage"
size=
"small"
class=
"button-new-tag q-ml-md ml-1"
@
click=
"setColorsShow"
>
+ 颜色
</el-button>
</p>
<div
v-if=
"datas.addColorsShow"
class=
"ColorsShowBox"
>
class=
"ColorsShowBox"
@
click=
"stopPropagation"
>
<p
class=
"q-mt-md row flex-between"
>
<span>
新增颜色:
</span>
<span>
<el-button
class=
"button-new-tag ml-1"
size=
"small"
@
click=
"CancelAddColor()"
>
size=
"small"
@
click
.
stop
=
"CancelAddColor()"
>
取消
</el-button>
<el-button
class=
"button-new-tag ml-1 q-ml-xs"
...
...
@@ -221,57 +223,6 @@
</el-option>
</el-select>
</div>
<!-- <div class="q-mt-sm" v-if="datas.addColorsShow"
style="background: #eeee;border-radius: 3px;padding: 0 5px 10px 5px;">
<p class="q-mt-md row flex-between">
<span>新增颜色:</span>
<span>
<el-button class="button-new-tag ml-1"
size="small" @click="CancelAddColor()">
取消
</el-button>
<el-button class="button-new-tag ml-1 q-ml-xs"
:loading="datas.addColorLoading"
type="primary"
size="small" @click="setColor()">
提交
</el-button>
</span>
</p>
<div class="row q-mt-md items-center">
<span class="Required q-mr-xs">* </span>
<el-select v-model="datas.addColor.Code" placeholder="请选择分类">
<el-option
key=""
label="不限"
value=""
/>
<el-option
v-for="item in ColorList"
:key="item.ID"
:label="`${item.Name}`"
:value="item.ID"
/>
</el-select>
</div>
<div class="row q-mt-md items-center">
<span class="Required q-mr-xs">*</span>
<el-input
placeholder="颜色名称"
v-model="datas.addColor.Name"
class="ml-1 w-20 q-ml-sm"
size="small"
/>
<span class="Required q-mr-xs q-ml-sm">*</span>
<el-input
placeholder="例:#e5e3da"
v-model="datas.addColor.Content"
class="ml-1 w-20 q-ml-sm"
size="small"
/>
</div>
</div> -->
<p
class=
"q-mt-md"
><span
class=
"Required q-mr-md"
>
*
</span>
选择季节:
</p>
<div
class=
"row wrap q-mt-md"
>
<el-select
v-model=
"queryObj.SeasonName"
class=
"m-2"
placeholder=
"请选择季节"
>
...
...
@@ -311,7 +262,7 @@
<
script
lang=
"ts"
setup
>
import
{
computed
,
ref
,
reactive
,
watch
,
inject
,
nextTick
}
from
'vue'
import
{
computed
,
ref
,
reactive
,
watch
,
inject
,
nextTick
,
onMounted
,
onBeforeUnmount
}
from
'vue'
import
{
storeToRefs
}
from
'pinia'
import
{
ElInput
}
from
'element-plus'
import
{
useMainStore
,
useSlidesStore
,
useScreenStore
}
from
'@/store'
...
...
@@ -350,8 +301,6 @@
addColorLoading
:
false
,
ColorList
:
[],
EditAddType
:
0
,
//0新增 1编辑
addEditLoading
:
false
,
EditAddCountryShow
:
false
,
DataSource
:{},
CountryValue
:
null
,
})
...
...
@@ -409,6 +358,15 @@
Name
:
queryObj
.
value
.
ColorStr
})
const
stopPropagation
=
(
event
)
=>
{
event
.
stopPropagation
()
}
const
setColorsShow
=
(
event
)
=>
{
event
.
stopPropagation
()
datas
.
addColorsShow
=!
datas
.
addColorsShow
}
const
handleUpdateTitle
=
()
=>
{
slidesStore
.
setTitle
(
titleValue
.
value
)
queryObj
.
value
.
Title
=
titleValue
.
value
...
...
@@ -458,7 +416,7 @@
message
:
'新增颜色成功'
,
type
:
'success'
,
})
querySearchHandle
r
(
0
)
getColo
r
(
0
)
CancelAddColor
()
}
else
{
ElMessage
({
...
...
@@ -707,6 +665,17 @@
getLinesHandler
()
getColor
(
0
)
// GetTemplateColors()
onMounted
(
()
=>
{
document
.
addEventListener
(
'click'
,
(
e
)
=>
{
if
(
datas
.
addColorsShow
)
{
CancelAddColor
()
}
});
})
onBeforeUnmount
(()
=>
{
document
.
removeEventListener
(
'click'
,
()
=>
{});
})
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
@@ -742,23 +711,24 @@
}
.ColorsShowBox
{
position
:
absolute
;
right
:
-1
0px
;
right
:
0px
;
bottom
:
34px
;
width
:
2
45
px
;
padding
:
5px
15px
15px
15
px
;
background
:
#
eee
;
width
:
2
24
px
;
padding
:
0px
10px
10px
10
px
;
background
:
#
FFF
;
border-radius
:
3px
;
z-index
:
999
;
box-shadow
:
2px
2px
10px
2px
#EEE
;
}
.
ColorsShowBox
:
:
after
{
content
:
''
;
width
:
0
;
height
:
0
;
position
:
absolute
;
right
:
40
px
;
bottom
:
-
10
px
;
right
:
25
px
;
bottom
:
-
8
px
;
border-left
:
5px
solid
transparent
;
border-right
:
5px
solid
transparent
;
border-top
:
10px
solid
#
eee
;
border-top
:
10px
solid
#
FFF
;
}
</
style
>
\ No newline at end of file
src/views/Editor/Toolbar/SlideDesignPanel.vue
View file @
7d913275
...
...
@@ -99,6 +99,7 @@
<div
class=
"row"
>
<Button
style=
"flex: 1;"
@
click=
"applyBackgroundAllSlide()"
>
应用背景到全部
</Button>
</div>
<
template
v-if=
"model==1"
>
<template
v-if=
"queryObj.TemplateType!=2"
>
<Divider
/>
...
...
@@ -142,6 +143,7 @@
<span
class=
"q-ml-md"
>
px
</span>
</div>
</
template
>
</template>
<Divider
/>
...
...
@@ -333,7 +335,7 @@
<
script
lang=
"ts"
setup
>
import
{
computed
,
ref
,
reactive
,
inject
}
from
'vue'
import
{
storeToRefs
}
from
'pinia'
import
{
useMainStore
,
useSlidesStore
,
useFontStore
}
from
'@/store'
import
{
useMainStore
,
useSlidesStore
,
useFontStore
,
useScreenStore
}
from
'@/store'
import
type
{
SlideBackground
,
SlideTheme
}
from
'@/types/slides'
import
{
PRESET_THEMES
}
from
'@/configs/theme'
import
{
WEB_FONTS
}
from
'@/configs/font'
...
...
@@ -356,8 +358,8 @@ import { VIEWPORT_SIZE, VIEWPORT_VER_SIZE } from '@/configs/canvas'
const
datas
=
reactive
({
CustomSize
:{
// 自定义尺寸
width
:
VIEWPORT_SIZE
.
v
alue
,
height
:
VIEWPORT_VER_SIZE
.
v
alue
,
width
:
VIEWPORT_SIZE
.
V
alue
,
height
:
VIEWPORT_VER_SIZE
.
V
alue
,
},
DataSource
:{
DataSourceOverlay
:
false
...
...
@@ -372,6 +374,7 @@ const slidesStore = useSlidesStore()
const
{
availableFonts
}
=
storeToRefs
(
useMainStore
())
const
{
slides
,
currentSlide
,
viewportRatio
,
theme
,
slideIndex
}
=
storeToRefs
(
slidesStore
)
const
{
formatFonts
}
=
storeToRefs
(
useFontStore
())
const
{
model
}
=
storeToRefs
(
useScreenStore
())
const
moreThemeConfigsVisible
=
ref
(
false
)
...
...
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