kn-hooks 0.0.27 → 0.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -45,9 +45,9 @@ return(
|
|
|
45
45
|
* @returns {UsePaginationWithFormResult}
|
|
46
46
|
*/
|
|
47
47
|
const usePaginationWithForm = (props) => {
|
|
48
|
-
const {service,pagination}= props;
|
|
48
|
+
const {service,pagination,...otherProps}= props;
|
|
49
49
|
const [form] = useState(props.form);
|
|
50
|
-
const page = usePagination({service,pagination})
|
|
50
|
+
const page = usePagination({service,pagination,...otherProps})
|
|
51
51
|
|
|
52
52
|
useEffect(()=>{
|
|
53
53
|
const fnFeforeService = async (params)=>{
|
|
@@ -81,7 +81,7 @@ const usePaginationWithForm = (props) => {
|
|
|
81
81
|
if(form){
|
|
82
82
|
form.resetFields();
|
|
83
83
|
}
|
|
84
|
-
page.reset();
|
|
84
|
+
return page.reset();
|
|
85
85
|
};
|
|
86
86
|
|
|
87
87
|
return {
|
|
@@ -94,7 +94,7 @@ const usePaginationWithForm = (props) => {
|
|
|
94
94
|
/**
|
|
95
95
|
* usePaginationWithForm的返回对象
|
|
96
96
|
* @typedef {Object} UsePaginationWithFormResult
|
|
97
|
-
* @property {Function} reset -
|
|
97
|
+
* @property {Function} reset - 重置方法,返回Promise
|
|
98
98
|
*/
|
|
99
99
|
|
|
100
100
|
|