mirror of
https://github.com/zuiidea/antd-admin
synced 2026-10-29 12:37:20 +00:00
build
This commit is contained in:
+1
-1
@@ -17,7 +17,7 @@ if (!global.tableListData) {
|
||||
isMale:'@boolean',
|
||||
email:'@email',
|
||||
createTime:'@datetime',
|
||||
avatar:mockjs.Random.image('100x100'),
|
||||
avatar:mockjs.Random.image('100x100',mockjs.Random.color()),
|
||||
}],
|
||||
page: {
|
||||
total: 100,
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
"devDependencies": {
|
||||
"atool-build": "^0.7.6",
|
||||
"babel-eslint": "^6.0.4",
|
||||
"babel-plugin-dev-expression": "^0.2.1",
|
||||
"babel-plugin-dva-hmr": "^0.1.0",
|
||||
"babel-plugin-import": "^1.0.1",
|
||||
"babel-plugin-transform-runtime": "^6.9.0",
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, {PropTypes} from 'react'
|
||||
import {Table, Popconfirm, Pagination} from 'antd'
|
||||
import styles from './list.less'
|
||||
|
||||
function UserList({
|
||||
function list({
|
||||
loading,
|
||||
dataSource,
|
||||
pagination,
|
||||
@@ -85,7 +85,7 @@ function UserList({
|
||||
)
|
||||
}
|
||||
|
||||
UserList.propTypes = {
|
||||
list.propTypes = {
|
||||
onPageChange: PropTypes.func,
|
||||
onDeleteItem: PropTypes.func,
|
||||
onEditItem: PropTypes.func,
|
||||
@@ -94,4 +94,4 @@ UserList.propTypes = {
|
||||
pagination: PropTypes.any
|
||||
}
|
||||
|
||||
export default UserList
|
||||
export default list
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
.avatar{
|
||||
line-height: 1;
|
||||
img{
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ const formItemLayout = {
|
||||
},
|
||||
}
|
||||
|
||||
const UserModal = ({
|
||||
const modal = ({
|
||||
visible,
|
||||
item = {},
|
||||
onOk,
|
||||
@@ -98,7 +98,7 @@ const UserModal = ({
|
||||
)
|
||||
}
|
||||
|
||||
UserModal.propTypes = {
|
||||
modal.propTypes = {
|
||||
visible: PropTypes.any,
|
||||
form: PropTypes.object,
|
||||
item: PropTypes.object,
|
||||
@@ -106,4 +106,4 @@ UserModal.propTypes = {
|
||||
onCancel: PropTypes.func,
|
||||
}
|
||||
|
||||
export default Form.create()(UserModal)
|
||||
export default Form.create()(modal)
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, {PropTypes} from 'react'
|
||||
import {Form, Input, Button, Select} from 'antd'
|
||||
import styles from './search.less'
|
||||
|
||||
const UserSearch = ({
|
||||
const search = ({
|
||||
field,
|
||||
keyword,
|
||||
onSearch,
|
||||
@@ -40,11 +40,9 @@ const UserSearch = ({
|
||||
<Form.Item hasFeedback>
|
||||
{getFieldDecorator('keyword', {
|
||||
initialValue: keyword || ''
|
||||
})(<Input type="text"/>)}
|
||||
})(<Input/>)}
|
||||
</Form.Item>
|
||||
<Button style={{
|
||||
marginRight: '10px'
|
||||
}} type="primary" htmlType="submit">搜索</Button>
|
||||
<Button type="primary" htmlType="submit">搜索</Button>
|
||||
</Form>
|
||||
</div>
|
||||
<div className={styles.create}>
|
||||
@@ -54,7 +52,7 @@ const UserSearch = ({
|
||||
)
|
||||
}
|
||||
|
||||
UserSearch.propTypes = {
|
||||
search.propTypes = {
|
||||
form: PropTypes.object.isRequired,
|
||||
onSearch: PropTypes.func,
|
||||
onAdd: PropTypes.func,
|
||||
@@ -62,4 +60,4 @@ UserSearch.propTypes = {
|
||||
keyword: PropTypes.string
|
||||
}
|
||||
|
||||
export default Form.create()(UserSearch)
|
||||
export default Form.create()(search)
|
||||
|
||||
@@ -66,6 +66,7 @@ function Users({ location, dispatch, users }) {
|
||||
field,
|
||||
keyword,
|
||||
onSearch(fieldsValue) {
|
||||
console.log(fieldsValue);
|
||||
dispatch({
|
||||
type: 'users/query',
|
||||
payload: fieldsValue,
|
||||
|
||||
@@ -2,7 +2,6 @@ import { request } from '../utils'
|
||||
import qs from 'qs'
|
||||
|
||||
export async function query(params) {
|
||||
console.log(params);
|
||||
return request(`/api/users?${qs.stringify(params)}`)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user