mirror of
https://github.com/simon987/sist2.git
synced 2025-09-08 23:56:57 +00:00
30 lines
629 B
Vue
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> |