From f9f81ff560dc1d435cce4f8822e987201e71b627 Mon Sep 17 00:00:00 2001 From: wuwen Date: Mon, 16 Jan 2023 17:14:36 +0800 Subject: [PATCH] fix: Formatted display of json content type --- src/views/dashboard/related/log/LogTable/LogDetail.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/dashboard/related/log/LogTable/LogDetail.vue b/src/views/dashboard/related/log/LogTable/LogDetail.vue index 91dcb965..e65d8954 100644 --- a/src/views/dashboard/related/log/LogTable/LogDetail.vue +++ b/src/views/dashboard/related/log/LogTable/LogDetail.vue @@ -23,7 +23,9 @@ limitations under the License. --> class="content mb-10" :readonly="true" v-else-if="item.label === 'content'" - :value="currentLog[item.label]" + :value=" + currentLog.contentType === 'JSON' ? formatJson(JSON.parse(currentLog[item.label])) : currentLog[item.label] + " />
{{ d }}
@@ -38,6 +40,7 @@ limitations under the License. --> import { useI18n } from "vue-i18n"; import type { Option } from "@/types/app"; import { dateFormat } from "@/utils/dateFormat"; + import { formatJson } from "@/utils/formatJson"; /*global defineProps */ const props = defineProps({