mirror of
https://github.com/zuiidea/antd-admin
synced 2026-10-30 13:23:49 +00:00
update some texts and configs
This commit is contained in:
@@ -17,19 +17,24 @@ const Bread = ({ location, menu }) => {
|
||||
}
|
||||
}
|
||||
|
||||
if (!current) {
|
||||
return (<div className={styles.bread}>首页</div>)
|
||||
}
|
||||
|
||||
// 递归查找父级
|
||||
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 = (
|
||||
<span>{item.icon
|
||||
|
||||
@@ -40,7 +40,7 @@ function Header ({ user, logout, switchSider, siderFold, isNavbar, menuPopoverVi
|
||||
{user.username} < /span>}
|
||||
>
|
||||
<Menu.Item key="logout">
|
||||
<a>注销</a>
|
||||
Sign out
|
||||
</Menu.Item>
|
||||
</SubMenu>
|
||||
</Menu>
|
||||
|
||||
@@ -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))
|
||||
}
|
||||
|
||||
@@ -22,8 +22,8 @@ function Sider ({ siderFold, darkTheme, location, changeTheme, navOpenKeys, chan
|
||||
</div>
|
||||
<Menus {...menusProps} />
|
||||
{!siderFold ? <div className={styles.switchtheme}>
|
||||
<span><Icon type="bulb" />切换主题</span>
|
||||
<Switch onChange={changeTheme} defaultChecked={darkTheme} checkedChildren="黑" unCheckedChildren="白" />
|
||||
<span><Icon type="bulb" />Switch Theme</span>
|
||||
<Switch onChange={changeTheme} defaultChecked={darkTheme} checkedChildren="Dark" unCheckedChildren="Light" />
|
||||
</div> : ''}
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -38,28 +38,26 @@ const Login = ({
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: '请填写用户名',
|
||||
},
|
||||
],
|
||||
})(<Input size="large" onPressEnter={handleOk} placeholder="用户名" />)}
|
||||
})(<Input size="large" onPressEnter={handleOk} placeholder="Username" />)}
|
||||
</FormItem>
|
||||
<FormItem hasFeedback>
|
||||
{getFieldDecorator('password', {
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: '请填写密码',
|
||||
},
|
||||
],
|
||||
})(<Input size="large" type="password" onPressEnter={handleOk} placeholder="密码" />)}
|
||||
})(<Input size="large" type="password" onPressEnter={handleOk} placeholder="Password" />)}
|
||||
</FormItem>
|
||||
<Row>
|
||||
<Button type="primary" size="large" onClick={handleOk} loading={loginLoading}>
|
||||
登录
|
||||
Sign in
|
||||
</Button>
|
||||
<p>
|
||||
<span>账号:guest</span>
|
||||
<span>密码:guest</span>
|
||||
<span>Username:guest</span>
|
||||
<span>Password:guest</span>
|
||||
</p>
|
||||
</Row>
|
||||
|
||||
|
||||
@@ -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) => <Link to={`users/${record.id}`}>{text}</Link>,
|
||||
}, {
|
||||
title: '昵称',
|
||||
dataIndex: 'nickName',
|
||||
|
||||
+1
-1
@@ -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',
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user