Permalink
Browse files

feat(组件路由升级及修改): 组件路由调整,过场动画添加,组件嵌套调整

组件路由调整,过场动画添加,组件嵌套调整

BREAKING CHANGE: 组件路由调整,过场动画添加,组件嵌套调整
  • Loading branch information...
zhaoyuu
zhaoyuu committed Dec 14, 2017
1 parent a5874d4 commit 2b16f307feee8ad56c6f131b7330334acd1438e4
View
@@ -12,6 +12,8 @@
}],
[
"syntax-dynamic-import"
]
],
["react-loadable/babel"],
["transform-decorators-legacy"]
]
}
View
@@ -20,6 +20,7 @@
"id": "dashboard",
"name": "资源池",
"location": "dashboard",
"components":"developer/md-rp/main",
"menustatus": "Y",
"parentid": null,
"icon": "iconfont cl cl-filebox yellow-700",
@@ -34,6 +35,7 @@
"id": "mdservice",
"name": "中间件",
"location": "mdservice",
"components":"developer/md-service/main.page",
"menustatus": "Y",
"parentid": null,
"icon": "iconfont cl cl-filebox yellow-700",
@@ -48,194 +50,6 @@
"sort": 1,
"openview": "curpage",
"category": "engine"
},
{
"id": "myReleasePool",
"name": "表单页",
"location": "/fe/MyRP/index.html",
"menustatus": "Y",
"parentid": null,
"icon": "uf uf-pencil-s",
"target": "",
"urltype": "url",
"children": [
{
"id": "analysis",
"name": "分析页",
"location": "analysis",
"menustatus": "Y",
"parentid": null,
"icon": "iconfont cl cl-filebox yellow-700",
"target": "",
"urltype": "url",
"children": [],
"sort": 2,
"openview": "curpage",
"category": "pass"
}
],
"sort": 2,
"openview": "curpage",
"category": "pass"
},
{
"id": "continuous",
"name": "列表页",
"location": "/fe/continuous/index.html",
"menustatus": "Y",
"parentid": null,
"icon": "uf uf-table",
"target": "",
"urltype": "url",
"children": [
{
"id": "analysis",
"name": "分析页",
"location": "analysis",
"menustatus": "Y",
"parentid": null,
"icon": "iconfont cl cl-filebox yellow-700",
"target": "",
"urltype": "url",
"children": [],
"sort": 2,
"openview": "curpage",
"category": "pass"
}
],
"sort": 2,
"openview": "curpage",
"category": "engine"
},
{
"id": "appmgr",
"name": "详情页",
"location": "/fe/appManager/index.html",
"menustatus": "Y",
"parentid": null,
"icon": "uf uf-listsearch",
"target": "",
"urltype": "url",
"children": [
{
"id": "analysis",
"name": "分析页",
"location": "analysis",
"menustatus": "Y",
"parentid": null,
"icon": "iconfont cl cl-filebox yellow-700",
"target": "",
"urltype": "url",
"children": [],
"sort": 2,
"openview": "curpage",
"category": "pass"
}
],
"sort": 2,
"openview": "curpage",
"category": "engine"
},
{
"id": "mirrorRes",
"name": "结果",
"location": "/fe/imagesCata/index.html",
"menustatus": "Y",
"parentid": null,
"icon": "uf uf-correct",
"target": "",
"urltype": "url",
"children": [
{
"id": "analysis",
"name": "分析页",
"location": "analysis",
"menustatus": "Y",
"parentid": null,
"icon": "iconfont cl cl-filebox yellow-700",
"target": "",
"urltype": "url",
"children": [],
"sort": 2,
"openview": "curpage",
"category": "pass"
}
],
"sort": 3,
"openview": "curpage",
"category": "engine"
},
{
"id": "middleware",
"name": "异常",
"location": "/fe/md-service/index.html",
"menustatus": "Y",
"parentid": null,
"icon": "uf uf-exc-t",
"target": "",
"urltype": "url",
"children": [
{
"id": "analysis",
"name": "分析页",
"location": "analysis",
"menustatus": "Y",
"parentid": null,
"icon": "iconfont cl cl-filebox yellow-700",
"target": "",
"urltype": "url",
"children": [],
"sort": 2,
"openview": "curpage",
"category": "pass"
}
],
"sort": 4,
"openview": "curpage",
"category": "pass"
},
{
"id": "confcenter",
"name": "账户",
"location": "/confcenter",
"menustatus": "Y",
"parentid": null,
"icon": "uf uf-users-o",
"target": "",
"urltype": "view",
"children": [
{
"id": "analysis",
"name": "分析页",
"location": "analysis",
"menustatus": "Y",
"parentid": null,
"icon": "iconfont cl cl-filebox yellow-700",
"target": "",
"urltype": "url",
"children": [],
"sort": 2,
"openview": "curpage",
"category": "pass"
}
],
"sort": 5,
"openview": "curpage",
"category": "paas"
},
{
"id": "yunw",
"name": "使用文档",
"location": "/fe/dataObs/index.html",
"menustatus": "Y",
"parentid": null,
"icon": "uf uf-book",
"target": "",
"urltype": "url",
"children": [],
"sort": 6,
"openview": "curpage",
"category": "engine"
}
]
}
View
@@ -28,6 +28,7 @@
"babel-loader": "^7.0.0",
"babel-plugin-import": "^1.2.1",
"babel-plugin-transform-class-properties": "^6.23.0",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-runtime": "6.x",
"babel-preset-es2015": "^6.14.1",
"babel-preset-react": "^6.14.1",
@@ -37,6 +38,7 @@
"classnames": "^2.2.5",
"css-loader": "^0.28.3",
"cssnano": "^4.0.0-rc.2",
"cz-conventional-changelog": "^2.1.0",
"echarts": "^3.8.5",
"echarts-for-react": "^2.0.0",
"eslint": "^4.9.0",
@@ -58,12 +60,18 @@
"react-custom-scrollbars": "^4.2.1",
"react-dom": "^16.0.0",
"react-loadable": "^5.3.1",
"react-transition-group": "^2.2.1",
"style-loader": "^0.18.1",
"svg-url-loader": "^2.0.2",
"tinper-bee": "^1.1.1",
"uba": "^2.2.2",
"url-loader": "^0.5.8",
"webpack": "^2.6.1",
"webpack-hot-middleware": "^2.21.0"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}
@@ -117,7 +117,6 @@ class MainPage extends Component {
let self = this;
let serivceItems = describes.map((result, i) => {
console.log(result)
return (
<Items
info={result}
@@ -1,5 +1,5 @@
import React,{Component} from 'react'
import mirror, {actions, connect} from 'mirrorx'
import mirror, {actions, connect,NavLink} from 'mirrorx'
import {Menu,Navbar,Icon,Breadcrumb} from 'tinper-bee';
import './sidebar.css';
const classNames = require('classnames');
@@ -10,7 +10,8 @@ mirror.model({
name: 'app',
initialState: {
expanded:false,
openKeys:[]
openKeys:[],
menus:[],
},
reducers: {
setExpanded(state,expanded) {
@@ -25,6 +26,12 @@ mirror.model({
...state,
openKeys:openKeys
}
},
setMenus(state,menus){
return {
...state,
menus:menus
}
}
}
})
@@ -48,9 +55,7 @@ class Siderbar extends Component {
axios.get('/web/v1/menu/sidebarList')
.then(function (response) {
self.setState({
menu: response.data.data
});
actions.app.setMenus(response.data.data)
}).catch(function (error) {
});
@@ -115,7 +120,7 @@ class Siderbar extends Component {
}
render() {
let {expanded,openKeys} = this.props;
let {expanded,openKeys,menus} = this.props;
return (
<div className={classNames({ 'sidebar-contanier':true,'sidebar-expanded': expanded })}>
<div className="sider-menu">
@@ -129,7 +134,7 @@ class Siderbar extends Component {
<Menu mode="inline" className="wrapper-menu" openKeys={openKeys} selectedKeys={[this.state.current]} onOpenChange={this.onOpenChange.bind(this)} onClick={this.handleClick.bind(this)}>
{
this.state.menu.map(function (item) {
menus.map(function (item) {
let blank = item.openview=="blank"?"_blank":"";
@@ -139,7 +144,9 @@ class Siderbar extends Component {
let title = (<a href="javascript:;"><i className={'icon '+item.icon}></i><span>{item.name}</span></a>);
item.children.map(function(it){
let blank =it.openview=="blank"?"_blank":"";
list.push(<Menu.Item key={it.id}><a target={blank} ref="child" href={'#'+it.location}>{it.name}</a></Menu.Item>)
list.push(<Menu.Item key={it.id}>
<NavLink key={it.id} ref="child" to={it.location}>{it.name}</NavLink>
</Menu.Item>)
});
return (
@@ -153,7 +160,6 @@ class Siderbar extends Component {
return (
<Menu.Item key={item.id} >{title}</Menu.Item>
)
}
})
}
@@ -21,6 +21,9 @@
font-size:14px;
transition:color 0.3s cubic-bezier(0.65, 0.05, 0.36, 1), border-color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), background 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), padding 0.15s cubic-bezier(0.645, 0.045, 0.355, 1)
}
.u-menu-inline .u-menu-inline .u-menu-item-selected, .u-menu-inline .u-menu-selected {
border:none;
}
.u-navbar-side-container .u-menu .u-menu-item:hover {
cursor: pointer;
}
@@ -98,4 +101,4 @@
}
.sidebar-expanded ul li i {
font-size:20px;
}
}
Oops, something went wrong.

0 comments on commit 2b16f30

Please sign in to comment.