From 6d594ae82e4452a8ba41bc3d68bcdbb3c4f8d692 Mon Sep 17 00:00:00 2001 From: xcjm Date: Mon, 28 Mar 2022 20:05:11 +0800 Subject: [PATCH] fix routepath --- vdoing/components/AlgoliaSearchBox.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/vdoing/components/AlgoliaSearchBox.vue b/vdoing/components/AlgoliaSearchBox.vue index f0c3d3d549..f191f3562c 100644 --- a/vdoing/components/AlgoliaSearchBox.vue +++ b/vdoing/components/AlgoliaSearchBox.vue @@ -46,6 +46,7 @@ export default { }, algoliaOptions), handleSelected: (input, event, suggestion) => { const { pathname, hash } = new URL(suggestion.url) + const routepath = pathname.replace(this.$site.base, '/'); const _hash = decodeURIComponent(hash) this.$router.push(`${routepath}${_hash}`) }