nav is going on in header menu

This commit is contained in:
2020-02-27 15:07:17 +01:00
parent 62bde64b7b
commit 6c4f38f017
16 changed files with 436 additions and 120 deletions
+16 -6
View File
@@ -2,12 +2,18 @@
<article class="operum item">
<header>
<h1>
<a
v-if="item.uuid"
:href="item.url"
@click.prevent="onclick"
@keyup.enter="onclick"
v-html="item.title"
/>
>
{{ item.title }}
</a>
<span v-else class="red">
{{ item.title }}
</span>
</h1>
</header>
</article>
@@ -28,10 +34,14 @@ export default {
methods: {
onclick () {
console.log('clicked on Operum item', this.item)
this.$router.push({
name: `operuumItem`,
query: { id: this.item.uuid }
})
if (this.item.uuid) {
this.$router.push({
name: `operum`,
params: { id: this.item.uuid }
})
} else {
console.warn('no uuid', this.item)
}
}
}
}