first display of search results

This commit is contained in:
2019-09-18 12:06:18 +02:00
parent 1a0964d955
commit d289d17b2e
3 changed files with 71 additions and 3 deletions
+44
View File
@@ -0,0 +1,44 @@
<template>
<article class="result item">
<header>
<h1>
<a
:href="result.url"
@click.prevent="onclick"
@keyup.enter="onclick"
v-html="result.textId"
/>
</h1>
</header>
<div class="extract" v-html="result.extract" />
</article>
</template>
<script>
export default {
name: 'ResultItem',
props: {
result: {
type: Object,
required: true
}
},
data: () => ({
}),
methods: {
onclick () {
console.log('clicked on result item', this.result)
// this.$router.push({
// name:`article`,
// params: { alias:this.alias },
// query: { uuid: this.item.uuid }
// // meta: { uuid:this.item.uuid },
// })
}
}
}
</script>
<style lang="scss" scoped>
</style>