fix(types): 修复naive组件回调函数参数类型错误
This commit is contained in:
parent
9af8988584
commit
667282f81a
780
pnpm-lock.yaml
780
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
@ -36,7 +36,8 @@ const options = [
|
||||
}
|
||||
];
|
||||
|
||||
function handleDropdown(key: DropdownKey) {
|
||||
function handleDropdown(optionKey: string) {
|
||||
const key = optionKey as DropdownKey;
|
||||
if (key === 'logout') {
|
||||
resetAuthState();
|
||||
}
|
||||
|
@ -13,6 +13,7 @@
|
||||
import { computed } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { NMenu } from 'naive-ui';
|
||||
import type { MenuOption } from 'naive-ui';
|
||||
import { useThemeStore, useAppStore } from '@/store';
|
||||
import { menus } from '@/router';
|
||||
import { GlobalMenuOption } from '@/interface';
|
||||
@ -28,7 +29,8 @@ function getActiveKey() {
|
||||
return route.name as string;
|
||||
}
|
||||
|
||||
function handleUpdateMenu(key: string, menuItem: GlobalMenuOption) {
|
||||
function handleUpdateMenu(key: string, item: MenuOption) {
|
||||
const menuItem = item as GlobalMenuOption;
|
||||
router.push(menuItem.routePath);
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user