sist2/sist2-vue/src/components/ContentDiv.vue
2025-07-05 09:56:50 -04:00

30 lines
629 B
Vue

<template>
<div class="content-div" v-html="content()" v-if="content()"></div>
</template>
<script>
const FRAGMENT_SEPARATOR = "<br /><i style='line-height: 2.4'>[…]</i><br/>";
export default {
name: "ContentDiv",
props: ["doc"],
methods: {
content() {
if (!this.doc.highlight) {
return null;
}
if (this.doc.highlight["content.nGram"]) {
return this.doc.highlight["content.nGram"].join(FRAGMENT_SEPARATOR);
}
if (this.doc.highlight.content) {
return this.doc.highlight.content.join(FRAGMENT_SEPARATOR);
}
}
}
}
</script>
<style scoped>
</style>