Fixed empty calculated inline fields showing calc
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
</v-toolbar-title>
|
||||
<v-spacer />
|
||||
</template>
|
||||
<v-card-text v-if="model.summary">
|
||||
<v-card-text v-if="summaryText">
|
||||
<property-description
|
||||
text
|
||||
:model="model.summary"
|
||||
@@ -20,21 +20,31 @@
|
||||
</template>
|
||||
|
||||
<script lang="js">
|
||||
import ToolbarCard from '/imports/ui/components/ToolbarCard.vue';
|
||||
import PropertyDescription from '/imports/ui/properties/viewers/shared/PropertyDescription.vue'
|
||||
import ToolbarCard from '/imports/ui/components/ToolbarCard.vue';
|
||||
import PropertyDescription from '/imports/ui/properties/viewers/shared/PropertyDescription.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ToolbarCard,
|
||||
PropertyDescription,
|
||||
},
|
||||
props: {
|
||||
model: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
};
|
||||
export default {
|
||||
components: {
|
||||
ToolbarCard,
|
||||
PropertyDescription,
|
||||
},
|
||||
props: {
|
||||
model: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
summaryText() {
|
||||
if (!this.model || !this.model.summary) return;
|
||||
if (typeof this.model.summary.value === 'string') {
|
||||
return this.model.summary.value;
|
||||
} else {
|
||||
return this.model.summary.text
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="css" scoped>
|
||||
|
||||
Reference in New Issue
Block a user