Commit da8e0bdf919f220c1a8df5f40d51e386a23174c0
Committed by
GitHub
1 parent
06236c9f
fix: type warning. (#1994)
Co-authored-by: 舒培培 <622292@ky-tech.com.cn>
Showing
1 changed file
with
3 additions
and
2 deletions
src/layouts/default/header/components/user-dropdown/index.vue
@@ -37,6 +37,7 @@ | @@ -37,6 +37,7 @@ | ||
37 | <script lang="ts"> | 37 | <script lang="ts"> |
38 | // components | 38 | // components |
39 | import { Dropdown, Menu } from 'ant-design-vue'; | 39 | import { Dropdown, Menu } from 'ant-design-vue'; |
40 | + import type { MenuInfo } from 'ant-design-vue/lib/menu/src/interface'; | ||
40 | 41 | ||
41 | import { defineComponent, computed } from 'vue'; | 42 | import { defineComponent, computed } from 'vue'; |
42 | 43 | ||
@@ -95,8 +96,8 @@ | @@ -95,8 +96,8 @@ | ||
95 | openWindow(DOC_URL); | 96 | openWindow(DOC_URL); |
96 | } | 97 | } |
97 | 98 | ||
98 | - function handleMenuClick(e: { key: MenuEvent }) { | ||
99 | - switch (e.key) { | 99 | + function handleMenuClick(e: MenuInfo) { |
100 | + switch (e.key as MenuEvent) { | ||
100 | case 'logout': | 101 | case 'logout': |
101 | handleLoginOut(); | 102 | handleLoginOut(); |
102 | break; | 103 | break; |