|
|
@@ -1,4 +1,4 @@
|
|
|
-import { ref, nextTick } from 'vue'
|
|
|
+import { ref, nextTick } from 'vue'
|
|
|
import { storeToRefs } from 'pinia'
|
|
|
import { parse, type Shape, type Element, type ChartItem, type BaseElement } from 'pptxtojson'
|
|
|
import { nanoid } from 'nanoid'
|
|
|
@@ -11,6 +11,7 @@ import useSlideHandler from '@/hooks/useSlideHandler'
|
|
|
import useHistorySnapshot from './useHistorySnapshot'
|
|
|
import message from '@/utils/message'
|
|
|
import { getSvgPathRange } from '@/utils/svgPathParser'
|
|
|
+import { showConfirmDialog } from '@/utils/confirmDialog'
|
|
|
import { EMFJS, WMFJS } from 'rtf.js'
|
|
|
import * as UTIF from 'utif2'
|
|
|
|
|
|
@@ -1666,10 +1667,24 @@ export default () => {
|
|
|
}
|
|
|
else {
|
|
|
const targetViewportSize = width * ratio
|
|
|
+ if (!isNone && targetViewportSize != slidesStore.viewportSize) {
|
|
|
+ const confirmed = await showConfirmDialog({
|
|
|
+ title: lang.ssConfirmOperation,
|
|
|
+ content: lang.ssPageSizeMismatch,
|
|
|
+ confirmText: lang.ssConfirm,
|
|
|
+ cancelText: lang.ssCancel
|
|
|
+ })
|
|
|
+ if (!confirmed) {
|
|
|
+ exporting.value = false
|
|
|
+ imgExporting.value = false
|
|
|
+ onclose?.()
|
|
|
+ return Promise.reject(new Error('用户取消导入'))
|
|
|
+ }
|
|
|
+ }
|
|
|
if (isNone || targetViewportSize > slidesStore.viewportSize) {
|
|
|
slidesStore.setViewportSize(targetViewportSize) // 调整画布大小
|
|
|
+ slidesStore.setViewportRatio(viewportRatio)
|
|
|
}
|
|
|
- slidesStore.setViewportRatio(viewportRatio)
|
|
|
}
|
|
|
|
|
|
// 设置主题色
|
|
|
@@ -2468,4 +2483,4 @@ export default () => {
|
|
|
dataToFile,
|
|
|
uploadFileToS3
|
|
|
}
|
|
|
-}
|
|
|
+}
|