diff --git a/wwwroot/api/workspace_view.dspy b/wwwroot/api/workspace_view.dspy index ef1b7c4..f0eb136 100644 --- a/wwwroot/api/workspace_view.dspy +++ b/wwwroot/api/workspace_view.dspy @@ -34,15 +34,19 @@ ext = os.path.splitext(name)[1].lower() file_url = entire_url("/pipeline-sdlc/api/workspace_file.dspy") + "?id=" + quote(file_id) -# txt/md → MdWidget 渲染 +# txt/md → VScrollPanel 包裹 MdWidget 渲染(可滚动,长文档不截断) md_exts = ['.md', '.txt'] if ext in md_exts: return { "widgettype": "PopupWindow", "options": {"title": name + " (查看)", "width": "85%", "height": "85%", "auto_open": True, "resizable": True}, "subwidgets": [{ - "widgettype": "MdWidget", - "options": {"md_url": file_url, "width": "100%", "height": "100%"} + "widgettype": "VScrollPanel", + "options": {"css": "filler", "width": "100%", "height": "100%"}, + "subwidgets": [{ + "widgettype": "MdWidget", + "options": {"md_url": file_url, "width": "100%"} + }] }] }