From 8cd4cf8314648d40a89b092b2d382761a35e4aba Mon Sep 17 00:00:00 2001 From: TiantianHu Date: Tue, 19 Nov 2024 12:55:29 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9A=90=E8=97=8F=E9=A6=96=E9=A1=B5=E5=8F=B3?= =?UTF-8?q?=E4=BE=A7=E5=A4=9A=E4=BD=99=E7=9A=84=E6=BB=9A=E5=8A=A8=E6=9D=A1?= =?UTF-8?q?=EF=BC=9B=E8=B0=83=E6=95=B4=E8=AF=A6=E6=83=85=E9=A1=B5=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E6=96=B9=E6=A1=88=EF=BC=8C=E9=80=82=E5=BA=94=E8=B4=A6?= =?UTF-8?q?=E5=8D=95=E8=AF=A6=E6=83=85=E5=9C=BA=E6=99=AF=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E8=A6=81=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- myapp/frontend/src/pages/ADUGTemplate.tsx | 83 +++++++++++++++++------ myapp/templates/home.html | 2 +- 2 files changed, 65 insertions(+), 20 deletions(-) diff --git a/myapp/frontend/src/pages/ADUGTemplate.tsx b/myapp/frontend/src/pages/ADUGTemplate.tsx index 7a4077740..be3f5b9bf 100644 --- a/myapp/frontend/src/pages/ADUGTemplate.tsx +++ b/myapp/frontend/src/pages/ADUGTemplate.tsx @@ -1010,27 +1010,72 @@ export default function TaskListManager(props?: IAppMenuItem) { destroyOnClose onCancel={() => { setVisableDetail(false) }}> -
- { - dataDetail.map((item, index) => { - return -
{item.label}:
-
 {
-                                            let content = item.value
-                                            if (Object.prototype.toString.call(item.value) === '[object Object]' || Object.prototype.toString.call(item.value) === '[object Array]') {
-                                                try {
-                                                    content = JSON.stringify(item.value)
-                                                } catch (error) { }
-                                            }
-                                            return content
-                                        })()
-                                    }}>
-
- }) - } +
+ {dataDetail.map((item, index) => ( +
+ {/* Label列 */} +
+ {item.label}: +
+ + {/* Value列 */} +
+
 {
+                                let content = item.value;
+                                if (
+                                    Object.prototype.toString.call(item.value) === '[object Object]' ||
+                                    Object.prototype.toString.call(item.value) === '[object Array]'
+                                ) {
+                                    try {
+                                    content = JSON.stringify(item.value, null, 2); // 格式化输出
+                                    } catch (error) {}
+                                }
+                                return content;
+                                })(),
+                            }}
+                            >
+
+
+ ))}
+ diff --git a/myapp/templates/home.html b/myapp/templates/home.html index 45134c5ca..7f05658da 100644 --- a/myapp/templates/home.html +++ b/myapp/templates/home.html @@ -5,7 +5,7 @@ {% endblock %} {% block content %} -
+