mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-26 16:46:19 +08:00
fix: type Component
is not assignable to RouteMeta
(#4140)
* fix: type `Component` is not assignable to `RouteMeta` * fix: ci fail
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { MenuRecordBadgeRaw, ThemeModeType } from '@vben-core/typings';
|
||||
|
||||
import type { Ref } from 'vue';
|
||||
import type { Component, Ref } from 'vue';
|
||||
|
||||
interface MenuProps {
|
||||
/**
|
||||
@@ -61,7 +61,7 @@ interface SubMenuProps extends MenuRecordBadgeRaw {
|
||||
/**
|
||||
* @zh_CN 图标
|
||||
*/
|
||||
icon?: string;
|
||||
icon?: Component | string;
|
||||
/**
|
||||
* @zh_CN submenu 名称
|
||||
*/
|
||||
@@ -80,7 +80,7 @@ interface MenuItemProps extends MenuRecordBadgeRaw {
|
||||
/**
|
||||
* @zh_CN 图标
|
||||
*/
|
||||
icon?: string;
|
||||
icon?: Component | string;
|
||||
/**
|
||||
* @zh_CN menuitem 名称
|
||||
*/
|
||||
@@ -93,10 +93,6 @@ interface MenuItemRegistered {
|
||||
path: string;
|
||||
}
|
||||
|
||||
// export interface MenuItemClicked {
|
||||
// name: string;
|
||||
// }
|
||||
|
||||
interface MenuItemClicked {
|
||||
parentPaths: string[];
|
||||
path: string;
|
||||
|
@@ -31,12 +31,6 @@ const hasChildren = computed(() => {
|
||||
Reflect.has(menu, 'children') && !!menu.children && menu.children.length > 0
|
||||
);
|
||||
});
|
||||
|
||||
// function menuIcon(menu: MenuRecordRaw) {
|
||||
// return props.activePath === menu.path
|
||||
// ? menu.activeIcon || menu.icon
|
||||
// : menu.icon;
|
||||
// }
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@@ -1,5 +1,7 @@
|
||||
import type { Component } from 'vue';
|
||||
|
||||
interface IBreadcrumb {
|
||||
icon?: string;
|
||||
icon?: Component | string;
|
||||
isHome?: boolean;
|
||||
items?: IBreadcrumb[];
|
||||
path?: string;
|
||||
|
Reference in New Issue
Block a user