From 400a908cf987f37597ef25b136e4ebf0463393b9 Mon Sep 17 00:00:00 2001 From: Lykin <137850705+tiny-craft@users.noreply.github.com> Date: Wed, 8 Jan 2025 11:55:12 +0800 Subject: [PATCH] fix: can not display hash value with unreadable char --- .../src/components/content_value/ContentValueHash.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/content_value/ContentValueHash.vue b/frontend/src/components/content_value/ContentValueHash.vue index 7058d4a..6263dab 100644 --- a/frontend/src/components/content_value/ContentValueHash.vue +++ b/frontend/src/components/content_value/ContentValueHash.vue @@ -40,7 +40,7 @@ const props = defineProps({ default: -1, }, value: { - type: Array, + type: [String, Array], default: () => [], }, size: Number, @@ -140,13 +140,14 @@ const valueColumn = computed(() => ({ // return !!~row.v.indexOf(value.toString()) // }, render: (row) => { + const val = row.dv || decodeRedisKey(row.v) if (isCode.value) { - return h('pre', { class: 'pre-wrap' }, row.dv || row.v) + return h('pre', { class: 'pre-wrap' }, val) } if (row.rm === true) { - return h('s', {}, row.dv || row.v) + return h('s', {}, val) } - return row.dv || row.v + return val }, }))