diff --git a/src/hooks/useExport.ts b/src/hooks/useExport.ts index 0f2e038e..f190cce0 100644 --- a/src/hooks/useExport.ts +++ b/src/hooks/useExport.ts @@ -67,7 +67,13 @@ export default () => { // 导出JSON文件 const exportJSON = () => { - const blob = new Blob([JSON.stringify(slides.value)], { type: '' }) + const json = { + title: title.value, + width: viewportSize.value, + height: viewportSize.value * viewportRatio.value, + slides: slides.value, + } + const blob = new Blob([JSON.stringify(json)], { type: '' }) saveAs(blob, `${title.value}.json`) } diff --git a/src/views/Editor/ExportDialog/ExportJSON.vue b/src/views/Editor/ExportDialog/ExportJSON.vue index e30bd0a1..0607fab3 100644 --- a/src/views/Editor/ExportDialog/ExportJSON.vue +++ b/src/views/Editor/ExportDialog/ExportJSON.vue @@ -1,7 +1,7 @@