diff --git a/SearchList/.gitignore b/SearchList/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..8ce76bc425533aa85835a516e25a0d7218a6e15b
--- /dev/null
+++ b/SearchList/.gitignore
@@ -0,0 +1,7 @@
+/yarn.lock
+/package-lock.json
+/dist
+/node_modules
+
+.umi
+.umi-production
diff --git a/SearchList/README.md b/SearchList/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..e94db35282afe8382d096264358bdcebf70fa2e4
--- /dev/null
+++ b/SearchList/README.md
@@ -0,0 +1,13 @@
+# @umi-blocks/ant-design-pro/searchlist
+
+SearchList
+
+## Usage
+
+```sh
+umi block add ant-design-pro/searchlist
+```
+
+## LICENSE
+
+MIT
diff --git a/SearchList/package.json b/SearchList/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..e4ce46c18b96d11a7b911d617eb16c38f9acebfd
--- /dev/null
+++ b/SearchList/package.json
@@ -0,0 +1,33 @@
+{
+ "name": "@umi-block/search-list",
+ "version": "0.0.1",
+ "description": "SearchListApplications",
+ "main": "src/index.js",
+ "scripts": {
+ "dev": "umi dev"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/umijs/umi-blocks/ant-design-pro/searchlistapplications"
+ },
+ "dependencies": {
+ "antd": "^3.16.3",
+ "classnames": "^2.2.6",
+ "dva": "^2.4.0",
+ "hash.js": "^1.1.5",
+ "moment": "^2.22.2",
+ "numeral": "^2.0.6",
+ "nzh": "^1.0.3",
+ "react": "^16.6.3",
+ "umi-request": "^1.0.0"
+ },
+ "devDependencies": {
+ "umi": "^2.6.9",
+ "umi-plugin-react": "^1.7.2",
+ "umi-plugin-block-dev": "^1.0.0"
+ },
+ "license": "ISC",
+ "blockConfig": {
+ "specVersion": "0.1"
+ }
+}
diff --git a/SearchList/src/components/PageHeaderWrapper/index.less b/SearchList/src/components/PageHeaderWrapper/index.less
new file mode 100644
index 0000000000000000000000000000000000000000..908db575ae9f0a0cd75d04952ba4f37b3002da42
--- /dev/null
+++ b/SearchList/src/components/PageHeaderWrapper/index.less
@@ -0,0 +1,86 @@
+@import '~antd/lib/style/themes/default.less';
+
+.children-content {
+ margin: 24px 24px 0;
+}
+
+.main {
+ .detail {
+ display: flex;
+ }
+
+ .row {
+ display: flex;
+ width: 100%;
+ }
+
+ .title-content {
+ margin-bottom: 16px;
+ }
+
+ @media screen and (max-width: @screen-sm) {
+ .content {
+ margin: 24px 0 0;
+ }
+ }
+
+ .title,
+ .content {
+ flex: auto;
+ }
+
+ .extraContent,
+ .main {
+ flex: 0 1 auto;
+ }
+
+ .main {
+ width: 100%;
+ }
+
+ .title {
+ margin-bottom: 16px;
+ }
+
+ .logo,
+ .content,
+ .extraContent {
+ margin-bottom: 16px;
+ }
+
+ .extraContent {
+ min-width: 242px;
+ margin-left: 88px;
+ text-align: right;
+ }
+}
+
+@media screen and (max-width: @screen-xl) {
+ .extraContent {
+ margin-left: 44px;
+ }
+}
+
+@media screen and (max-width: @screen-lg) {
+ .extraContent {
+ margin-left: 20px;
+ }
+}
+
+@media screen and (max-width: @screen-md) {
+ .row {
+ display: block;
+ }
+
+ .action,
+ .extraContent {
+ margin-left: 0;
+ text-align: left;
+ }
+}
+
+@media screen and (max-width: @screen-sm) {
+ .detail {
+ display: block;
+ }
+}
diff --git a/SearchList/src/components/PageHeaderWrapper/index.tsx b/SearchList/src/components/PageHeaderWrapper/index.tsx
new file mode 100644
index 0000000000000000000000000000000000000000..6ed06a5550cf1e7065ceaaa5af019583b02e0ec0
--- /dev/null
+++ b/SearchList/src/components/PageHeaderWrapper/index.tsx
@@ -0,0 +1,96 @@
+import React from 'react';
+import { RouteContext } from '@ant-design/pro-layout';
+import { PageHeader, Tabs, Typography } from 'antd';
+import styles from './index.less';
+import { GridContent } from '@ant-design/pro-layout';
+import { TabsProps } from 'antd/lib/tabs';
+interface IPageHeaderTabConfig {
+ tabList?: Array<{
+ key: string;
+ tab: string;
+ }>;
+ tabActiveKey?: TabsProps['activeKey'];
+ onTabChange?: TabsProps['onChange'];
+ tabBarExtraContent?: TabsProps['tabBarExtraContent'];
+}
+
+interface IPageHeaderWrapperProps extends IPageHeaderTabConfig {
+ content?: React.ReactNode;
+ title: React.ReactNode;
+ extraContent?: React.ReactNode;
+}
+
+/**
+ * render Footer tabList
+ * In order to be compatible with the old version of the PageHeader
+ * basically all the functions are implemented.
+ */
+const renderFooter = ({
+ tabList,
+ tabActiveKey,
+ onTabChange,
+ tabBarExtraContent,
+}: IPageHeaderTabConfig) => {
+ return tabList && tabList.length ? (
+ {
+ if (onTabChange) {
+ onTabChange(key);
+ }
+ }}
+ tabBarExtraContent={tabBarExtraContent}
+ >
+ {tabList.map(item => (
+
+ ))}
+
+ ) : null;
+};
+
+const PageHeaderWrapper: React.SFC = ({
+ children,
+ title,
+ content,
+ extraContent,
+ ...restProps
+}) => (
+
+ {value => (
+
+
+ {title}
+
+ }
+ {...restProps}
+ {...value}
+ footer={renderFooter(restProps)}
+ >
+
+
+
+ {content &&
{content}
}
+ {extraContent &&
{extraContent}
}
+
+
+
+
+ {children ? (
+
+ {children}
+
+ ) : null}
+
+ )}
+
+);
+
+export default PageHeaderWrapper;
diff --git a/SearchList/src/index.tsx b/SearchList/src/index.tsx
new file mode 100644
index 0000000000000000000000000000000000000000..ac769bf527ca90940349deae7a1ccb38e9c667b1
--- /dev/null
+++ b/SearchList/src/index.tsx
@@ -0,0 +1,96 @@
+import React, { Component } from 'react';
+import router from 'umi/router';
+import { connect } from 'dva';
+import { Input } from 'antd';
+import PageHeaderWrapper from './components/PageHeaderWrapper';
+
+interface PAGE_NAME_UPPER_CAMEL_CASEProps {
+ match: {
+ url: string;
+ path: string;
+ };
+ location: {
+ pathname: string;
+ };
+}
+
+@connect()
+class PAGE_NAME_UPPER_CAMEL_CASE extends Component {
+ handleTabChange = (key: string) => {
+ const { match } = this.props;
+ const url = match.url === '/' ? '' : match.url;
+ switch (key) {
+ case 'articles':
+ router.push(`${url}/articles`);
+ break;
+ case 'applications':
+ router.push(`${url}/applications`);
+ break;
+ case 'projects':
+ router.push(`${url}/projects`);
+ break;
+ default:
+ break;
+ }
+ };
+
+ handleFormSubmit = (value: string) => {
+ // tslint:disable-next-line: no-console
+ console.log(value);
+ };
+
+ getTabKey = () => {
+ const { match, location } = this.props;
+ const url = match.path === '/' ? '' : match.path;
+ const tabKey = location.pathname.replace(`${url}/`, '');
+ if (tabKey && tabKey !== '/') {
+ return tabKey;
+ }
+ return 'articles';
+ };
+
+ render() {
+ const tabList = [
+ {
+ key: 'articles',
+ tab: '文章',
+ },
+ {
+ key: 'projects',
+ tab: '项目',
+ },
+ {
+ key: 'applications',
+ tab: '应用',
+ },
+ ];
+
+ const mainSearch = (
+
+
+
+ );
+
+ const { children } = this.props;
+
+ return (
+
+ {children}
+
+ );
+ }
+}
+
+export default PAGE_NAME_UPPER_CAMEL_CASE;
diff --git a/SearchList/src/utils/utils.less b/SearchList/src/utils/utils.less
new file mode 100644
index 0000000000000000000000000000000000000000..de1aa64222b6f14328d3a9e3c262ac5a31cce5af
--- /dev/null
+++ b/SearchList/src/utils/utils.less
@@ -0,0 +1,50 @@
+.textOverflow() {
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ word-break: break-all;
+}
+
+.textOverflowMulti(@line: 3, @bg: #fff) {
+ position: relative;
+ max-height: @line * 1.5em;
+ margin-right: -1em;
+ padding-right: 1em;
+ overflow: hidden;
+ line-height: 1.5em;
+ text-align: justify;
+ &::before {
+ position: absolute;
+ right: 14px;
+ bottom: 0;
+ padding: 0 1px;
+ background: @bg;
+ content: '...';
+ }
+ &::after {
+ position: absolute;
+ right: 14px;
+ width: 1em;
+ height: 1em;
+ margin-top: 0.2em;
+ background: white;
+ content: '';
+ }
+}
+
+// mixins for clearfix
+// ------------------------
+.clearfix() {
+ zoom: 1;
+ &::before,
+ &::after {
+ display: table;
+ content: ' ';
+ }
+ &::after {
+ clear: both;
+ height: 0;
+ font-size: 0;
+ visibility: hidden;
+ }
+}
diff --git a/SearchListApplications/src/index.tsx b/SearchListApplications/src/index.tsx
index 30ffa88d75aeb613dd689fb52415db7654cd5132..7e5183b7adfbb85d6b1f5e4b86fbb3aaeffb67d2 100644
--- a/SearchListApplications/src/index.tsx
+++ b/SearchListApplications/src/index.tsx
@@ -17,7 +17,7 @@ export function formatWan(val: number) {
const v = val * 1;
if (!v || Number.isNaN(v)) return '';
- let result = val;
+ let result: React.ReactNode = val;
if (val > 10000) {
result = (
diff --git a/package.json b/package.json
index e75158396873a8fdb0d93665fb63f3cb9f64d0c9..dd32352da7fabf4afa5a5b1a6b694fbf120c432a 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"private": true,
"scripts": {
- "dev": "cross-env PAGES_PATH='Workplace/src' umi dev",
+ "dev": "cross-env PAGES_PATH='SearchList/src' umi dev",
"lint": "npm run lint:ts && npm run lint:style && npm run lint:prettier",
"lint-staged": "lint-staged",
"lint-staged:ts": "tslint",