Explorar o código

fix(webpack config): compile fail (#8554)

* fix(webpack config): compile fail

* fix(webpack config): compile fail

Co-authored-by: dingtianxiu.dtx <dingtianxiu.dtx@antfin.com>
js library %!s(int64=4) %!d(string=hai) anos
pai
achega
2955657095
Modificáronse 3 ficheiros con 2 adicións e 7 borrados
  1. 0 1
      config/config.dev.ts
  2. 1 0
      config/config.ts
  3. 1 6
      src/components/GlobalHeader/AvatarDropdown.tsx

+ 0 - 1
config/config.dev.ts

@@ -12,5 +12,4 @@ export default defineConfig({
     babelPlugins: [],
     babelOptions: {},
   },
-  webpack5: {},
 });

+ 1 - 0
config/config.ts

@@ -43,4 +43,5 @@ export default defineConfig({
   // 快速刷新功能 https://umijs.org/config#fastrefresh
   fastRefresh: {},
   esbuild: {},
+  webpack5: {},
 });

+ 1 - 6
src/components/GlobalHeader/AvatarDropdown.tsx

@@ -14,12 +14,7 @@ export type GlobalHeaderRightProps = {
 } & Partial<ConnectProps>;
 
 class AvatarDropdown extends React.Component<GlobalHeaderRightProps> {
-  onMenuClick = (event: {
-    key: React.Key;
-    keyPath: React.Key[];
-    item: React.ReactInstance;
-    domEvent: React.MouseEvent<HTMLElement>;
-  }) => {
+  onMenuClick = (event: { key: React.Key; keyPath: React.Key[]; item: React.ReactInstance }) => {
     const { key } = event;
 
     if (key === 'logout') {