From a872f9f0ce248ac120454434839cc3f298274c3b Mon Sep 17 00:00:00 2001 From: zxc <1171051090@qq.com> Date: Sat, 22 Mar 2025 16:18:05 +0800 Subject: [PATCH] chore: update pptxtojson v1.2.2 --- package-lock.json | 14 +++++++------- package.json | 2 +- src/hooks/useImport.ts | 15 ++++++++++++++- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index b639878a..6b9ae622 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,7 @@ "number-precision": "^1.6.0", "pinia": "^2.1.7", "pptxgenjs": "^3.12.0", - "pptxtojson": "^1.2.1", + "pptxtojson": "^1.2.2", "prosemirror-commands": "^1.6.0", "prosemirror-dropcursor": "^1.8.1", "prosemirror-gapcursor": "^1.3.2", @@ -4177,9 +4177,9 @@ } }, "node_modules/pptxtojson": { - "version": "1.2.1", - "resolved": "https://registry.npmmirror.com/pptxtojson/-/pptxtojson-1.2.1.tgz", - "integrity": "sha512-ECYH2jc8hh2kzmrpQLHDEKrnCMlDdqu/diOqeSQ6luwTZVOGtdjk20ooUa1GWgrzXGBlNf2b6SCjnWqyAwVyjw==", + "version": "1.2.2", + "resolved": "https://registry.npmmirror.com/pptxtojson/-/pptxtojson-1.2.2.tgz", + "integrity": "sha512-F50uJ+3I3az7DB9+6R+OsWWT8YLdnuDWjwo88cGnOprlPWqrpuRq6inXxL1oSwBICJmZbuN+3RJwrtarvp133w==", "dependencies": { "jszip": "^3.10.1", "tinycolor2": "1.6.0", @@ -8393,9 +8393,9 @@ } }, "pptxtojson": { - "version": "1.2.1", - "resolved": "https://registry.npmmirror.com/pptxtojson/-/pptxtojson-1.2.1.tgz", - "integrity": "sha512-ECYH2jc8hh2kzmrpQLHDEKrnCMlDdqu/diOqeSQ6luwTZVOGtdjk20ooUa1GWgrzXGBlNf2b6SCjnWqyAwVyjw==", + "version": "1.2.2", + "resolved": "https://registry.npmmirror.com/pptxtojson/-/pptxtojson-1.2.2.tgz", + "integrity": "sha512-F50uJ+3I3az7DB9+6R+OsWWT8YLdnuDWjwo88cGnOprlPWqrpuRq6inXxL1oSwBICJmZbuN+3RJwrtarvp133w==", "requires": { "jszip": "^3.10.1", "tinycolor2": "1.6.0", diff --git a/package.json b/package.json index f7c0fe43..a7b3b7ed 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "number-precision": "^1.6.0", "pinia": "^2.1.7", "pptxgenjs": "^3.12.0", - "pptxtojson": "^1.2.1", + "pptxtojson": "^1.2.2", "prosemirror-commands": "^1.6.0", "prosemirror-dropcursor": "^1.8.1", "prosemirror-gapcursor": "^1.3.2", diff --git a/src/hooks/useImport.ts b/src/hooks/useImport.ts index 25922a0a..3fa1daf3 100644 --- a/src/hooks/useImport.ts +++ b/src/hooks/useImport.ts @@ -194,7 +194,7 @@ export default () => { else { background = { type: 'solid', - color: value, + color: value || '#fff', } } @@ -265,6 +265,19 @@ export default () => { flipV: el.isFlipV, }) } + else if (el.type === 'math') { + slide.elements.push({ + type: 'image', + id: nanoid(10), + src: el.picBase64, + width: el.width, + height: el.height, + left: el.left, + top: el.top, + fixedRatio: true, + rotate: 0, + }) + } else if (el.type === 'audio') { slide.elements.push({ type: 'audio',