diff --git a/src/components/layout/common.less b/src/components/layout/common.less
index 8c56a01..65006aa 100644
--- a/src/components/layout/common.less
+++ b/src/components/layout/common.less
@@ -4,34 +4,13 @@ body {
background-color: #f8f8f8;
}
// scrollbar
-
-::-webkit-scrollbar-corner {
- background-color: transparent;
-}
-
-::-webkit-scrollbar-button {
- width: 0;
- height: 0;
- display: none;
-}
-
::-webkit-scrollbar-thumb {
- width: 2px;
- background-color: rgba(0,0,0,.2);
- border-radius: 2px;
+ background-color: #e6e6e6;
}
::-webkit-scrollbar {
- width: 2px;
- height: 2px;
-}
-
-::-webkit-scrollbar-track {
- width: 5px;
-}
-
-::-webkit-scrollbar:hover {
- background-color: transparent;
+ width: 8px;
+ height: 8px;
}
:global .ant-breadcrumb {
diff --git a/src/components/layout/main.less b/src/components/layout/main.less
index 860573f..99bab44 100644
--- a/src/components/layout/main.less
+++ b/src/components/layout/main.less
@@ -143,7 +143,6 @@
.ant-menu-root {
height: ~"calc(100vh - 144px)";
- overflow-y: scroll;
overflow-x: hidden;
&::-webkit-scrollbar-thumb {
diff --git a/src/components/users/list.js b/src/components/users/list.js
index 15898ed..23e4247 100644
--- a/src/components/users/list.js
+++ b/src/components/users/list.js
@@ -39,8 +39,9 @@ class list extends React.Component {
ease: 'easeOutQuad'
}
]
- this.currentPage = 1
- this.newPage = 1
+ const {current} = this.props.pagination
+ this.currentPage = current
+ this.newPage = current
}
getBodyWrapper = (body) => {
@@ -133,8 +134,9 @@ class list extends React.Component {
{
- self.newPage = page.current
- onPageChange(page)
+ onPageChange(page, () => {
+ self.newPage = page.current
+ })
}} pagination={pagination} simple rowKey={record => record.id} getBodyWrapper={this.getBodyWrapper} />
}
diff --git a/src/components/users/list.less b/src/components/users/list.less
index a89983f..6710225 100644
--- a/src/components/users/list.less
+++ b/src/components/users/list.less
@@ -1,8 +1,5 @@
.table {
td.avatar {
- line-height: 1;
- height: 59px;
-
img {
border-radius: 50%;
}
@@ -11,6 +8,8 @@
:global {
.ant-table-tbody > tr > td,
.ant-table-thead > tr > th {
+ height: 60px;
+
&:nth-child(1) {
width: 6%;
}
@@ -28,7 +27,7 @@
}
&:nth-child(5) {
- width: 4%;
+ width: 6%;
}
&:nth-child(6) {
@@ -40,22 +39,20 @@
}
&:nth-child(8) {
- width: 18%;
+ width: 20%;
}
&:nth-child(9) {
- width: 15%;
+ width: 14%;
}
&:nth-child(10) {
- width: 11%;
+ width: 8%;
}
}
.ant-table-thead {
& > tr {
- height: 60px;
- line-height: 60px;
transition: none;
display: block;
diff --git a/src/routes/users.js b/src/routes/users.js
index 9823ad1..92d9e4f 100644
--- a/src/routes/users.js
+++ b/src/routes/users.js
@@ -30,9 +30,9 @@ function Users ({ location, dispatch, users }) {
dataSource: list,
loading,
pagination: pagination,
- onPageChange (page) {
+ async onPageChange (page, callback) {
const query = location.query
- dispatch(routerRedux.push({
+ await dispatch(routerRedux.push({
pathname: '/users',
query: {
...query,
@@ -40,6 +40,7 @@ function Users ({ location, dispatch, users }) {
pageSize: page.pageSize
}
}))
+ await callback && callback()
},
onDeleteItem (id) {
dispatch({
@@ -62,15 +63,13 @@ function Users ({ location, dispatch, users }) {
field,
keyword,
onSearch (fieldsValue) {
- !!fieldsValue.keyword.length ?
- dispatch(routerRedux.push({
+ fieldsValue.keyword.length ? dispatch(routerRedux.push({
pathname: '/users',
query: {
field: fieldsValue.field,
keyword: fieldsValue.keyword
}
- })) :
- dispatch(routerRedux.push({
+ })) : dispatch(routerRedux.push({
pathname: '/users'
}))
},
diff --git a/src/utils/menu.js b/src/utils/menu.js
index 7c550b4..c00ed96 100644
--- a/src/utils/menu.js
+++ b/src/utils/menu.js
@@ -9,11 +9,6 @@ module.exports = [
name: '用户管理',
icon: 'user'
},
- {
- key: 'usersMotion',
- name: '用户管理-动效',
- icon: 'user'
- },
{
key: 'ui',
name: 'UI组件',