diff --git a/src/components/Layout/Bread.js b/src/components/Layout/Bread.js
index 43003a7..4e25869 100644
--- a/src/components/Layout/Bread.js
+++ b/src/components/Layout/Bread.js
@@ -17,19 +17,24 @@ const Bread = ({ location, menu }) => {
}
}
- if (!current) {
- return (
首页
)
- }
-
- // 递归查找父级
const getPathArray = (item) => {
pathArray.unshift(item)
if (item.bpid) {
getPathArray(queryArray(menu, item.bpid, 'id'))
}
}
- getPathArray(current)
+ if (!current) {
+ pathArray.push(menu[0])
+ pathArray.push({
+ id: 404,
+ name: 'Not Found',
+ })
+ } else {
+ getPathArray(current)
+ }
+
+ // 递归查找父级
const breads = pathArray.map((item, key) => {
const content = (
{item.icon
diff --git a/src/components/Layout/Header.js b/src/components/Layout/Header.js
index 97ef337..a6c2549 100644
--- a/src/components/Layout/Header.js
+++ b/src/components/Layout/Header.js
@@ -40,7 +40,7 @@ function Header ({ user, logout, switchSider, siderFold, isNavbar, menuPopoverVi
{user.username} < /span>}
>
- 注销
+ Sign out
diff --git a/src/components/Layout/Menu.js b/src/components/Layout/Menu.js
index 58c3d44..18076a3 100644
--- a/src/components/Layout/Menu.js
+++ b/src/components/Layout/Menu.js
@@ -90,7 +90,7 @@ const Menus = ({ siderFold, darkTheme, location, handleClickNavMenu, navOpenKeys
const getPathArray = (array, current, pid, id) => {
let result = [String(current[id])]
const getPath = (item) => {
- if (item[pid]) {
+ if (item && item[pid]) {
result.unshift(String(item[pid]))
getPath(queryArray(array, item[pid], id))
}
diff --git a/src/components/Layout/Sider.js b/src/components/Layout/Sider.js
index 3184d40..96e5b33 100644
--- a/src/components/Layout/Sider.js
+++ b/src/components/Layout/Sider.js
@@ -22,8 +22,8 @@ function Sider ({ siderFold, darkTheme, location, changeTheme, navOpenKeys, chan
{!siderFold ?
- 切换主题
-
+ Switch Theme
+
: ''}
)
diff --git a/src/routes/login/index.js b/src/routes/login/index.js
index ee5e98f..546ada2 100644
--- a/src/routes/login/index.js
+++ b/src/routes/login/index.js
@@ -38,28 +38,26 @@ const Login = ({
rules: [
{
required: true,
- message: '请填写用户名',
},
],
- })()}
+ })()}
{getFieldDecorator('password', {
rules: [
{
required: true,
- message: '请填写密码',
},
],
- })()}
+ })()}
- 账号:guest
- 密码:guest
+ Username:guest
+ Password:guest
diff --git a/src/routes/users/UserList.js b/src/routes/users/UserList.js
index c2913ab..19983b6 100644
--- a/src/routes/users/UserList.js
+++ b/src/routes/users/UserList.js
@@ -5,7 +5,7 @@ import styles from './UserList.less'
import classnames from 'classnames'
import AnimTableBody from '../../components/DataTable/AnimTableBody'
import { DropOption } from '../../components'
-
+import { Link } from 'dva/router'
const confirm = Modal.confirm
@@ -35,6 +35,7 @@ function list ({ loading, dataSource, pagination, onPageChange, onDeleteItem, on
title: '姓名',
dataIndex: 'name',
key: 'name',
+ render: (text, record) => {text},
}, {
title: '昵称',
dataIndex: 'nickName',
diff --git a/src/routes/users/detail/index.js b/src/routes/users/detail/index.js
new file mode 100644
index 0000000..e69de29
diff --git a/src/utils/config.js b/src/utils/config.js
index b628707..e9eb85c 100644
--- a/src/utils/config.js
+++ b/src/utils/config.js
@@ -1,7 +1,7 @@
module.exports = {
name: 'AntD Admin',
prefix: 'antdAdmin',
- footerText: 'Ant Design Admin 版权所有 © 2016 由 zuiidea 支持',
+ footerText: 'Ant Design Admin © 2017 zuiidea',
logo: 'https://t.alipayobjects.com/images/T1QUBfXo4fXXXXXXXX.png',
iconFontUrl: '//at.alicdn.com/t/font_c4y7asse3q1cq5mi.js',
baseURL: 'http://localhost:8000/api/v1',
diff --git a/src/utils/menu.js b/src/utils/menu.js
index e25cfac..ebfbe95 100644
--- a/src/utils/menu.js
+++ b/src/utils/menu.js
@@ -12,6 +12,13 @@ module.exports = [
icon: 'user',
router: '/users',
},
+ {
+ id: 21,
+ mpid: -1,
+ bpid: 2,
+ name: 'User Detail',
+ router: '/users/:id',
+ },
{
id: 3,
bpid: 1,