Skip to content

Commit e5f89c4

Browse files
committed
fix: 使用搜索后有//#刷新页面页面空白的问题 DevCloudFE#1619
1 parent 34b0ecd commit e5f89c4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/devui-vue/docs/.vitepress/devui-theme/components/AlgoliaSearchBox.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ function initialize(userOptions: DefaultTheme.AlgoliaSearchOptions) {
4242
navigator: {
4343
navigate({ itemUrl }) {
4444
const _itemUrl = itemUrl.replaceAll('//', '/');
45-
const { pathname: hitPathname } = new URL(window.location.origin + _itemUrl);
46-
45+
const { pathname: hitPathname } = new URL(
46+
window.location.origin + _itemUrl,
47+
);
48+
4749
// router doesn't handle same-page navigation so we use the native
4850
// browser location API for anchor navigation
4951
if (route.path === hitPathname) {

0 commit comments

Comments
 (0)