Skip to content

Commit

Permalink
make login work
Browse files Browse the repository at this point in the history
  • Loading branch information
sorrycc committed Mar 24, 2018
1 parent a307181 commit fb49056
Show file tree
Hide file tree
Showing 15 changed files with 537 additions and 546 deletions.
3 changes: 1 addition & 2 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
"enums": "./src/utils/enums",
"services": "./src/services",
"models": "./src/models",
"routes": "./src/routes",
"themes": "./src/themes"
"routes": "./src/routes"
}
}
]
Expand Down
13 changes: 8 additions & 5 deletions .umirc.mock.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
const mock = {}
require('fs').readdirSync(require('path').join(__dirname + '/mock')).forEach(function(file) {
Object.assign(mock, require('./mock/' + file))
})
module.exports = mock

export default {
...require('./mock/common'),
...require('./mock/dashboard'),
...require('./mock/menu'),
...require('./mock/post'),
...require('./mock/user'),
}
5 changes: 5 additions & 0 deletions .webpackrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { resolve } from 'path';

export default {
theme: "./theme.config.js",
// 接口代理示例
Expand All @@ -13,4 +15,7 @@ export default {
// "pathRewrite": { "^/api/v2" : "/api/v2" }
// }
},
alias: {
themes: resolve(__dirname, './src/themes'),
},
}
2 changes: 1 addition & 1 deletion mock/common.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const Mock = require('mockjs')
const config = require('../utils/config')
const config = require('../src/utils/config')

const queryArray = (array, key, keyAlias = 'key') => {
if (!(array instanceof Array)) {
Expand Down
4 changes: 2 additions & 2 deletions mock/dashboard.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { color } from '../utils/theme'
import { color } from '../src/utils/theme'

const Mock = require('mockjs')
const config = require('../utils/config')
const config = require('../src/utils/config')

const { apiPrefix } = config

Expand Down
2 changes: 1 addition & 1 deletion mock/user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const qs = require('qs')
const Mock = require('mockjs')
const config = require('../utils/config')
const config = require('../src/utils/config')

const { apiPrefix } = config

Expand Down
184 changes: 92 additions & 92 deletions src/components/Layout/Header.less
Original file line number Diff line number Diff line change
@@ -1,92 +1,92 @@
@import "~themes/vars";

.header {
:global {
.ant-menu-submenu-title {
height: 56px;
}

.ant-menu-horizontal {
line-height: 56px;

& > .ant-menu-submenu:hover {
color: #1890ff;
background-color: rgba(24, 144, 255, 0.15);
}
}

.ant-menu {
border-bottom: none;
height: 56px;
}

.ant-menu-horizontal > .ant-menu-submenu {
top: 0;
margin-top: 0;
}

.ant-menu-horizontal > .ant-menu-item,
.ant-menu-horizontal > .ant-menu-submenu {
border-bottom: none;
}

.ant-menu-horizontal > .ant-menu-item-active,
.ant-menu-horizontal > .ant-menu-item-open,
.ant-menu-horizontal > .ant-menu-item-selected,
.ant-menu-horizontal > .ant-menu-item:hover,
.ant-menu-horizontal > .ant-menu-submenu-active,
.ant-menu-horizontal > .ant-menu-submenu-open,
.ant-menu-horizontal > .ant-menu-submenu-selected,
.ant-menu-horizontal > .ant-menu-submenu:hover {
border-bottom: none;
}
}
box-shadow: @shadow-2;
position: relative;
display: flex;
justify-content: space-between;
height: 56px;
z-index: 9;
display: flex;
align-items: center;
background-color: #fff;

.rightWarpper {
display: flex;
padding-right: 16px;
}

.button {
width: 56px;
height: 56px;
line-height: 56px;
text-align: center;
font-size: 18px;
cursor: pointer;
transition: @transition-ease-in;

&:hover {
color: @primary-color;
background-color: fade(@primary-color, 15%);
}
}
}

.popovermenu {
width: 280px;
margin-left: 6px;

:global .ant-popover-inner-content {
padding: 0;

.ant-menu-inline .ant-menu-item,
.ant-menu-vertical .ant-menu-item {
border-right: 0;
}

.ant-menu-inline .ant-menu-item-selected,
.ant-menu-inline .ant-menu-selected {
border-right: 0;
}
}
}
@import "~themes/vars.less";

.header {
:global {
.ant-menu-submenu-title {
height: 56px;
}

.ant-menu-horizontal {
line-height: 56px;

& > .ant-menu-submenu:hover {
color: #1890ff;
background-color: rgba(24, 144, 255, 0.15);
}
}

.ant-menu {
border-bottom: none;
height: 56px;
}

.ant-menu-horizontal > .ant-menu-submenu {
top: 0;
margin-top: 0;
}

.ant-menu-horizontal > .ant-menu-item,
.ant-menu-horizontal > .ant-menu-submenu {
border-bottom: none;
}

.ant-menu-horizontal > .ant-menu-item-active,
.ant-menu-horizontal > .ant-menu-item-open,
.ant-menu-horizontal > .ant-menu-item-selected,
.ant-menu-horizontal > .ant-menu-item:hover,
.ant-menu-horizontal > .ant-menu-submenu-active,
.ant-menu-horizontal > .ant-menu-submenu-open,
.ant-menu-horizontal > .ant-menu-submenu-selected,
.ant-menu-horizontal > .ant-menu-submenu:hover {
border-bottom: none;
}
}
box-shadow: @shadow-2;
position: relative;
display: flex;
justify-content: space-between;
height: 56px;
z-index: 9;
display: flex;
align-items: center;
background-color: #fff;

.rightWarpper {
display: flex;
padding-right: 16px;
}

.button {
width: 56px;
height: 56px;
line-height: 56px;
text-align: center;
font-size: 18px;
cursor: pointer;
transition: @transition-ease-in;

&:hover {
color: @primary-color;
background-color: fade(@primary-color, 15%);
}
}
}

.popovermenu {
width: 280px;
margin-left: 6px;

:global .ant-popover-inner-content {
padding: 0;

.ant-menu-inline .ant-menu-item,
.ant-menu-vertical .ant-menu-item {
border-right: 0;
}

.ant-menu-inline .ant-menu-item-selected,
.ant-menu-inline .ant-menu-selected {
border-right: 0;
}
}
}
Loading

0 comments on commit fb49056

Please sign in to comment.