Merge pull request #570 from jyehn/master

fix routepath
This commit is contained in:
Evan Xu 2022-03-29 14:30:14 +08:00 committed by GitHub
commit afedae844e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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}`)
}