mirror of
https://github.com/zuiidea/antd-admin
synced 2026-10-28 20:03:57 +00:00
add:users-motion
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -143,7 +143,6 @@
|
||||
|
||||
.ant-menu-root {
|
||||
height: ~"calc(100vh - 144px)";
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
|
||||
@@ -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 {
|
||||
<Table className={styles.table} bordered scroll={{
|
||||
x: 1200
|
||||
}} columns={columns} dataSource={dataSource} loading={loading} onChange={(page) => {
|
||||
self.newPage = page.current
|
||||
onPageChange(page)
|
||||
onPageChange(page, () => {
|
||||
self.newPage = page.current
|
||||
})
|
||||
}} pagination={pagination} simple rowKey={record => record.id} getBodyWrapper={this.getBodyWrapper} />
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
+5
-6
@@ -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'
|
||||
}))
|
||||
},
|
||||
|
||||
@@ -9,11 +9,6 @@ module.exports = [
|
||||
name: '用户管理',
|
||||
icon: 'user'
|
||||
},
|
||||
{
|
||||
key: 'usersMotion',
|
||||
name: '用户管理-动效',
|
||||
icon: 'user'
|
||||
},
|
||||
{
|
||||
key: 'ui',
|
||||
name: 'UI组件',
|
||||
|
||||
Reference in New Issue
Block a user