Commit da8e0bdf919f220c1a8df5f40d51e386a23174c0

Authored by cn.shperry
Committed by GitHub
1 parent 06236c9f

fix: type warning. (#1994)

Co-authored-by: 舒培培 <622292@ky-tech.com.cn>
src/layouts/default/header/components/user-dropdown/index.vue
... ... @@ -37,6 +37,7 @@
37 37 <script lang="ts">
38 38 // components
39 39 import { Dropdown, Menu } from 'ant-design-vue';
  40 + import type { MenuInfo } from 'ant-design-vue/lib/menu/src/interface';
40 41  
41 42 import { defineComponent, computed } from 'vue';
42 43  
... ... @@ -95,8 +96,8 @@
95 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 101 case 'logout':
101 102 handleLoginOut();
102 103 break;
... ...