Skip to content

Commit

Permalink
Merge pull request #26 from kne-union/2.0
Browse files Browse the repository at this point in the history
2.0
  • Loading branch information
zhipenglin committed Jul 15, 2024
2 parents 949c654 + a1a1acb commit 94f5cca
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kne/react-fetch",
"version": "1.5.1",
"version": "1.5.2",
"description": "用于获取数据的react组件",
"main": "dist/index.js",
"module": "dist/index.modern.js",
Expand Down Expand Up @@ -57,7 +57,7 @@
},
"devDependencies": {
"@kne/microbundle": "^0.15.5",
"@kne/modules-dev": "^2.0.14",
"@kne/modules-dev": "^2.0.29",
"cross-env": "^7.0.3",
"husky": "^9.0.11",
"npm-run-all": "^4.1.5",
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/load-more.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default {
id: 'load-more', plugin: ({type, callback}, context) => {
const {fetchData} = context.componentContext.getState();
if (type === 'load-more' && typeof callback === 'function') {
const {fetchData} = context.componentContext.getState();
return callback(fetchData, context.output);
}
}, dependencies: ['output-data']
Expand Down
2 changes: 1 addition & 1 deletion src/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import getRequestToken from './getRequestToken';
const request = (props) => {
const {
onRequestParamsChange, onRequestDataChange, onError, onIsCompleteChange, onIsLoadingChange, ...requestProps
} = Object.assign({}, props, {options: Object.assign({}, {ignoreSuccessState: true}, props?.options)});
} = Object.assign({}, props, {options: Object.assign({}, {ignoreSuccessState: true}, props?.options, {type: 'refresh'})});
return createRunner({
getProps: () => requestProps,
getRequestToken: () => getRequestToken(requestProps),
Expand Down

0 comments on commit 94f5cca

Please sign in to comment.