Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ant-design-pro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
ant-design-pro
Commits
69a9d9bb
Commit
69a9d9bb
authored
7 years ago
by
ιεΈ
Committed by
niko
7 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unlimited list to add a special method (#451)
parent
c03d59b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
src/models/list.js
src/models/list.js
+21
-0
src/routes/List/SearchList.js
src/routes/List/SearchList.js
+1
-1
No files found.
src/models/list.js
View file @
69a9d9bb
...
@@ -10,6 +10,21 @@ export default {
...
@@ -10,6 +10,21 @@ export default {
effects
:
{
effects
:
{
*
fetch
({
payload
},
{
call
,
put
})
{
*
fetch
({
payload
},
{
call
,
put
})
{
yield
put
({
type
:
'
changeLoading
'
,
payload
:
true
,
});
const
response
=
yield
call
(
queryFakeList
,
payload
);
yield
put
({
type
:
'
queryList
'
,
payload
:
Array
.
isArray
(
response
)
?
response
:
[],
});
yield
put
({
type
:
'
changeLoading
'
,
payload
:
false
,
});
},
*
appendFetch
({
payload
},
{
call
,
put
})
{
yield
put
({
yield
put
({
type
:
'
changeLoading
'
,
type
:
'
changeLoading
'
,
payload
:
true
,
payload
:
true
,
...
@@ -27,6 +42,12 @@ export default {
...
@@ -27,6 +42,12 @@ export default {
},
},
reducers
:
{
reducers
:
{
queryList
(
state
,
action
)
{
return
{
...
state
,
list
:
action
.
payload
,
};
},
appendList
(
state
,
action
)
{
appendList
(
state
,
action
)
{
return
{
return
{
...
state
,
...
state
,
...
...
This diff is collapsed.
Click to expand it.
src/routes/List/SearchList.js
View file @
69a9d9bb
...
@@ -32,7 +32,7 @@ export default class SearchList extends Component {
...
@@ -32,7 +32,7 @@ export default class SearchList extends Component {
fetchMore
=
()
=>
{
fetchMore
=
()
=>
{
this
.
props
.
dispatch
({
this
.
props
.
dispatch
({
type
:
'
list/
f
etch
'
,
type
:
'
list/
appendF
etch
'
,
payload
:
{
payload
:
{
count
:
pageSize
,
count
:
pageSize
,
},
},
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment