From d995461664a96cc16f99855d1274fa08471f2525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Thu, 30 May 2019 13:51:34 +0800 Subject: [PATCH] remove unuse code --- src/layouts/BasicLayout.tsx | 10 +++++----- src/pages/Welcome.tsx | 4 ++-- src/typings.d.ts | 15 +++++++-------- typings.d.ts | 5 ----- 4 files changed, 14 insertions(+), 20 deletions(-) delete mode 100644 typings.d.ts diff --git a/src/layouts/BasicLayout.tsx b/src/layouts/BasicLayout.tsx index 33d94ff2..03d86f36 100644 --- a/src/layouts/BasicLayout.tsx +++ b/src/layouts/BasicLayout.tsx @@ -12,13 +12,13 @@ import logo from '../assets/logo.svg'; import Authorized from '@/utils/Authorized'; import { formatMessage } from 'umi-plugin-react/locale'; import { - BasicLayout as BasicLayoutComponents, - BasicLayoutProps as BasicLayoutComponentsProps, + BasicLayout as ProLayoutComponents, + BasicLayoutProps as ProLayoutComponentsProps, MenuDataItem, Settings, } from '@ant-design/pro-layout'; import Link from 'umi/link'; -export interface BasicLayoutProps extends BasicLayoutComponentsProps, ConnectProps { +export interface BasicLayoutProps extends ProLayoutComponentsProps, ConnectProps { breadcrumbNameMap: { [path: string]: MenuDataItem; }; @@ -68,7 +68,7 @@ const BasicLayout: React.FC = props => { }); return ( - { @@ -93,7 +93,7 @@ const BasicLayout: React.FC = props => { {...settings} > {children} - + ); }; diff --git a/src/pages/Welcome.tsx b/src/pages/Welcome.tsx index 1f78bed0..cad44f13 100644 --- a/src/pages/Welcome.tsx +++ b/src/pages/Welcome.tsx @@ -2,9 +2,9 @@ import React from 'react'; export default () => (

- 想要添加更多页面?请参考{' '} + Want to add more pages? Please refer to{' '} - umi 区块 + umi block

diff --git a/src/typings.d.ts b/src/typings.d.ts index ae32dca5..d32d9d23 100644 --- a/src/typings.d.ts +++ b/src/typings.d.ts @@ -1,3 +1,7 @@ +declare module 'slash2'; +declare module 'antd-pro-merge-less'; +declare module 'antd-theme-webpack-plugin'; + declare module '*.css'; declare module '*.less'; declare module '*.scss'; @@ -15,12 +19,7 @@ declare module 'react-copy-to-clipboard'; declare module 'react-fittext'; declare module '@antv/data-set'; declare module 'nzh/cn'; -declare var APP_TYPE: string; -declare module 'memoize-one' { - function memoizeOne any>( - resultFn: T, - isEqual?: (a: any, b: any, index: number) => boolean, - ): T; - export default memoizeOne; -} +// preview.pro.ant.design only do not use in your production ; +// preview.pro.ant.design 专用环境变量,请不要在你的项目中使用它。 +declare let ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: 'site' | undefined; diff --git a/typings.d.ts b/typings.d.ts deleted file mode 100644 index d8a1fecb..00000000 --- a/typings.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare module 'slash2'; -declare module 'antd-pro-merge-less'; -declare module 'antd-theme-webpack-plugin'; - -declare let ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: 'site' | undefined; -- GitLab