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
d455f5c2
Commit
d455f5c2
authored
Mar 27, 2024
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1.3.0' into router
# Conflicts: # components.d.ts
parents
4172bd48
0cfa689c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
104 deletions
+21
-104
.gitignore
.gitignore
+1
-0
components.d.ts
components.d.ts
+0
-99
useSlideHandler.ts
src/hooks/useSlideHandler.ts
+12
-3
slides.ts
src/store/slides.ts
+1
-1
index.vue
src/views/components/element/TextElement/index.vue
+7
-1
No files found.
.gitignore
View file @
d455f5c2
...
...
@@ -22,3 +22,4 @@ pnpm-debug.log*
*.sw?
package-lock.json
yarn.lock
components.d.ts
components.d.ts
deleted
100644 → 0
View file @
4172bd48
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
export
{}
declare
module
'vue'
{
export
interface
GlobalComponents
{
Alpha
:
typeof
import
(
'./src/components/ColorPicker/Alpha.vue'
)[
'default'
]
AreaAttributes
:
typeof
import
(
'./src/components/Maps/MapAttributes/AreaAttributes.vue'
)[
'default'
]
Button
:
typeof
import
(
'./src/components/Button.vue'
)[
'default'
]
ButtonGroup
:
typeof
import
(
'./src/components/ButtonGroup.vue'
)[
'default'
]
Checkboard
:
typeof
import
(
'./src/components/ColorPicker/Checkboard.vue'
)[
'default'
]
Checkbox
:
typeof
import
(
'./src/components/Checkbox.vue'
)[
'default'
]
CheckboxButton
:
typeof
import
(
'./src/components/CheckboxButton.vue'
)[
'default'
]
ColorPicker
:
typeof
import
(
'./src/components/ColorPicker/index.vue'
)[
'default'
]
Contextmenu
:
typeof
import
(
'./src/components/Contextmenu/index.vue'
)[
'default'
]
CountriesAttrbutes
:
typeof
import
(
'./src/components/Maps/MapAttributes/CountriesAttrbutes.vue'
)[
'default'
]
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'
]
ElAlert
:
typeof
import
(
'element-plus/es'
)[
'ElAlert'
]
ElAutocomplete
:
typeof
import
(
'element-plus/es'
)[
'ElAutocomplete'
]
ElAvatar
:
typeof
import
(
'element-plus/es'
)[
'ElAvatar'
]
ElButton
:
typeof
import
(
'element-plus/es'
)[
'ElButton'
]
ElCheckbox
:
typeof
import
(
'element-plus/es'
)[
'ElCheckbox'
]
ElCheckboxGroup
:
typeof
import
(
'element-plus/es'
)[
'ElCheckboxGroup'
]
ElCheckTag
:
typeof
import
(
'element-plus/es'
)[
'ElCheckTag'
]
ElCol
:
typeof
import
(
'element-plus/es'
)[
'ElCol'
]
ElDialog
:
typeof
import
(
'element-plus/es'
)[
'ElDialog'
]
ElDivider
:
typeof
import
(
'element-plus/es'
)[
'ElDivider'
]
ElDropdown
:
typeof
import
(
'element-plus/es'
)[
'ElDropdown'
]
ElDropdownItem
:
typeof
import
(
'element-plus/es'
)[
'ElDropdownItem'
]
ElDropdownMenu
:
typeof
import
(
'element-plus/es'
)[
'ElDropdownMenu'
]
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'
]
ElMenu
:
typeof
import
(
'element-plus/es'
)[
'ElMenu'
]
ElMenuItem
:
typeof
import
(
'element-plus/es'
)[
'ElMenuItem'
]
ElOption
:
typeof
import
(
'element-plus/es'
)[
'ElOption'
]
ElPagination
:
typeof
import
(
'element-plus/es'
)[
'ElPagination'
]
ElPopover
:
typeof
import
(
'element-plus/es'
)[
'ElPopover'
]
ElRow
:
typeof
import
(
'element-plus/es'
)[
'ElRow'
]
ElScrollbar
:
typeof
import
(
'element-plus/es'
)[
'ElScrollbar'
]
ElSelect
:
typeof
import
(
'element-plus/es'
)[
'ElSelect'
]
ElSkeleton
:
typeof
import
(
'element-plus/es'
)[
'ElSkeleton'
]
ElTable
:
typeof
import
(
'element-plus/es'
)[
'ElTable'
]
ElTableColumn
:
typeof
import
(
'element-plus/es'
)[
'ElTableColumn'
]
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'
]
ElTreeSelect
:
typeof
import
(
'element-plus/es'
)[
'ElTreeSelect'
]
ElUpload
:
typeof
import
(
'element-plus/es'
)[
'ElUpload'
]
FileInput
:
typeof
import
(
'./src/components/FileInput.vue'
)[
'default'
]
FormulaContent
:
typeof
import
(
'./src/components/LaTeXEditor/FormulaContent.vue'
)[
'default'
]
FullscreenSpin
:
typeof
import
(
'./src/components/FullscreenSpin.vue'
)[
'default'
]
Hue
:
typeof
import
(
'./src/components/ColorPicker/Hue.vue'
)[
'default'
]
Index
:
typeof
import
(
'./src/components/PSD/Index.vue'
)[
'default'
]
Input
:
typeof
import
(
'./src/components/Input.vue'
)[
'default'
]
LaTeXEditor
:
typeof
import
(
'./src/components/LaTeXEditor/index.vue'
)[
'default'
]
Line
:
typeof
import
(
'./src/components/Maps/Line.vue'
)[
'default'
]
LineAttributes
:
typeof
import
(
'./src/components/Maps/MapAttributes/LineAttributes.vue'
)[
'default'
]
MapAttributes
:
typeof
import
(
'./src/components/Maps/MapAttributes/index.vue'
)[
'default'
]
Maps
:
typeof
import
(
'./src/components/Maps/index.vue'
)[
'default'
]
MapScriptForm
:
typeof
import
(
'./src/components/Maps/MapScriptForm.vue'
)[
'default'
]
MarkAttributes
:
typeof
import
(
'./src/components/Maps/MapAttributes/MarkAttributes.vue'
)[
'default'
]
MenuContent
:
typeof
import
(
'./src/components/Contextmenu/MenuContent.vue'
)[
'default'
]
Message
:
typeof
import
(
'./src/components/Message.vue'
)[
'default'
]
Modal
:
typeof
import
(
'./src/components/Modal.vue'
)[
'default'
]
MoveablePanel
:
typeof
import
(
'./src/components/MoveablePanel.vue'
)[
'default'
]
NumberInput
:
typeof
import
(
'./src/components/NumberInput.vue'
)[
'default'
]
Popover
:
typeof
import
(
'./src/components/Popover.vue'
)[
'default'
]
PopoverMenuItem
:
typeof
import
(
'./src/components/PopoverMenuItem.vue'
)[
'default'
]
QRCode
:
typeof
import
(
'./src/components/QRCode/QRCode.vue'
)[
'default'
]
RadioButton
:
typeof
import
(
'./src/components/RadioButton.vue'
)[
'default'
]
RadioGroup
:
typeof
import
(
'./src/components/RadioGroup.vue'
)[
'default'
]
RouterLink
:
typeof
import
(
'vue-router'
)[
'RouterLink'
]
RouterView
:
typeof
import
(
'vue-router'
)[
'RouterView'
]
Saturation
:
typeof
import
(
'./src/components/ColorPicker/Saturation.vue'
)[
'default'
]
Select
:
typeof
import
(
'./src/components/Select.vue'
)[
'default'
]
SelectGroup
:
typeof
import
(
'./src/components/SelectGroup.vue'
)[
'default'
]
Slider
:
typeof
import
(
'./src/components/Slider.vue'
)[
'default'
]
SpLineAttributes
:
typeof
import
(
'./src/components/Maps/MapAttributes/SpLineAttributes.vue'
)[
'default'
]
Switch
:
typeof
import
(
'./src/components/Switch.vue'
)[
'default'
]
SymbolContent
:
typeof
import
(
'./src/components/LaTeXEditor/SymbolContent.vue'
)[
'default'
]
Tabs
:
typeof
import
(
'./src/components/Tabs.vue'
)[
'default'
]
TextArea
:
typeof
import
(
'./src/components/TextArea.vue'
)[
'default'
]
TextAttributes
:
typeof
import
(
'./src/components/Maps/MapAttributes/TextAttributes.vue'
)[
'default'
]
ThemeSetting
:
typeof
import
(
'./src/components/Maps/ThemeSetting/ThemeSetting.vue'
)[
'default'
]
Tools
:
typeof
import
(
'./src/components/Maps/Tools.vue'
)[
'default'
]
WritingBoard
:
typeof
import
(
'./src/components/WritingBoard.vue'
)[
'default'
]
}
export
interface
ComponentCustomProperties
{
vLoading
:
typeof
import
(
'element-plus/es'
)[
'ElLoadingDirective'
]
}
}
src/hooks/useSlideHandler.ts
View file @
d455f5c2
...
...
@@ -146,9 +146,18 @@ export default () => {
const
_slides
=
JSON
.
parse
(
JSON
.
stringify
(
slides
.
value
))
const
_slide
=
_slides
[
oldIndex
]
_slides
.
splice
(
oldIndex
,
1
)
_slides
.
splice
(
newIndex
,
0
,
_slide
)
slidesStore
.
setSlides
(
_slides
)
if
(
newIndex
==
0
&&
oldIndex
>
0
){
_slides
.
splice
(
newIndex
,
0
,
_slide
)
slidesStore
.
setSlides
(
_slides
)
_slides
.
splice
(
oldIndex
+
1
,
1
)
}
else
{
_slides
.
splice
(
oldIndex
,
1
)
slidesStore
.
setSlides
(
_slides
)
setTimeout
(()
=>
{
_slides
.
splice
(
newIndex
,
0
,
_slide
)
slidesStore
.
setSlides
(
_slides
)
},
300
)
}
slidesStore
.
updateSlideIndex
(
newIndex
)
}
...
...
src/store/slides.ts
View file @
d455f5c2
...
...
@@ -150,7 +150,7 @@ export const useSlidesStore = defineStore('slides', {
let
iFonts
:
string
[]
=
[]
var
regex
=
/
(?<
=font-family:
\s
*
)
.*
?(?=
;
)
/g
slides
.
forEach
(
x
=>
{
x
.
elements
.
forEach
(
y
=>
{
x
.
elements
&&
x
.
elements
.
forEach
(
y
=>
{
let
temp
=
JSON
.
parse
(
JSON
.
stringify
(
y
))
if
(
temp
.
defaultFontName
)
iFonts
.
push
(
temp
.
defaultFontName
)
if
(
temp
.
content
){
...
...
src/views/components/element/TextElement/index.vue
View file @
d455f5c2
...
...
@@ -8,6 +8,7 @@
width: elementInfo.width + 'px',
height: elementInfo.height + 'px',
}"
style="overflow: hidden;"
>
<div
class=
"rotate-wrapper"
...
...
@@ -75,6 +76,7 @@ import useHistorySnapshot from '@/hooks/useHistorySnapshot'
import
ElementOutline
from
'@/views/components/element/ElementOutline.vue'
import
ProsemirrorEditor
from
'@/views/components/element/ProsemirrorEditor.vue'
import
{
VIEWPORT_SIZE
,
VIEWPORT_VER_SIZE
}
from
'@/configs/canvas'
const
props
=
defineProps
<
{
elementInfo
:
PPTTextElement
...
...
@@ -132,11 +134,15 @@ const updateTextElementHeight = (entries: ResizeObserverEntry[]) => {
const
contentRect
=
entries
[
0
].
contentRect
if
(
!
elementRef
.
value
)
return
cons
t
realHeight
=
contentRect
.
height
+
20
le
t
realHeight
=
contentRect
.
height
+
20
const
realWidth
=
contentRect
.
width
+
20
const
documentHeight
=
useSlidesStore
().
viewportRatio
>
1
?
VIEWPORT_SIZE
.
Value
:
VIEWPORT_VER_SIZE
.
Value
if
(
!
props
.
elementInfo
.
vertical
&&
props
.
elementInfo
.
height
!==
realHeight
)
{
if
(
!
isScaling
.
value
)
{
const
maxHeight
=
documentHeight
-
props
.
elementInfo
.
top
-
10
realHeight
=
realHeight
<=
maxHeight
?
realHeight
:
maxHeight
slidesStore
.
updateElement
({
id
:
props
.
elementInfo
.
id
,
props
:
{
height
:
realHeight
},
...
...
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