mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
feat: 添加放映时 显示 / 隐藏 页码
This commit is contained in:
parent
f04fb9fafc
commit
16742f43a0
@ -5,7 +5,6 @@ import {
|
|||||||
PlayOne,
|
PlayOne,
|
||||||
Lock,
|
Lock,
|
||||||
Unlock,
|
Unlock,
|
||||||
Search,
|
|
||||||
Ppt,
|
Ppt,
|
||||||
Format,
|
Format,
|
||||||
Picture,
|
Picture,
|
||||||
@ -158,7 +157,6 @@ export default {
|
|||||||
|
|
||||||
// 其他
|
// 其他
|
||||||
app.component('IconPlayOne', PlayOne)
|
app.component('IconPlayOne', PlayOne)
|
||||||
app.component('IconSearch', Search)
|
|
||||||
app.component('IconPpt', Ppt)
|
app.component('IconPpt', Ppt)
|
||||||
app.component('IconHelpcenter', Helpcenter)
|
app.component('IconHelpcenter', Helpcenter)
|
||||||
app.component('IconGithub', Github)
|
app.component('IconGithub', Github)
|
||||||
|
@ -44,7 +44,6 @@
|
|||||||
<div class="tools">
|
<div class="tools">
|
||||||
<IconLeftC class="tool-btn" @click="execPrev()" />
|
<IconLeftC class="tool-btn" @click="execPrev()" />
|
||||||
<IconRightC class="tool-btn" @click="execNext()" />
|
<IconRightC class="tool-btn" @click="execNext()" />
|
||||||
<IconSearch class="tool-btn" @click="slideThumbnailModelVisible = true" />
|
|
||||||
<Popover trigger="click" v-model:visible="writingBoardToolVisible">
|
<Popover trigger="click" v-model:visible="writingBoardToolVisible">
|
||||||
<template #content>
|
<template #content>
|
||||||
<WritingBoardTool @close="writingBoardToolVisible = false" />
|
<WritingBoardTool @close="writingBoardToolVisible = false" />
|
||||||
@ -52,6 +51,10 @@
|
|||||||
<IconWrite class="tool-btn" />
|
<IconWrite class="tool-btn" />
|
||||||
</Popover>
|
</Popover>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="page-number" @click="slideThumbnailModelVisible = true" v-if="showPageNumber">
|
||||||
|
{{slideIndex + 1}} / {{slides.length}}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -89,6 +92,8 @@ export default defineComponent({
|
|||||||
|
|
||||||
const scale = computed(() => slideWidth.value / VIEWPORT_SIZE)
|
const scale = computed(() => slideWidth.value / VIEWPORT_SIZE)
|
||||||
|
|
||||||
|
const showPageNumber = ref(false)
|
||||||
|
|
||||||
const slideThumbnailModelVisible = ref(false)
|
const slideThumbnailModelVisible = ref(false)
|
||||||
|
|
||||||
const writingBoardToolVisible = ref(false)
|
const writingBoardToolVisible = ref(false)
|
||||||
@ -233,6 +238,11 @@ export default defineComponent({
|
|||||||
handler: () => turnNextSlide(),
|
handler: () => turnNextSlide(),
|
||||||
},
|
},
|
||||||
{ divider: true },
|
{ divider: true },
|
||||||
|
{
|
||||||
|
text: '显示页码',
|
||||||
|
subText: showPageNumber.value ? '√' : '',
|
||||||
|
handler: () => showPageNumber.value = !showPageNumber.value,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
text: '查看所有幻灯片',
|
text: '查看所有幻灯片',
|
||||||
handler: () => slideThumbnailModelVisible.value = true,
|
handler: () => slideThumbnailModelVisible.value = true,
|
||||||
@ -263,6 +273,7 @@ export default defineComponent({
|
|||||||
slideThumbnailModelVisible,
|
slideThumbnailModelVisible,
|
||||||
turnSlideToIndex,
|
turnSlideToIndex,
|
||||||
writingBoardToolVisible,
|
writingBoardToolVisible,
|
||||||
|
showPageNumber,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@ -358,10 +369,22 @@ export default defineComponent({
|
|||||||
opacity: .35;
|
opacity: .35;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
opacity: .7;
|
opacity: .9;
|
||||||
}
|
}
|
||||||
& + .tool-btn {
|
& + .tool-btn {
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.page-number {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 8px;
|
||||||
|
right: 8px;
|
||||||
|
padding: 8px 12px;
|
||||||
|
color: #666;
|
||||||
|
background-color: rgba($color: #f2f4f6, $alpha: .7);
|
||||||
|
box-shadow: 0 2px 12px 0 rgba($color: #333, $alpha: .2);
|
||||||
|
border-radius: $borderRadius;
|
||||||
|
z-index: 10;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
Loading…
x
Reference in New Issue
Block a user