Fixed some recursion issues

This commit is contained in:
Ferdinand Thiessen 2021-03-14 17:41:43 +01:00
parent f18897caf4
commit ccf13eae9c
4 changed files with 7 additions and 47 deletions

View File

@ -2,12 +2,14 @@
<Pricelist />
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import Pricelist from '../components/Pricelist.vue';
export default {
export default defineComponent({
name: 'PricelistPage',
components: { Pricelist },
};
});
</script>
<style scoped></style>

View File

@ -18,7 +18,7 @@ const mainRoutes: FG_Plugin.PluginRouteConfig[] = [
route: {
path: 'pricelist',
name: 'drinks-pricelist',
component: () => import('../pages/Pricelist.vue'),
component: () => import('../pages/PricelistP.vue'),
},
},
{

View File

@ -1,42 +0,0 @@
<template>
<div>
<q-page v-if="checkMain" padding>
<q-card>
<q-card-section>
<q-list v-for="(mainRoute, index) in mainRoutes" :key="'mainRoute' + index">
<essential-link
v-for="(route, index2) in mainRoute.children"
:key="'route' + index2"
:title="route.title"
:icon="route.icon"
:link="route.name"
:permissions="route.meta.permissions"
/>
</q-list>
</q-card-section>
</q-card>
</q-page>
<router-view />
</div>
</template>
<script lang="ts">
import { computed, defineComponent } from 'vue';
import EssentialLink from 'src/components/navigation/EssentialLink.vue';
import mainRoutes from 'src/plugins/schedule/routes';
import { useRoute } from 'vue-router';
export default defineComponent({
// name: 'PageName'
components: { EssentialLink },
setup() {
const route = useRoute();
const checkMain = computed(() => {
return route.matched.length == 2;
});
return { checkMain, mainRoutes };
},
});
</script>
<style scoped></style>

View File

@ -8,7 +8,7 @@ const mainRoutes: FG_Plugin.PluginRouteConfig[] = [
route: {
path: 'schedule',
name: 'schedule',
component: () => import('../pages/MainPage.vue'),
redirect: { name: 'schedule-overview' },
},
children: [
{