I’m struggling to get the navigation portion of a Vue app working. I’m trying to follow this and this but I can’t seem to understand how to use the components or get them to show up in the right place. My original non-Vue version looked like this.
but my attempt at using Vue has the settings and the navigation items showing up in the middle like this.
I just want nav buttons at the top that load reports in the content area when they’re clicked. And I want the settings at the bottom like they are in other NC apps. Here is my code. Any suggestions?
<template>
<Content :class="{'icon-loading': loading}" app-name="hledger">
<AppNavigation>
<ul>
<AppNavigationItem title="Item with actions" icon="icon-category-enabled" :pinned="true">
<template slot="actions">
<ActionButton icon="icon-edit" @click="alert('Edit')">
Edit
</ActionButton>
<ActionButton icon="icon-delete" @click="alert('Delete')">
Delete
</ActionButton>
<ActionLink icon="icon-external" title="Link" href="https://nextcloud.com" />
</template>
</AppNavigationItem>
</ul>
<AppNavigationSettings>
Example settings
</AppNavigationSettings>
</AppNavigation>
<AppContent>
Hello World!
</AppContent>
</Content>
</template>
<script>
import Content from '@nextcloud/vue/dist/Components/Content'
import AppNavigation from '@nextcloud/vue/dist/Components/AppNavigation'
import AppNavigationItem from '@nextcloud/vue/dist/Components/AppNavigationItem'
import AppNavigationSettings from '@nextcloud/vue/dist/Components/AppNavigationSettings'
import AppContent from '@nextcloud/vue/dist/Components/AppContent'
import '@nextcloud/dialogs/styles/toast.scss'
export default {
name: 'App',
components: {
Content,
AppNavigation,
AppNavigationItem,
AppNavigationSettings,
AppContent,
},
data() {
return {
loading: false,
message: 'Initial Message',
report: [
['A', 'B', 'C'],
[1, 2, 3],
[4, 5, 6],
],
}
},
computed: {},
methods: {},
}
</script>