Skip to content

Commit

Permalink
chore: pptxtojson 升级
Browse files Browse the repository at this point in the history
  • Loading branch information
pipipi-pikachu committed Dec 22, 2024
1 parent bc6a51e commit 6df1b8d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"number-precision": "^1.6.0",
"pinia": "^2.1.7",
"pptxgenjs": "^3.12.0",
"pptxtojson": "^1.0.3",
"pptxtojson": "^1.1.0",
"prosemirror-commands": "^1.6.0",
"prosemirror-dropcursor": "^1.8.1",
"prosemirror-gapcursor": "^1.3.2",
Expand Down
1 change: 1 addition & 0 deletions src/hooks/useImport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ export default () => {
id: nanoid(10),
elements: [],
background,
remark: item.note || '',
}

const parseElements = (elements: Element[]) => {
Expand Down
10 changes: 8 additions & 2 deletions src/views/Screen/PresenterView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<span>演讲者备注</span>
<span>P {{slideIndex + 1}} / {{slides.length}}</span>
</div>
<div class="remark-content ProseMirror-static" :style="{ fontSize: remarkFontSize + 'px' }" v-html="currentSlideRemark"></div>
<div class="remark-content ProseMirror-static" :class="{ 'empty': !currentSlideRemark }" :style="{ fontSize: remarkFontSize + 'px' }" v-html="currentSlideRemark || '无备注'"></div>
<div class="remark-scale">
<div :class="['scale-btn', { 'disable': remarkFontSize === 12 }]" @click="setRemarkFontSize(remarkFontSize - 2)"><IconMinus /></div>
<div :class="['scale-btn', { 'disable': remarkFontSize === 40 }]" @click="setRemarkFontSize(remarkFontSize + 2)"><IconPlus /></div>
Expand Down Expand Up @@ -125,7 +125,8 @@ const { fullscreenState, manualExitFullscreen } = useFullscreen()
const remarkFontSize = ref(16)
const currentSlideRemark = computed(() => {
return parseText2Paragraphs(currentSlide.value.remark || '无备注')
if (!currentSlide.value.remark) return ''
return parseText2Paragraphs(currentSlide.value.remark)
})
const handleMousewheelThumbnails = (e: WheelEvent) => {
Expand Down Expand Up @@ -297,6 +298,11 @@ const contextmenus = (): ContextmenuItem[] => {
padding: 20px;
line-height: 1.5;
@include overflow-overlay();
&.empty {
color: #999;
font-style: italic;
}
}
.remark-scale {
Expand Down

0 comments on commit 6df1b8d

Please sign in to comment.