forgeplus-react/src/forge/Account/Index.jsx

38 lines
1010 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import React , { useState } from 'react';
import './index.scss';
import logo from './image/logo.png';
import { Menu } from 'antd';
import Bind from './bind';
import UnBind from './unbind';
function Index(props){
const [ key , setKey ] = useState("0");
// 选择menu
function chooseMenuFunc(e){
setKey(e.key)
}
return(
<div className={"bodies"}>
<div className="logo">
<img src={logo} alt="" height="48px" />
</div>
<div className={"content"}>
<p>关联账号</p>
<div className="panels">
<Menu selectedKeys={[key]} mode={`horizontal`} className="panelsMenu" onClick={chooseMenuFunc}>
<Menu.Item key="0">已有账号进行绑定</Menu.Item>
<Menu.Item key="1">无账号注册并绑定</Menu.Item>
</Menu>
{
key === "0" ?
<Bind {...props}/>
:
<UnBind {...props}/>
}
</div>
</div>
</div>
)
}
export default Index;