Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
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
Dec 18, 2017
by
ιεΈ
Committed by
niko
Dec 18, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unlimited list to add a special method (#451)
parent
c03d59b5
Changes
2
Show 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 {
effects
:
{
*
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
({
type
:
'
changeLoading
'
,
payload
:
true
,
...
...
@@ -27,6 +42,12 @@ export default {
},
reducers
:
{
queryList
(
state
,
action
)
{
return
{
...
state
,
list
:
action
.
payload
,
};
},
appendList
(
state
,
action
)
{
return
{
...
state
,
...
...
src/routes/List/SearchList.js
View file @
69a9d9bb
...
...
@@ -32,7 +32,7 @@ export default class SearchList extends Component {
fetchMore
=
()
=>
{
this
.
props
.
dispatch
({
type
:
'
list/
f
etch
'
,
type
:
'
list/
appendF
etch
'
,
payload
:
{
count
:
pageSize
,
},
...
...
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