CzRger 2 tygodni temu
rodzic
commit
d2f40c6039
1 zmienionych plików z 7 dodań i 1 usunięć
  1. 7 1
      src/api/interceptors.ts

+ 7 - 1
src/api/interceptors.ts

@@ -111,7 +111,13 @@ export class Interceptors {
               },
               },
               { default: () => '错误日志' },
               { default: () => '错误日志' },
             ),
             ),
-            h('div', { class: 'mt-2' }, res.data.data),
+            h(
+              'div',
+              { class: 'mt-2' },
+              typeof res.data.data === 'string'
+                ? res.data.data
+                : JSON.stringify(res.data.data),
+            ),
           ]),
           ]),
           type: 'error',
           type: 'error',
           duration: 0,
           duration: 0,