tiptap/demos/preview/index.vue

29 lines
656 B
Vue
Raw Normal View History

2021-08-25 17:52:20 +08:00
<template>
<ul v-if="$route.path === '/'">
2021-08-26 16:52:15 +08:00
<li
class="p-5 border-b-2 border-black"
v-for="route in $router.options.routes"
:key="route.path"
>
<router-link
class="block mb-2 font-medium"
:to="route.path"
>
{{ route.props.name }}
2021-08-25 17:52:20 +08:00
</router-link>
2021-08-26 16:52:15 +08:00
<div class="flex">
<a
class="mr-4 text-sm text-gray-300 font-medium"
v-for="(tab, index) in route.props.tabs"
:key="index"
:href="`/src/${route.props.name}/${tab.name}/`"
>
{{ tab.name }}
</a>
</div>
2021-08-25 17:52:20 +08:00
</li>
</ul>
<router-view v-else />
</template>