mirror of
https://github.com/simon987/sist2.git
synced 2025-12-13 15:29:04 +00:00
web UI rewrite, switch to ndjson.zst index format
This commit is contained in:
28
sist2-vue/src/components/ContentDiv.vue
Normal file
28
sist2-vue/src/components/ContentDiv.vue
Normal file
@@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<div class="content-div" v-html="content()" v-if="content()"></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
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"][0];
|
||||
}
|
||||
if (this.doc.highlight.content) {
|
||||
return this.doc.highlight.content[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user