Skip to content

feat: 打印/导出时只保留题目配图,不包含拍照原图 / exclude photo imports from print & export, keep question figures only - #46

Open
1288893 wants to merge 1 commit into
margrop:mainfrom
1288893:feat/print-export-figure-only-v2
Open

1288893 wants to merge 1 commit into
margrop:mainfrom
1288893:feat/print-export-figure-only-v2

Conversation

@1288893

@1288893 1288893 commented Nov 26, 2026

Copy link
Copy Markdown

问题描述 / Problem

打印预览和导出 Word 时,会把用户拍照导入的原始照片(originalImageUrl)一并输出,
导致打印内容冗余、浪费纸张。学生整理错题本时,只需要题目自带的配图,不需要原始拍照。

When printing or exporting to Word, the app includes the original photo imported
by the user (originalImageUrl), which is redundant and wastes paper/space.
Students only need the clean typeset question with its embedded diagram — not the raw photo.


改动说明 / Changes

打印预览 / Print Preview (/print-preview)

  • 移除了「无配图时回退显示拍照原图」的逻辑
  • 现在只渲染 figureImage / figureSvg(题目自带配图)
  • Removed fallback to originalImageUrl when no structured figure exists
  • Now only renders figureImage / figureSvg (question-embedded figures)

Word 导出 / Word Export (.docx)

  • 新增 includeFigures 选项(默认开启),用于嵌入题目配图
  • includeImages(拍照原图)默认改为关闭
  • 导出对话框新增两个独立勾选框
  • Added includeFigures option (default: true) to embed question figures
  • includeImages (original photo) now defaults to false
  • UI shows two separate checkboxes in the export dialog

国际化 / i18n

  • zh.ts 和 en.ts 新增 includeFigures 相关文案
  • Updated zh.ts and en.ts with new keys for includeFigures

测试 / Tests

  • 更新了 printable-question、from-error-item、to-docx 的单元测试
  • lint、单元测试、集成测试全部通过 ✅
  • Updated unit tests for printable-question, from-error-item, to-docx
  • All lint, unit, and integration tests pass ✅

@1288893
1288893 requested a review from margrop as a code owner November 26, 2026 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant