提交 33784cb3 编写于 作者: J jinlong12

新增侧边栏菜单

上级 36234ca1
......@@ -7851,8 +7851,8 @@
"dev": true,
"optional": true,
"requires": {
"delegates": "1.0.0",
"readable-stream": "2.3.6"
"delegates": "^1.0.0",
"readable-stream": "^2.0.6"
}
},
"balanced-match": {
......@@ -7867,7 +7867,7 @@
"dev": true,
"optional": true,
"requires": {
"balanced-match": "1.0.0",
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
......@@ -7934,7 +7934,7 @@
"dev": true,
"optional": true,
"requires": {
"minipass": "2.2.4"
"minipass": "^2.2.1"
}
},
"fs.realpath": {
......@@ -7949,14 +7949,14 @@
"dev": true,
"optional": true,
"requires": {
"aproba": "1.2.0",
"console-control-strings": "1.1.0",
"has-unicode": "2.0.1",
"object-assign": "4.1.1",
"signal-exit": "3.0.2",
"string-width": "1.0.2",
"strip-ansi": "3.0.1",
"wide-align": "1.1.2"
"aproba": "^1.0.3",
"console-control-strings": "^1.0.0",
"has-unicode": "^2.0.0",
"object-assign": "^4.1.0",
"signal-exit": "^3.0.0",
"string-width": "^1.0.1",
"strip-ansi": "^3.0.1",
"wide-align": "^1.1.0"
}
},
"glob": {
......@@ -7965,12 +7965,12 @@
"dev": true,
"optional": true,
"requires": {
"fs.realpath": "1.0.0",
"inflight": "1.0.6",
"inherits": "2.0.3",
"minimatch": "3.0.4",
"once": "1.4.0",
"path-is-absolute": "1.0.1"
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"has-unicode": {
......@@ -7985,7 +7985,7 @@
"dev": true,
"optional": true,
"requires": {
"safer-buffer": "2.1.2"
"safer-buffer": "^2.1.0"
}
},
"ignore-walk": {
......@@ -7994,7 +7994,7 @@
"dev": true,
"optional": true,
"requires": {
"minimatch": "3.0.4"
"minimatch": "^3.0.4"
}
},
"inflight": {
......@@ -8003,8 +8003,8 @@
"dev": true,
"optional": true,
"requires": {
"once": "1.4.0",
"wrappy": "1.0.2"
"once": "^1.3.0",
"wrappy": "1"
}
},
"inherits": {
......@@ -8025,7 +8025,7 @@
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "1.0.1"
"number-is-nan": "^1.0.0"
}
},
"isarray": {
......@@ -8040,7 +8040,7 @@
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "1.1.11"
"brace-expansion": "^1.1.7"
}
},
"minimist": {
......@@ -8055,8 +8055,8 @@
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "5.1.1",
"yallist": "3.0.2"
"safe-buffer": "^5.1.1",
"yallist": "^3.0.0"
}
},
"minizlib": {
......@@ -8065,7 +8065,7 @@
"dev": true,
"optional": true,
"requires": {
"minipass": "2.2.4"
"minipass": "^2.2.1"
}
},
"mkdirp": {
......@@ -8089,9 +8089,9 @@
"dev": true,
"optional": true,
"requires": {
"debug": "2.6.9",
"iconv-lite": "0.4.21",
"sax": "1.2.4"
"debug": "^2.1.2",
"iconv-lite": "^0.4.4",
"sax": "^1.2.4"
}
},
"node-pre-gyp": {
......@@ -8100,16 +8100,16 @@
"dev": true,
"optional": true,
"requires": {
"detect-libc": "1.0.3",
"mkdirp": "0.5.1",
"needle": "2.2.0",
"nopt": "4.0.1",
"npm-packlist": "1.1.10",
"npmlog": "4.1.2",
"rc": "1.2.7",
"rimraf": "2.6.2",
"semver": "5.5.0",
"tar": "4.4.1"
"detect-libc": "^1.0.2",
"mkdirp": "^0.5.1",
"needle": "^2.2.0",
"nopt": "^4.0.1",
"npm-packlist": "^1.1.6",
"npmlog": "^4.0.2",
"rc": "^1.1.7",
"rimraf": "^2.6.1",
"semver": "^5.3.0",
"tar": "^4"
}
},
"nopt": {
......@@ -8118,8 +8118,8 @@
"dev": true,
"optional": true,
"requires": {
"abbrev": "1.1.1",
"osenv": "0.1.5"
"abbrev": "1",
"osenv": "^0.1.4"
}
},
"npm-bundled": {
......@@ -8134,8 +8134,8 @@
"dev": true,
"optional": true,
"requires": {
"ignore-walk": "3.0.1",
"npm-bundled": "1.0.3"
"ignore-walk": "^3.0.1",
"npm-bundled": "^1.0.1"
}
},
"npmlog": {
......@@ -8144,10 +8144,10 @@
"dev": true,
"optional": true,
"requires": {
"are-we-there-yet": "1.1.4",
"console-control-strings": "1.1.0",
"gauge": "2.7.4",
"set-blocking": "2.0.0"
"are-we-there-yet": "~1.1.2",
"console-control-strings": "~1.1.0",
"gauge": "~2.7.3",
"set-blocking": "~2.0.0"
}
},
"number-is-nan": {
......@@ -8168,7 +8168,7 @@
"dev": true,
"optional": true,
"requires": {
"wrappy": "1.0.2"
"wrappy": "1"
}
},
"os-homedir": {
......@@ -8189,8 +8189,8 @@
"dev": true,
"optional": true,
"requires": {
"os-homedir": "1.0.2",
"os-tmpdir": "1.0.2"
"os-homedir": "^1.0.0",
"os-tmpdir": "^1.0.0"
}
},
"path-is-absolute": {
......@@ -8211,10 +8211,10 @@
"dev": true,
"optional": true,
"requires": {
"deep-extend": "0.5.1",
"ini": "1.3.5",
"minimist": "1.2.0",
"strip-json-comments": "2.0.1"
"deep-extend": "^0.5.1",
"ini": "~1.3.0",
"minimist": "^1.2.0",
"strip-json-comments": "~2.0.1"
},
"dependencies": {
"minimist": {
......@@ -8231,13 +8231,13 @@
"dev": true,
"optional": true,
"requires": {
"core-util-is": "1.0.2",
"inherits": "2.0.3",
"isarray": "1.0.0",
"process-nextick-args": "2.0.0",
"safe-buffer": "5.1.1",
"string_decoder": "1.1.1",
"util-deprecate": "1.0.2"
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"rimraf": {
......@@ -8246,7 +8246,7 @@
"dev": true,
"optional": true,
"requires": {
"glob": "7.1.2"
"glob": "^7.0.5"
}
},
"safe-buffer": {
......@@ -8291,9 +8291,9 @@
"dev": true,
"optional": true,
"requires": {
"code-point-at": "1.1.0",
"is-fullwidth-code-point": "1.0.0",
"strip-ansi": "3.0.1"
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
"strip-ansi": "^3.0.0"
}
},
"string_decoder": {
......@@ -8302,7 +8302,7 @@
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "5.1.1"
"safe-buffer": "~5.1.0"
}
},
"strip-ansi": {
......@@ -8311,7 +8311,7 @@
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "2.1.1"
"ansi-regex": "^2.0.0"
}
},
"strip-json-comments": {
......@@ -8326,13 +8326,13 @@
"dev": true,
"optional": true,
"requires": {
"chownr": "1.0.1",
"fs-minipass": "1.2.5",
"minipass": "2.2.4",
"minizlib": "1.1.0",
"mkdirp": "0.5.1",
"safe-buffer": "5.1.1",
"yallist": "3.0.2"
"chownr": "^1.0.1",
"fs-minipass": "^1.2.5",
"minipass": "^2.2.4",
"minizlib": "^1.1.0",
"mkdirp": "^0.5.0",
"safe-buffer": "^5.1.1",
"yallist": "^3.0.2"
}
},
"util-deprecate": {
......@@ -8347,7 +8347,7 @@
"dev": true,
"optional": true,
"requires": {
"string-width": "1.0.2"
"string-width": "^1.0.2"
}
},
"wrappy": {
......
import { Component, PropTypes } from 'react';
import React, { Component, PropTypes } from 'react';
import { observable, computed, toJS } from 'mobx';
import { observer, inject } from 'mobx-react';
import { registerTmpl } from 'nornj-react';
......@@ -20,6 +20,7 @@ export default class Header extends Component {
@observable hash = ''; // url标签
@observable visible=false;
@observable showMenu=false; // 是否显示左侧菜单
// 菜单
@observable menuData=[{
......@@ -49,6 +50,26 @@ export default class Header extends Component {
});
}
titleItem = () => (
// <div className={styles.logo} style={{'background': '#333'}}>
// asdf
// </div>
<div>
menu
</div>
)
// 点击左侧弹出菜单
@autobind
handleMenuShow(e) {
this.showMenu = true;
}
@autobind
handleMenuHide(e) {
this.showMenu = false;
}
//查看账本信息
@autobind
onClickEye(){
......
......@@ -20,7 +20,14 @@
flex: 1;
@media (max-width:950px){
margin-left: 0;
display: none;
}
// @media (max-width:500px) {
// display: none;
// // .menuDr {
// // display: block;
// // }
// }
li {
color: #fff !important;
font-size: 16px;
......@@ -40,6 +47,20 @@
background-repeat: no-repeat;
}
.color {
color:'red'
}
.menuDr {
line-height: 62px;
display: none;
margin: 2px 0 0 10px;
color: #fff;
@media (max-width:950px) {
display: block;
}
}
.note {
color: #fff;
float:right;
......@@ -49,7 +70,7 @@
line-height: 14px;
display: flex;
align-items: center;
@media (max-width:950px){
@media (max-width:950px) and (min-width:501px){
display: none;
}
......
<header class="site-header">
<div class="logo">
</div>
<ant-Icon class="menuDr" type="menu" onClick={handleMenuShow}/>
<ant-Menu mode="horizontal" class="nav" selectedKeys={store.header.selectMenu} onClick={CheckMenu}>
<!-- <ant-MenuItem key="search"> <ant-Icon type="home" />首页</ant-MenuItem>
<ant-MenuItem key="account"> <ant-Icon type="switcher" />数据账户</ant-MenuItem>
......@@ -37,7 +38,7 @@
visible={visible}
maskClosable={true}
onClose={onClose}
>
>
<fj-Row class="gl">
<fj-Col l=3>账本种子
</fj-Col>
......@@ -103,4 +104,25 @@
columns={toJS(tableColumns)}
dataSource={toJS(common.ledgerinfo.participantNodes)}
bordered />
</ant-Drawer>
<ant-Drawer
title={titleItem()}
placement="left"
visible={showMenu}
onClose={handleMenuHide}
closable={true}
maskClosable={true}
style="padding:0"
>
<ant-Menu mode="vertical" selectedKeys={store.header.selectMenu} onClick={CheckMenu}>
<!-- <ant-MenuItem key="search"> <ant-Icon type="home" />首页</ant-MenuItem>
<ant-MenuItem key="account"> <ant-Icon type="switcher" />数据账户</ant-MenuItem>
<ant-MenuItem key="3"> <ant-Icon type="block" />区块</ant-MenuItem>
<ant-MenuItem key="4"> <ant-Icon type="swap" />交易</ant-MenuItem>
<ant-MenuItem key="user"> <ant-Icon type="user" />用户</ant-MenuItem> -->
<#each {store.header.menuData}>
<ant-MenuItem key={path}> <ant-Icon type={icon} />{name}</ant-MenuItem>
</#each>
</ant-Menu>
</ant-Drawer>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册