cap title, display origin text in content

This commit is contained in:
liangping 2022-11-01 08:12:10 +08:00
parent 261beb968d
commit c34fe87444

View File

@ -42,8 +42,8 @@
v-for="key in Object.keys(value)" v-for="key in Object.keys(value)"
:key="key" :key="key"
:title="formatTitle(key)" :title="formatTitle(key)"
class="p-0 text-capitalize" class="p-0"
title-item-class="bg-light-primary" title-item-class="bg-light-primary text-capitalize"
> >
<array-field-component <array-field-component
v-if="Array.isArray(value[key])" v-if="Array.isArray(value[key])"
@ -134,7 +134,7 @@ export default {
// } // }
return value return value
}, },
formatTitle: v => v.replaceAll('_', ' '), formatTitle: v => String(v).replaceAll('_', ' '),
isObjectText(v) { isObjectText(v) {
return String(v).startsWith('{') && String(v).endsWith('}') return String(v).startsWith('{') && String(v).endsWith('}')
}, },