From 08df73aec4f38f7eb16914059eb97c4ab4705f03 Mon Sep 17 00:00:00 2001 From: wanglin2 <1013335014@qq.com> Date: Sun, 6 Apr 2025 17:08:57 +0800 Subject: [PATCH] =?UTF-8?q?Demo:=E5=AF=BC=E5=87=BA=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=80=89=E6=8B=A9=E6=98=AF=E5=90=A6=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=AE=8C=E6=95=B4=E8=83=8C=E6=99=AF=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/lang/en_us.js | 3 ++- web/src/lang/zh_cn.js | 3 ++- web/src/lang/zh_tw.js | 3 ++- web/src/pages/Edit/components/Export.vue | 19 ++++++++++++++++--- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/web/src/lang/en_us.js b/web/src/lang/en_us.js index e50d3b5b..3331e4c1 100644 --- a/web/src/lang/en_us.js +++ b/web/src/lang/en_us.js @@ -171,7 +171,8 @@ export default { addFooterTextPlaceholder: 'For example: From simple-mind-map', addFooterText: 'Add text at the footer', desc: 'Desc', - options: 'Options' + options: 'Options', + isFitBg: 'Whether to display the complete background image (effective when a background image is used)' }, fullscreen: { fullscreenShow: 'Full screen show', diff --git a/web/src/lang/zh_cn.js b/web/src/lang/zh_cn.js index f9bf80c1..d71194cc 100644 --- a/web/src/lang/zh_cn.js +++ b/web/src/lang/zh_cn.js @@ -166,7 +166,8 @@ export default { addFooterText: '底部添加文字', addFooterTextPlaceholder: '比如:来自simple-mind-map', desc: '说明', - options: '选项' + options: '选项', + isFitBg: '是否显示完整背景图片(使用了背景图片时生效)' }, fullscreen: { fullscreenShow: '全屏查看', diff --git a/web/src/lang/zh_tw.js b/web/src/lang/zh_tw.js index 744f1e72..dc0912ee 100644 --- a/web/src/lang/zh_tw.js +++ b/web/src/lang/zh_tw.js @@ -167,7 +167,8 @@ export default { addFooterText: '在底部新增文字', addFooterTextPlaceholder: '例如:來自 simple-mind-map', desc: '說明', - options: '選項' + options: '選項', + isFitBg: '是否顯示完整背景圖片(使用了背景圖片時生效)' }, fullscreen: { fullscreenShow: '全螢幕檢視', diff --git a/web/src/pages/Edit/components/Export.vue b/web/src/pages/Edit/components/Export.vue index a1702e40..82166444 100644 --- a/web/src/pages/Edit/components/Export.vue +++ b/web/src/pages/Edit/components/Export.vue @@ -100,6 +100,11 @@ >{{ $t('export.isTransparent') }} +
+ {{ + $t('export.isFitBg') + }} +
@@ -136,7 +141,8 @@ export default { paddingX: 10, paddingY: 10, extraText: '', - isMobile: isMobile() + isMobile: isMobile(), + isFitBg: true } }, computed: { @@ -166,6 +172,10 @@ export default { return item.type === this.exportType }) return cur + }, + + showFitBgOption() { + return ['png', 'pdf'].includes(this.exportType) && !this.isTransparent } }, created() { @@ -220,7 +230,9 @@ export default { this.exportType, true, this.fileName, - this.isTransparent + this.isTransparent, + null, + this.isFitBg ) } else if (this.exportType === 'pdf') { this.$bus.$emit( @@ -228,7 +240,8 @@ export default { this.exportType, true, this.fileName, - this.isTransparent + this.isTransparent, + this.isFitBg ) } else if (this.exportType === 'mm') { this.$bus.$emit('export', this.exportType, true, this.fileName, {