fix: external link jump (#4319)
* fix: external link jump * fix: external link jump * chore: update deps --------- Co-authored-by: Li Kui <90845831+likui628@users.noreply.github.com>pull/48/MERGE
parent
2b65e935c1
commit
31d5f03b45
|
@ -24,6 +24,7 @@
|
||||||
"@vben-core/menu-ui": "workspace:*",
|
"@vben-core/menu-ui": "workspace:*",
|
||||||
"@vben-core/popup-ui": "workspace:*",
|
"@vben-core/popup-ui": "workspace:*",
|
||||||
"@vben-core/shadcn-ui": "workspace:*",
|
"@vben-core/shadcn-ui": "workspace:*",
|
||||||
|
"@vben-core/shared": "workspace:*",
|
||||||
"@vben-core/tabs-ui": "workspace:*",
|
"@vben-core/tabs-ui": "workspace:*",
|
||||||
"@vben/constants": "workspace:*",
|
"@vben/constants": "workspace:*",
|
||||||
"@vben/hooks": "workspace:*",
|
"@vben/hooks": "workspace:*",
|
||||||
|
|
|
@ -8,6 +8,7 @@ import { SearchX, X } from '@vben/icons';
|
||||||
import { $t } from '@vben/locales';
|
import { $t } from '@vben/locales';
|
||||||
import { mapTree, traverseTreeValues, uniqueByField } from '@vben/utils';
|
import { mapTree, traverseTreeValues, uniqueByField } from '@vben/utils';
|
||||||
import { VbenIcon, VbenScrollbar } from '@vben-core/shadcn-ui';
|
import { VbenIcon, VbenScrollbar } from '@vben-core/shadcn-ui';
|
||||||
|
import { isHttpUrl } from '@vben-core/shared';
|
||||||
|
|
||||||
import { onKeyStroke, useLocalStorage, useThrottleFn } from '@vueuse/core';
|
import { onKeyStroke, useLocalStorage, useThrottleFn } from '@vueuse/core';
|
||||||
|
|
||||||
|
@ -99,7 +100,11 @@ async function handleEnter() {
|
||||||
searchHistory.value.push(to);
|
searchHistory.value.push(to);
|
||||||
handleClose();
|
handleClose();
|
||||||
await nextTick();
|
await nextTick();
|
||||||
router.push(to.path);
|
if (isHttpUrl(to.path)) {
|
||||||
|
window.open(to.path, '_blank');
|
||||||
|
} else {
|
||||||
|
router.push({ path: to.path, replace: true });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1002,6 +1002,9 @@ importers:
|
||||||
'@vben-core/shadcn-ui':
|
'@vben-core/shadcn-ui':
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:../../@core/ui-kit/shadcn-ui
|
version: link:../../@core/ui-kit/shadcn-ui
|
||||||
|
'@vben-core/shared':
|
||||||
|
specifier: workspace:*
|
||||||
|
version: link:../../@core/base/shared
|
||||||
'@vben-core/tabs-ui':
|
'@vben-core/tabs-ui':
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:../../@core/ui-kit/tabs-ui
|
version: link:../../@core/ui-kit/tabs-ui
|
||||||
|
|
Loading…
Reference in New Issue