Fix page navigation in useApiIndex
This commit is contained in:
parent
590696750b
commit
7361dcccff
|
@ -16,11 +16,16 @@ export function useApiIndex(url, siteName) {
|
|||
page: resetPage ? 1 : inner.meta.value.current_page,
|
||||
};
|
||||
|
||||
var response = (await axios.get(url, params)).data;
|
||||
var response = (await axios.get(url, {params})).data;
|
||||
inner.data.value = response.data;
|
||||
inner.meta.value = response.meta;
|
||||
}
|
||||
|
||||
async function reloadPage(page) {
|
||||
inner.meta.value.current_page = page;
|
||||
await reload(false);
|
||||
}
|
||||
|
||||
function create() {
|
||||
single.value = JSON.parse(JSON.stringify(inner.meta.value.default));
|
||||
}
|
||||
|
@ -72,6 +77,7 @@ export function useApiIndex(url, siteName) {
|
|||
create,
|
||||
edit,
|
||||
reload,
|
||||
reloadPage,
|
||||
can,
|
||||
requestCallback,
|
||||
router,
|
||||
|
|
Loading…
Reference in New Issue