Skip to content

Commit

Permalink
feat: f7 routes
Browse files Browse the repository at this point in the history
  • Loading branch information
qin-guan committed Sep 19, 2023
1 parent 033ae5a commit e3fafa6
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
10 changes: 10 additions & 0 deletions composables/routes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export const appRoutes = [
{
path: '/',
asyncComponent: () => import('~/pages/index.vue'),
},
{
path: '/events',
asyncComponent: () => import('~/pages/index.vue'),
},
]
12 changes: 10 additions & 2 deletions pages/app.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
<script setup lang="ts">
// @ts-expect-error Missing types
import Framework7 from 'framework7/lite-bundle'
// @ts-expect-error Missing types
import Framework7Vue from 'framework7-vue/bundle'
import { f7App, f7View } from 'framework7-vue'
Framework7.use(Framework7Vue)
</script>

<template>
<f7App>
<f7View>
<f7App :routes="appRoutes">
<f7View
main
browser-history
browser-history-separator=""
:browser-history-initial-match="true"
:browser-history-store-history="false"
>
<NuxtPage />
</f7View>
</f7App>
Expand Down
8 changes: 8 additions & 0 deletions pages/app/events.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<script setup lang="ts">
</script>

<template>
<div>
hello from events!
</div>
</template>

0 comments on commit e3fafa6

Please # to comment.