-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add zh_CN
- Loading branch information
Showing
8 changed files
with
47 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,27 +2,7 @@ | |
# Umi Antd Pro | ||
所有的组件和页面逻辑保留 Ant Design Pro的设计。 | ||
|
||
## 增加 | ||
- dva.js onError 和 initialState | ||
- 增加配置服务器地址,支持build之后可预览 | ||
- 增加[antd-pro-server](https://github.com/xiaohuoni/antd-pro-server),主要修改.umirc.mock.js | ||
20180517 | ||
- 去除手动重定向路由,加入umi配置路由pages/_route.json | ||
20180518 更新[email protected] | ||
- 去掉NO_PROXY,[email protected] 已内置关闭MOCK=none | ||
- 更新React 16.3.0,修改componentWillReceiveProps为UNSAFE_componentWillReceiveProps | ||
- 增加插件umi-plugin-dll,二次编译速度提升70% | ||
|
||
如果出现[umi/#495](https://github.com/umijs/umi/issues/495)问题,可以先注释掉.umirc.js里 | ||
```js | ||
[ | ||
"umi-plugin-dll", | ||
{ | ||
exclude: [], | ||
include: ["dva", "dva/router", "dva/saga", "dva/fetch", "antd/es"] | ||
} | ||
] | ||
``` | ||
# 更新日志请查看 [releases](https://github.com/xiaohuoni/umi-antd-pro/releases) | ||
|
||
# Ant Design Pro | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
import BasicLayout from './BasicLayout'; | ||
import BasicLayout from "./BasicLayout"; | ||
import { config } from "utils"; | ||
import { getRouterData } from 'common/router'; | ||
const { openPages } = config; | ||
export default (props) => { | ||
const { children ,location} = props; | ||
import { getRouterData } from "common/router"; | ||
import { LocaleProvider } from "antd"; | ||
import zh_CN from "antd/lib/locale-provider/zh_CN"; | ||
import "moment/locale/zh-cn"; | ||
|
||
const { openPages } = config; | ||
export default props => { | ||
const { children, location } = props; | ||
const routerData = getRouterData({}); | ||
const newProps = { | ||
...props, | ||
routerData:routerData | ||
} | ||
routerData: routerData | ||
}; | ||
let { pathname } = location; | ||
pathname = pathname.startsWith("/") ? pathname : `/${pathname}`; | ||
if (openPages && openPages.includes(pathname)) { | ||
return ( | ||
<div style={{height:'100%'}}> | ||
{children} | ||
</div> | ||
); | ||
return <div style={{ height: "100%" }}>{children}</div>; | ||
} | ||
return (<BasicLayout {...newProps}/> | ||
return ( | ||
<LocaleProvider locale={zh_CN}> | ||
<BasicLayout {...newProps} /> | ||
</LocaleProvider> | ||
); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters