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, {