vanilla-vue-ui 0.0.23 → 0.0.24
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.
|
@@ -44,6 +44,10 @@ const props = defineProps({
|
|
|
44
44
|
trailingSlash: {
|
|
45
45
|
type: Boolean as PropType<boolean>,
|
|
46
46
|
default: false
|
|
47
|
+
},
|
|
48
|
+
hideWords: {
|
|
49
|
+
type: Array as PropType<string[]>,
|
|
50
|
+
default: () => ['ja', 'en', 'p', 'z', 'blog']
|
|
47
51
|
}
|
|
48
52
|
})
|
|
49
53
|
|
|
@@ -65,10 +69,17 @@ type Page = {
|
|
|
65
69
|
href: string;
|
|
66
70
|
current: boolean;
|
|
67
71
|
};
|
|
68
|
-
|
|
69
72
|
const pages = ref<Page[]>([]);
|
|
70
73
|
// 表示対象だけに絞る(<li> ごと消えるので余白が生まれない)
|
|
71
|
-
const filteredPages = computed(() =>
|
|
74
|
+
const filteredPages = computed(() => {
|
|
75
|
+
const hideSet = props.hideWords.map(w => w.toLowerCase())
|
|
76
|
+
|
|
77
|
+
return pages.value.filter(p => {
|
|
78
|
+
if (p.name.length <= 1) return false
|
|
79
|
+
|
|
80
|
+
return !hideSet.includes(p.name.toLowerCase())
|
|
81
|
+
})
|
|
82
|
+
})
|
|
72
83
|
|
|
73
84
|
const router = useRouter();
|
|
74
85
|
const route = useRoute();
|