mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
fix: 修复非16:9画布下导出PDF异常的问题
This commit is contained in:
parent
0701663e5e
commit
1fa355a170
@ -72,7 +72,7 @@ const emit = defineEmits<{
|
||||
(event: 'close'): void
|
||||
}>()
|
||||
|
||||
const { slides, currentSlide } = storeToRefs(useSlidesStore())
|
||||
const { slides, currentSlide, viewportRatio } = storeToRefs(useSlidesStore())
|
||||
|
||||
const pdfThumbnailsRef = ref<HTMLElement>()
|
||||
const rangeType = ref<'all' | 'current'>('all')
|
||||
@ -83,7 +83,7 @@ const expPDF = () => {
|
||||
if (!pdfThumbnailsRef.value) return
|
||||
const pageSize = {
|
||||
width: 1600,
|
||||
height: rangeType.value === 'all' ? 900 * count.value : 900,
|
||||
height: rangeType.value === 'all' ? 1600 * viewportRatio.value * count.value : 1600 * viewportRatio.value,
|
||||
margin: padding.value ? 50 : 0,
|
||||
}
|
||||
print(pdfThumbnailsRef.value, pageSize)
|
||||
|
Loading…
x
Reference in New Issue
Block a user