fix(plan): 修复计划书文件预览功能,恢复 useFileOperation 依赖
修复消息详情页点击"查计划书"后 PDF/Office 文件无法打开的问题。 问题根因: - 2026-02-14 重构时删除了 useFileOperation 依赖 - 所有文件都错误地使用 Taro.previewImage(仅支持图片) 修复内容: - 恢复 useFileOperation composable 的依赖 - handleFileView 使用 viewFile 方法支持多种文件类型 - 图片、PDF、Office 文档现在都能正确预览 经验教训: - 重构时必须验证代码等价性 - 删除依赖前需理解其完整作用 - 已将此案例记录到全局规则 refactor-traps.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Showing
1 changed file
with
8 additions
and
33 deletions
-
Please register or login to post a comment