From d59f518f466274b2caeb2e01c10c92deafe7c93b Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 09 二月 2022 11:48:29 +0800 Subject: [PATCH] 2022-02-09 --- src/components/header/index.jsx | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/components/header/index.jsx b/src/components/header/index.jsx index 952e442..dca77b8 100644 --- a/src/components/header/index.jsx +++ b/src/components/header/index.jsx @@ -4,7 +4,8 @@ import {connect} from 'react-redux' import { is, fromJS } from 'immutable' import moment from 'moment' -import { Dropdown, Menu, Icon, Modal, Form, notification, Switch, Input } from 'antd' +import { Dropdown, Menu, Modal, Form, notification, Switch, Input } from 'antd' +import { SearchOutlined, DownOutlined, MenuFoldOutlined, MenuUnfoldOutlined } from '@ant-design/icons' import { toggleCollapse, @@ -406,6 +407,12 @@ sessionStorage.setItem('dataM', res.dataM ? 'true' : '') sessionStorage.setItem('isEditState', 'true') + if (param.remember) { + let _url = window.location.href.split('#')[0] + 'cloud' + + localStorage.setItem(_url, window.btoa(window.encodeURIComponent(JSON.stringify({time: new Date().getTime(), username: param.username, password: param.password})))) + } + this.setSystemFuncs() this.props.modifyMainMenu(null) this.props.history.replace('/design') @@ -695,7 +702,7 @@ <header className="header-container ant-menu-dark" id="main-header-container"> <div className={'header-logo ' + (collapse && navBar !== 'topmenu' ? 'collapse' : '')}><img src={this.state.logourl} alt=""/></div> <div className={'header-collapse ' + (collapse && navBar !== 'topmenu' ? 'collapse' : '')}> - {navBar !== 'topmenu' ? <Icon type={collapse ? 'menu-unfold' : 'menu-fold'} onClick={this.handleCollapse}/> : null} + {navBar !== 'topmenu' ? (collapse ? <MenuUnfoldOutlined onClick={this.handleCollapse}/> : <MenuFoldOutlined onClick={this.handleCollapse}/>) : null} </div> {/* 姝e父鑿滃崟 */} {navBar !== 'topmenu' && menulist ? @@ -795,7 +802,7 @@ <div> <img src={this.state.avatar || avatar} alt=""/> <span> - <span className="username">{this.state.userName}</span> <Icon type="down" /> + <span className="username">{this.state.userName}</span> <DownOutlined /> </span> </div> </Dropdown> @@ -832,7 +839,7 @@ </div> </div> } trigger={['click']} className="search-menu" placement="bottomRight" onVisibleChange={this.dropdownMenuChange}> - <Icon className="search-menu" type="search" /> + <SearchOutlined className="search-menu" /> </Dropdown> : null } {/* 淇敼瀵嗙爜 */} -- Gitblit v1.8.0