style migrate v3

pull/289/head
vapao 2020-11-27 16:20:05 +08:00
parent dbee03069e
commit ead0364f46
2 changed files with 21 additions and 27 deletions

View File

@ -5,6 +5,7 @@
*/
import React from 'react';
import { Menu } from 'antd';
import { Breadcrumb } from 'components';
import Basic from './Basic';
import Reset from './Reset';
import styles from './index.module.css';
@ -20,20 +21,26 @@ class Index extends React.Component {
render() {
const {selectedKeys} = this.state;
return (
<div className={styles.container}>
<div className={styles.left}>
<Menu
mode="inline"
selectedKeys={selectedKeys}
style={{border: 'none'}}
onSelect={({selectedKeys}) => this.setState({selectedKeys})}>
<Menu.Item key="basic">基本设置</Menu.Item>
<Menu.Item key="reset">修改密码</Menu.Item>
</Menu>
</div>
<div className={styles.right}>
{selectedKeys[0] === 'basic' && <Basic />}
{selectedKeys[0] === 'reset' && <Reset />}
<div>
<Breadcrumb>
<Breadcrumb.Item>首页</Breadcrumb.Item>
<Breadcrumb.Item>个人中心</Breadcrumb.Item>
</Breadcrumb>
<div className={styles.container}>
<div className={styles.left}>
<Menu
mode="inline"
selectedKeys={selectedKeys}
style={{border: 'none'}}
onSelect={({selectedKeys}) => this.setState({selectedKeys})}>
<Menu.Item key="basic">基本设置</Menu.Item>
<Menu.Item key="reset">修改密码</Menu.Item>
</Menu>
</div>
<div className={styles.right}>
{selectedKeys[0] === 'basic' && <Basic/>}
{selectedKeys[0] === 'reset' && <Reset/>}
</div>
</div>
</div>
)

View File

@ -1,13 +0,0 @@
/**
* Copyright (c) OpenSpug Organization. https://github.com/openspug/spug
* Copyright (c) <spug.dev@gmail.com>
* Released under the AGPL-3.0 License.
*/
import { makeRoute } from 'libs/router';
import Index from './index';
import Info from './info';
export default [
makeRoute('/index', Index),
makeRoute('/info', Info),
]