diff --git a/web/hwlab-cloud-web/src/components/layout/AppNavigation.vue b/web/hwlab-cloud-web/src/components/layout/AppNavigation.vue index 8cea45bb..e4f10ede 100644 --- a/web/hwlab-cloud-web/src/components/layout/AppNavigation.vue +++ b/web/hwlab-cloud-web/src/components/layout/AppNavigation.vue @@ -24,7 +24,7 @@ import { ShieldCheck, Users } from "lucide-vue-next"; -import { computed, type Component } from "vue"; +import { computed, defineComponent, h, type Component, type PropType } from "vue"; import { useRoute, useRouter } from "vue-router"; import { useAppStore } from "@/stores/app"; import { useAuthStore } from "@/stores/auth"; @@ -38,6 +38,19 @@ const router = useRouter(); const app = useAppStore(); const auth = useAuthStore(); +const NavIcon = defineComponent({ + name: "NavIcon", + props: { + icon: { + type: [Object, Function] as PropType, + required: true, + }, + }, + setup(props) { + return () => h(props.icon, { size: 18 }); + }, +}); + interface NavItem { name: string; label: string; @@ -292,7 +305,7 @@ function isActive(item: NavItem): boolean { @click="go(item)" > {{ item.label }}