nav is going on in header menu
This commit is contained in:
+9
-17
@@ -1,18 +1,11 @@
|
||||
<template>
|
||||
<MainContentLayout id="operum" class="index">
|
||||
<MainContentLayout id="operum">
|
||||
<template v-slot:header>
|
||||
<h1>Œuvres</h1>
|
||||
<span v-if="!items.length">Loading ...</span>
|
||||
<h1 v-if="content">{{ content.title }}</h1>
|
||||
<span v-if="!content">Loading ...</span>
|
||||
</template>
|
||||
|
||||
<ul v-if="items.length" class="item-list">
|
||||
<li v-for="item in items" :key="item.url">
|
||||
<OperumItem :item="item" />
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<template v-slot:nav>
|
||||
</template>
|
||||
<template v-slot:nav />
|
||||
</MainContentLayout>
|
||||
</template>
|
||||
|
||||
@@ -20,23 +13,22 @@
|
||||
|
||||
import { REST } from 'api/rest-axios'
|
||||
import MainContentLayout from '../components/Layouts/MainContentLayout'
|
||||
import OperumItem from '../components/Content/OperumItem'
|
||||
|
||||
export default {
|
||||
name: 'Operum',
|
||||
components: {
|
||||
OperumItem,
|
||||
MainContentLayout
|
||||
},
|
||||
data: () => ({
|
||||
items: []
|
||||
content: null
|
||||
}),
|
||||
beforeCreate () {
|
||||
REST.get(`/indexOperum`, {})
|
||||
console.log('operum this.$route', this.$route)
|
||||
REST.get(`/indexOperum/` + this.$route.params.id, {})
|
||||
.then(({ data }) => {
|
||||
console.log('operum REST: data', data)
|
||||
if (data.content.length) {
|
||||
this.items = data.content
|
||||
if (data.content) {
|
||||
this.content = data.content
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
|
||||
Reference in New Issue
Block a user