fix: 工作控件查看按钮弹窗——MdWidget 外包 VScrollPanel,长文档可滚动不截断
This commit is contained in:
parent
d7b0013009
commit
42f3b7bf26
@ -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)
|
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']
|
md_exts = ['.md', '.txt']
|
||||||
if ext in md_exts:
|
if ext in md_exts:
|
||||||
return {
|
return {
|
||||||
"widgettype": "PopupWindow",
|
"widgettype": "PopupWindow",
|
||||||
"options": {"title": name + " (查看)", "width": "85%", "height": "85%", "auto_open": True, "resizable": True},
|
"options": {"title": name + " (查看)", "width": "85%", "height": "85%", "auto_open": True, "resizable": True},
|
||||||
"subwidgets": [{
|
"subwidgets": [{
|
||||||
"widgettype": "MdWidget",
|
"widgettype": "VScrollPanel",
|
||||||
"options": {"md_url": file_url, "width": "100%", "height": "100%"}
|
"options": {"css": "filler", "width": "100%", "height": "100%"},
|
||||||
|
"subwidgets": [{
|
||||||
|
"widgettype": "MdWidget",
|
||||||
|
"options": {"md_url": file_url, "width": "100%"}
|
||||||
|
}]
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user