Fixes
This commit is contained in:
@@ -6,8 +6,20 @@ const props = defineProps({
|
||||
default: {}
|
||||
}
|
||||
})
|
||||
|
||||
const descriptionText = computed(() => {
|
||||
const description = props.row?.description
|
||||
if (!description) return ""
|
||||
if (typeof description === "string") return description
|
||||
if (typeof description === "object") {
|
||||
if (typeof description.text === "string" && description.text.trim().length) {
|
||||
return description.text
|
||||
}
|
||||
}
|
||||
return String(description)
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="props.row.description" v-html="props.row.description.html"/>
|
||||
<div v-if="descriptionText">{{ descriptionText }}</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user