Browse Source

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>
v4
js library 5 years ago
committed by GitHub
parent
commit
2955657095
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      config/config.dev.ts
  2. 1
      config/config.ts
  3. 7
      src/components/GlobalHeader/AvatarDropdown.tsx

1
config/config.dev.ts

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

1
config/config.ts

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

7
src/components/GlobalHeader/AvatarDropdown.tsx

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

Loading…
Cancel
Save