update(examples): Fix examples

This commit is contained in:
Braks
2021-10-20 22:39:54 +02:00
parent a5ae6a4e48
commit 29c6df1755
25 changed files with 690 additions and 885 deletions
+22
View File
@@ -0,0 +1,22 @@
<script lang="ts" setup>
import { useRoute, useRouter } from 'vue-router'
import { routes } from './router'
const router = useRouter()
const route = useRoute()
const onChange = (event: any) => {
router.push(event.target.value)
}
</script>
<template>
<header>
<a class="logo" href="https://github.com/bcakmakoglu/revue-flow"> Revue Flow Dev </a>
<select v-model="route.path" @change="onChange">
<template v-for="(r, i) of routes" :key="`route-${i}`">
<option v-if="r.path !== '/'" :value="r.path">
{{ r.path.substr(1, r.path.length) }}
</option>
</template>
</select>
</header>
</template>