feat(other): The menu supports jumping to external links and fixing some known problems

This commit is contained in:
vben
2024-05-21 21:45:48 +08:00
parent 399334ac57
commit c31d21be50
43 changed files with 505 additions and 243 deletions

View File

@@ -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>