vanilla-vue-ui 0.0.16 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
</a>
|
|
10
10
|
</div>
|
|
11
11
|
</li>
|
|
12
|
-
<li v-for="(page, index) in
|
|
13
|
-
<div
|
|
12
|
+
<li v-for="(page, index) in filteredPages" :key="page.name">
|
|
13
|
+
<div class="flex items-center">
|
|
14
14
|
<ChevronRightIcon
|
|
15
15
|
:class="mergedClasses.icon?.base"
|
|
16
|
-
v-if="index <
|
|
16
|
+
v-if="index < filteredPages.length - 1"
|
|
17
17
|
aria-hidden="true"
|
|
18
18
|
/>
|
|
19
19
|
<a
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
import { ChevronRightIcon, HomeIcon } from '@heroicons/vue/20/solid'
|
|
34
34
|
import { useRouter, useRoute } from 'vue-router'
|
|
35
35
|
import type { RouteMeta } from 'vue-router';
|
|
36
|
-
import { ref, onMounted, watch, type PropType } from 'vue';
|
|
36
|
+
import { ref, onMounted, watch, type PropType, computed } from 'vue';
|
|
37
37
|
import type { ClassObject } from '../../types/ClassObject';
|
|
38
38
|
import { deepMergeClassObject } from '../../util';
|
|
39
39
|
import { withTrailingSlash } from 'ufo'
|
|
@@ -68,6 +68,8 @@ type Page = {
|
|
|
68
68
|
};
|
|
69
69
|
|
|
70
70
|
const pages = ref<Page[]>([]);
|
|
71
|
+
// 表示対象だけに絞る(<li> ごと消えるので余白が生まれない)
|
|
72
|
+
const filteredPages = computed(() => pages.value.filter(p => p.name.length > 1))
|
|
71
73
|
|
|
72
74
|
const router = useRouter();
|
|
73
75
|
const route = useRoute();
|