feat(other): The menu supports jumping to external links and fixing some known problems
This commit is contained in:
@@ -3,7 +3,9 @@ import type { MenuRecordRaw } from '@vben-core/typings';
|
||||
|
||||
import { Menu, MenuProps } from '@vben-core/menu-ui';
|
||||
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
import { useNavigation } from './use-navigation';
|
||||
|
||||
interface Props extends MenuProps {
|
||||
collspae?: boolean;
|
||||
@@ -13,10 +15,10 @@ interface Props extends MenuProps {
|
||||
defineProps<Props>();
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const { navigation } = useNavigation();
|
||||
|
||||
function handleSelect(key: string) {
|
||||
router.push(key);
|
||||
async function handleSelect(key: string) {
|
||||
await navigation(key);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
Reference in New Issue
Block a user