25 lines
449 B
Vue
Executable File
25 lines
449 B
Vue
Executable File
<template>
|
|
<div>
|
|
<template v-if="hasValue">
|
|
<div v-if="field.asHtml" v-html="field.value"></div>
|
|
<span v-else>{{ field.value }}</span>
|
|
</template>
|
|
<p v-else>—</p>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: ['resourceName', 'field'],
|
|
|
|
computed: {
|
|
/**
|
|
* Determine if the field has a value other than null.
|
|
*/
|
|
hasValue() {
|
|
return this.field.value !== null
|
|
},
|
|
},
|
|
}
|
|
</script>
|