fix: can not display hash value with unreadable char

This commit is contained in:
Lykin 2025-01-08 11:55:12 +08:00
parent edd77182a5
commit 400a908cf9
1 changed files with 5 additions and 4 deletions

View File

@ -40,7 +40,7 @@ const props = defineProps({
default: -1, default: -1,
}, },
value: { value: {
type: Array, type: [String, Array],
default: () => [], default: () => [],
}, },
size: Number, size: Number,
@ -140,13 +140,14 @@ const valueColumn = computed(() => ({
// return !!~row.v.indexOf(value.toString()) // return !!~row.v.indexOf(value.toString())
// }, // },
render: (row) => { render: (row) => {
const val = row.dv || decodeRedisKey(row.v)
if (isCode.value) { if (isCode.value) {
return h('pre', { class: 'pre-wrap' }, row.dv || row.v) return h('pre', { class: 'pre-wrap' }, val)
} }
if (row.rm === true) { if (row.rm === true) {
return h('s', {}, row.dv || row.v) return h('s', {}, val)
} }
return row.dv || row.v return val
}, },
})) }))